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

#include <indirotatorinterface.h>

Inheritance diagram for INDI::RotatorInterface:
Gemini INDI::Rotator Integra NightCrawler Pyxis

Public Types

Public Member Functions

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

Public Attributes

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

Protected Types

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 ()
 updateRotatorProperties 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...
 

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
 
uint32_t rotatorCapability = 0
 
DefaultDevicem_defaultDevice { nullptr }
 

Detailed Description

Definition at line 43 of file indirotatorinterface.h.

Member Enumeration Documentation

anonymous enum
Enumerator
ROTATOR_CAN_ABORT 
ROTATOR_CAN_HOME 

Can the Rotator abort motion once started?

ROTATOR_CAN_SYNC 

Can the Rotator go to home position?

ROTATOR_CAN_REVERSE 

Can the Rotator sync to specific tick?

Definition at line 51 of file indirotatorinterface.h.

anonymous enum
protected
Enumerator
REVERSE_ENABLED 
REVERSE_DISABLED 

Definition at line 160 of file indirotatorinterface.h.

Constructor & Destructor Documentation

RotatorInterface::RotatorInterface ( DefaultDevice defaultDevice)
explicitprotected

Definition at line 31 of file indirotatorinterface.cpp.

Member Function Documentation

bool RotatorInterface::AbortRotator ( )
protectedvirtual

AbortRotator Abort all motion.

Returns
True if successful, false otherwise.

Reimplemented in Integra, and NightCrawler.

Definition at line 221 of file indirotatorinterface.cpp.

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

Definition at line 73 of file indirotatorinterface.h.

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

Definition at line 78 of file indirotatorinterface.h.

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

Definition at line 88 of file indirotatorinterface.h.

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

Definition at line 83 of file indirotatorinterface.h.

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

GetRotatorCapability returns the capability of the Rotator.

Definition at line 62 of file indirotatorinterface.h.

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, and Pyxis.

Definition at line 215 of file indirotatorinterface.cpp.

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.

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 Gemini, Integra, NightCrawler, and Pyxis.

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

Process Rotator number properties.

Definition at line 60 of file indirotatorinterface.cpp.

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

Process Rotator switch properties.

Definition at line 110 of file indirotatorinterface.cpp.

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 Gemini, Integra, and Pyxis.

Definition at line 227 of file indirotatorinterface.cpp.

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

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

Parameters
cappointer to Rotator capability struct.

Definition at line 68 of file indirotatorinterface.h.

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 Integra, and NightCrawler.

Definition at line 208 of file indirotatorinterface.cpp.

bool RotatorInterface::updateProperties ( )
protected

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

Returns
True if successful, false otherwise.

Definition at line 176 of file indirotatorinterface.cpp.

Member Data Documentation

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

Definition at line 152 of file indirotatorinterface.h.

ISwitchVectorProperty INDI::RotatorInterface::AbortRotatorSP
protected

Definition at line 153 of file indirotatorinterface.h.

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

Definition at line 146 of file indirotatorinterface.h.

INumberVectorProperty INDI::RotatorInterface::GotoRotatorNP
protected

Definition at line 147 of file indirotatorinterface.h.

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

Definition at line 155 of file indirotatorinterface.h.

ISwitchVectorProperty INDI::RotatorInterface::HomeRotatorSP
protected

Definition at line 156 of file indirotatorinterface.h.

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

Definition at line 163 of file indirotatorinterface.h.

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

Definition at line 158 of file indirotatorinterface.h.

ISwitchVectorProperty INDI::RotatorInterface::ReverseRotatorSP
protected

Definition at line 159 of file indirotatorinterface.h.

enum { ... } INDI::RotatorInterface::RotatorCapability
uint32_t INDI::RotatorInterface::rotatorCapability = 0
protected

Definition at line 162 of file indirotatorinterface.h.

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

Definition at line 149 of file indirotatorinterface.h.

INumberVectorProperty INDI::RotatorInterface::SyncRotatorNP
protected

Definition at line 150 of file indirotatorinterface.h.


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