Instrument Neutral Distributed Interface INDI 2.2.5
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 iAFSRotator Camelot DeepSkyDadFR1 PegasusFalcon PegasusFalconV2 PlaneWaveRotator Pyxis RotatorSimulator WandererRotatorBase nFrameRotator LX200_Proxisky

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

Protected Attributes

INDI::PropertyNumber GotoRotatorNP {1}
 
INDI::PropertyNumber SyncRotatorNP {1}
 
INDI::PropertySwitch AbortRotatorSP {1}
 
INDI::PropertySwitch HomeRotatorSP {1}
 
INDI::PropertySwitch ReverseRotatorSP {2}
 
INDI::PropertySwitch RotatorBacklashSP {2}
 
INDI::PropertyNumber RotatorBacklashNP {1}
 
INDI::PropertyNumber RotatorLimitsNP {1}
 
double m_RotatorOffset {-1}
 
uint32_t rotatorCapability = 0
 
DefaultDevice * m_defaultDevice { nullptr }
 

Detailed Description

Definition at line 47 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 55 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 EsattoArco, Camelot, DeepSkyDadFR1, iAFSRotator, Integra, nFrameRotator, NightCrawler, PegasusFalcon, PegasusFalconV2, PlaneWaveRotator, RotatorSimulator, WandererRotatorBase, and LX200_OnStep.

Definition at line 355 of file indirotatorinterface.cpp.

◆ CanAbort()

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

Definition at line 84 of file indirotatorinterface.h.

◆ CanHome()

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

Definition at line 92 of file indirotatorinterface.h.

◆ CanReverse()

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

Definition at line 108 of file indirotatorinterface.h.

◆ CanSync()

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

Definition at line 100 of file indirotatorinterface.h.

◆ GetCapability()

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

GetRotatorCapability returns the capability of the Rotator.

Definition at line 67 of file indirotatorinterface.h.

◆ HasBacklash()

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

Definition at line 116 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 Gemini, NightCrawler, Pyxis, WandererRotatorBase, and LX200_OnStep.

Definition at line 349 of file indirotatorinterface.cpp.

◆ initProperties()

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

Initialize 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 EsattoArco, DeepSkyDadFR1, Gemini, iAFSRotator, Integra, nFrameRotator, NightCrawler, PegasusFalcon, PegasusFalconV2, PlaneWaveRotator, Pyxis, RotatorSimulator, WandererRotatorBase, LX200_OnStep, and Camelot.

◆ processNumber()

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

Process Rotator number properties.

Definition at line 84 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 214 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 EsattoArco, Camelot, DeepSkyDadFR1, Gemini, iAFSRotator, Integra, NightCrawler, PegasusFalcon, PegasusFalconV2, PlaneWaveRotator, Pyxis, RotatorSimulator, and WandererRotatorBase.

Definition at line 361 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 384 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 76 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 Gemini, and LX200_OnStep.

Definition at line 368 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 Gemini, and LX200_OnStep.

Definition at line 375 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 EsattoArco, DeepSkyDadFR1, iAFSRotator, Integra, nFrameRotator, NightCrawler, PegasusFalcon, PegasusFalconV2, RotatorSimulator, and Camelot.

Definition at line 342 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 298 of file indirotatorinterface.cpp.

Member Data Documentation

◆ AbortRotatorSP

INDI::PropertySwitch INDI::RotatorInterface::AbortRotatorSP {1}
protected

Definition at line 206 of file indirotatorinterface.h.

◆ GotoRotatorNP

INDI::PropertyNumber INDI::RotatorInterface::GotoRotatorNP {1}
protected

Definition at line 200 of file indirotatorinterface.h.

◆ HomeRotatorSP

INDI::PropertySwitch INDI::RotatorInterface::HomeRotatorSP {1}
protected

Definition at line 209 of file indirotatorinterface.h.

◆ m_defaultDevice

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

Definition at line 228 of file indirotatorinterface.h.

◆ m_RotatorOffset

double INDI::RotatorInterface::m_RotatorOffset {-1}
protected

Definition at line 225 of file indirotatorinterface.h.

◆ ReverseRotatorSP

INDI::PropertySwitch INDI::RotatorInterface::ReverseRotatorSP {2}
protected

Definition at line 212 of file indirotatorinterface.h.

◆ RotatorBacklashNP

INDI::PropertyNumber INDI::RotatorInterface::RotatorBacklashNP {1}
protected

Definition at line 218 of file indirotatorinterface.h.

◆ RotatorBacklashSP

INDI::PropertySwitch INDI::RotatorInterface::RotatorBacklashSP {2}
protected

Definition at line 215 of file indirotatorinterface.h.

◆ []

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

◆ rotatorCapability

uint32_t INDI::RotatorInterface::rotatorCapability = 0
protected

Definition at line 227 of file indirotatorinterface.h.

◆ RotatorLimitsNP

INDI::PropertyNumber INDI::RotatorInterface::RotatorLimitsNP {1}
protected

Definition at line 221 of file indirotatorinterface.h.

◆ SyncRotatorNP

INDI::PropertyNumber INDI::RotatorInterface::SyncRotatorNP {1}
protected

Definition at line 203 of file indirotatorinterface.h.


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