Instrument Neutral Distributed Interface INDI  2.0.2
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
INDI::RotatorInterface Class Referenceabstract

#include <indirotatorinterface.h>

Inheritance diagram for INDI::RotatorInterface:
EsattoArco Gemini INDI::Rotator Integra LX200_OnStep NightCrawler DeepSkyDadFR1 PegasusFalcon Pyxis RotatorSimulator WandererRotatorLite nFrameRotator

Public Types

enum  {
  ROTATOR_CAN_ABORT = 1 << 0 , ROTATOR_CAN_HOME = 1 << 1 , ROTATOR_CAN_SYNC = 1 << 2 , ROTATOR_CAN_REVERSE = 1 << 3 ,
  ROTATOR_HAS_BACKLASH = 1 << 4
}
 

Public Member Functions

uint32_t GetCapability () const
 GetRotatorCapability returns the capability of the Rotator. More...
 
void SetCapability (uint32_t cap)
 SetRotatorCapability sets the Rotator capabilities. All capabilities must be initialized. More...
 
bool CanAbort ()
 
bool CanHome ()
 
bool CanSync ()
 
bool CanReverse ()
 
bool HasBacklash ()
 

Public Attributes

enum INDI::RotatorInterface:: { ... }  RotatorCapability
 

Protected Member Functions

 RotatorInterface (DefaultDevice *defaultDevice)
 
void initProperties (const char *groupName)
 Initilize Rotator properties. It is recommended to call this function within initProperties() of your primary device. More...
 
bool updateProperties ()
 updateProperties Define or Delete Rotator properties based on the connection status of the base device More...
 
bool processNumber (const char *dev, const char *name, double values[], char *names[], int n)
 Process Rotator number properties. More...
 
bool processSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 Process Rotator switch properties. More...
 
virtual IPState MoveRotator (double angle)=0
 MoveRotator Go to specific angle. More...
 
virtual bool SyncRotator (double angle)
 SyncRotator Set current angle as the supplied angle without moving the rotator. More...
 
virtual IPState HomeRotator ()
 HomeRotator Go to home position. More...
 
virtual bool ReverseRotator (bool enabled)
 ReverseRotator Reverse the direction of the rotator. CW is usually the normal direction, and CCW is the reversed direction. More...
 
virtual bool AbortRotator ()
 AbortRotator Abort all motion. More...
 
virtual bool SetRotatorBacklash (int32_t steps)
 SetRotatorBacklash Set the Rotatorer backlash compensation value. More...
 
virtual bool SetRotatorBacklashEnabled (bool enabled)
 SetRotatorBacklashEnabled Enables or disables the Rotator backlash compensation. More...
 
bool saveConfigItems (FILE *fp)
 saveConfigItems save focuser properties defined in the interface in config file More...
 

Protected Attributes

INumber GotoRotatorN [1]
 
INumberVectorProperty GotoRotatorNP
 
INumber SyncRotatorN [1]
 
INumberVectorProperty SyncRotatorNP
 
ISwitch AbortRotatorS [1]
 
ISwitchVectorProperty AbortRotatorSP
 
ISwitch HomeRotatorS [1]
 
ISwitchVectorProperty HomeRotatorSP
 
ISwitch ReverseRotatorS [2]
 
ISwitchVectorProperty ReverseRotatorSP
 
ISwitchVectorProperty RotatorBacklashSP
 
ISwitch RotatorBacklashS [2]
 
INumberVectorProperty RotatorBacklashNP
 
INumber RotatorBacklashN [1]
 
uint32_t rotatorCapability = 0
 
DefaultDevicem_defaultDevice { nullptr }
 

Detailed Description

Definition at line 45 of file indirotatorinterface.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ROTATOR_CAN_ABORT 

Can the Rotator abort motion once started?

ROTATOR_CAN_HOME 

Can the Rotator go to home position?

ROTATOR_CAN_SYNC 

Can the Rotator sync to specific tick?

ROTATOR_CAN_REVERSE 

Can the Rotator reverse direction?

ROTATOR_HAS_BACKLASH 

Can the Rotatorer compensate for backlash?

Definition at line 53 of file indirotatorinterface.h.

Constructor & Destructor Documentation

◆ RotatorInterface()

RotatorInterface::RotatorInterface ( DefaultDevice defaultDevice)
explicitprotected

Definition at line 31 of file indirotatorinterface.cpp.

Member Function Documentation

◆ AbortRotator()

bool RotatorInterface::AbortRotator ( )
protectedvirtual

AbortRotator Abort all motion.

Returns
True if successful, false otherwise.

Reimplemented in LX200_OnStep, WandererRotatorLite, RotatorSimulator, PegasusFalcon, NightCrawler, nFrameRotator, Integra, DeepSkyDadFR1, and EsattoArco.

Definition at line 303 of file indirotatorinterface.cpp.

◆ CanAbort()

bool INDI::RotatorInterface::CanAbort ( )
inline
Returns
Whether Rotator can abort.

Definition at line 82 of file indirotatorinterface.h.

◆ CanHome()

bool INDI::RotatorInterface::CanHome ( )
inline
Returns
Whether Rotator can go to home position.

Definition at line 90 of file indirotatorinterface.h.

◆ CanReverse()

bool INDI::RotatorInterface::CanReverse ( )
inline
Returns
Whether Rotator can reverse direction.

Definition at line 106 of file indirotatorinterface.h.

◆ CanSync()

bool INDI::RotatorInterface::CanSync ( )
inline
Returns
Whether Rotator can sync ticks position to a new one.

Definition at line 98 of file indirotatorinterface.h.

◆ GetCapability()

uint32_t INDI::RotatorInterface::GetCapability ( ) const
inline

GetRotatorCapability returns the capability of the Rotator.

Definition at line 65 of file indirotatorinterface.h.

◆ HasBacklash()

bool INDI::RotatorInterface::HasBacklash ( )
inline
Returns
True if the rotator supports backlash

Definition at line 114 of file indirotatorinterface.h.

◆ HomeRotator()

IPState RotatorInterface::HomeRotator ( )
protectedvirtual

HomeRotator Go to home position.

Returns
State of operation: IPS_OK is motion is completed, IPS_BUSY if motion in progress, IPS_ALERT on error.

Reimplemented in LX200_OnStep, WandererRotatorLite, Pyxis, NightCrawler, and Gemini.

Definition at line 297 of file indirotatorinterface.cpp.

◆ initProperties()

void RotatorInterface::initProperties ( const char *  groupName)
protected

Initilize Rotator properties. It is recommended to call this function within initProperties() of your primary device.

Parameters
groupNameGroup or tab name to be used to define Rotator properties.

Definition at line 35 of file indirotatorinterface.cpp.

◆ MoveRotator()

virtual IPState INDI::RotatorInterface::MoveRotator ( double  angle)
protectedpure virtual

MoveRotator Go to specific angle.

Parameters
angleTarget angle in degrees.
Returns
State of operation: IPS_OK is motion is completed, IPS_BUSY if motion in progress, IPS_ALERT on error.

Implemented in LX200_OnStep, WandererRotatorLite, RotatorSimulator, Pyxis, PegasusFalcon, NightCrawler, nFrameRotator, Integra, Gemini, DeepSkyDadFR1, and EsattoArco.

◆ processNumber()

bool RotatorInterface::processNumber ( const char *  dev,
const char *  name,
double  values[],
char *  names[],
int  n 
)
protected

Process Rotator number properties.

Definition at line 79 of file indirotatorinterface.cpp.

◆ processSwitch()

bool RotatorInterface::processSwitch ( const char *  dev,
const char *  name,
ISState states,
char *  names[],
int  n 
)
protected

Process Rotator switch properties.

Definition at line 153 of file indirotatorinterface.cpp.

◆ ReverseRotator()

bool RotatorInterface::ReverseRotator ( bool  enabled)
protectedvirtual

ReverseRotator Reverse the direction of the rotator. CW is usually the normal direction, and CCW is the reversed direction.

Parameters
enableif True, reverse direction. If false, revert to normal direction.
Returns
True if successful, false otherwise.

Reimplemented in WandererRotatorLite, RotatorSimulator, Pyxis, PegasusFalcon, NightCrawler, Integra, Gemini, DeepSkyDadFR1, and EsattoArco.

Definition at line 309 of file indirotatorinterface.cpp.

◆ saveConfigItems()

bool RotatorInterface::saveConfigItems ( FILE *  fp)
protected

saveConfigItems save focuser properties defined in the interface in config file

Parameters
fppointer to config file
Returns
Always return true

Definition at line 332 of file indirotatorinterface.cpp.

◆ SetCapability()

void INDI::RotatorInterface::SetCapability ( uint32_t  cap)
inline

SetRotatorCapability sets the Rotator capabilities. All capabilities must be initialized.

Parameters
cappointer to Rotator capability struct.

Definition at line 74 of file indirotatorinterface.h.

◆ SetRotatorBacklash()

bool RotatorInterface::SetRotatorBacklash ( int32_t  steps)
protectedvirtual

SetRotatorBacklash Set the Rotatorer backlash compensation value.

Parameters
stepsvalue in absolute steps to compensate
Returns
True if successful, false otherwise.

Reimplemented in LX200_OnStep, WandererRotatorLite, and Gemini.

Definition at line 316 of file indirotatorinterface.cpp.

◆ SetRotatorBacklashEnabled()

bool RotatorInterface::SetRotatorBacklashEnabled ( bool  enabled)
protectedvirtual

SetRotatorBacklashEnabled Enables or disables the Rotator backlash compensation.

Parameters
enableflag to enable or disable backlash compensation
Returns
True if successful, false otherwise.

Reimplemented in LX200_OnStep, WandererRotatorLite, and Gemini.

Definition at line 323 of file indirotatorinterface.cpp.

◆ SyncRotator()

bool RotatorInterface::SyncRotator ( double  angle)
protectedvirtual

SyncRotator Set current angle as the supplied angle without moving the rotator.

Parameters
ticksDesired new angle.
Returns
True if successful, false otherwise.

Reimplemented in RotatorSimulator, PegasusFalcon, NightCrawler, nFrameRotator, Integra, DeepSkyDadFR1, and EsattoArco.

Definition at line 290 of file indirotatorinterface.cpp.

◆ updateProperties()

bool RotatorInterface::updateProperties ( )
protected

updateProperties Define or Delete Rotator properties based on the connection status of the base device

Returns
True if successful, false otherwise.

Definition at line 248 of file indirotatorinterface.cpp.

Member Data Documentation

◆ AbortRotatorS

ISwitch INDI::RotatorInterface::AbortRotatorS[1]
protected

Definition at line 203 of file indirotatorinterface.h.

◆ AbortRotatorSP

ISwitchVectorProperty INDI::RotatorInterface::AbortRotatorSP
protected

Definition at line 204 of file indirotatorinterface.h.

◆ GotoRotatorN

INumber INDI::RotatorInterface::GotoRotatorN[1]
protected

Definition at line 197 of file indirotatorinterface.h.

◆ GotoRotatorNP

INumberVectorProperty INDI::RotatorInterface::GotoRotatorNP
protected

Definition at line 198 of file indirotatorinterface.h.

◆ HomeRotatorS

ISwitch INDI::RotatorInterface::HomeRotatorS[1]
protected

Definition at line 206 of file indirotatorinterface.h.

◆ HomeRotatorSP

ISwitchVectorProperty INDI::RotatorInterface::HomeRotatorSP
protected

Definition at line 207 of file indirotatorinterface.h.

◆ m_defaultDevice

DefaultDevice* INDI::RotatorInterface::m_defaultDevice { nullptr }
protected

Definition at line 221 of file indirotatorinterface.h.

◆ ReverseRotatorS

ISwitch INDI::RotatorInterface::ReverseRotatorS[2]
protected

Definition at line 209 of file indirotatorinterface.h.

◆ ReverseRotatorSP

ISwitchVectorProperty INDI::RotatorInterface::ReverseRotatorSP
protected

Definition at line 210 of file indirotatorinterface.h.

◆ RotatorBacklashN

INumber INDI::RotatorInterface::RotatorBacklashN[1]
protected

Definition at line 218 of file indirotatorinterface.h.

◆ RotatorBacklashNP

INumberVectorProperty INDI::RotatorInterface::RotatorBacklashNP
protected

Definition at line 217 of file indirotatorinterface.h.

◆ RotatorBacklashS

ISwitch INDI::RotatorInterface::RotatorBacklashS[2]
protected

Definition at line 214 of file indirotatorinterface.h.

◆ RotatorBacklashSP

ISwitchVectorProperty INDI::RotatorInterface::RotatorBacklashSP
protected

Definition at line 213 of file indirotatorinterface.h.

◆ 

enum { ... } INDI::RotatorInterface::RotatorCapability

◆ rotatorCapability

uint32_t INDI::RotatorInterface::rotatorCapability = 0
protected

Definition at line 220 of file indirotatorinterface.h.

◆ SyncRotatorN

INumber INDI::RotatorInterface::SyncRotatorN[1]
protected

Definition at line 200 of file indirotatorinterface.h.

◆ SyncRotatorNP

INumberVectorProperty INDI::RotatorInterface::SyncRotatorNP
protected

Definition at line 201 of file indirotatorinterface.h.


The documentation for this class was generated from the following files: