TwiceAsNice  2019-02-18
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:
Inheritance graph
Collaboration diagram for INDI::RotatorInterface:
Collaboration graph

Public Types

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

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. More...
 
bool CanAbort ()
 
bool CanHome ()
 
bool CanSync ()
 
bool CanReverse ()
 
uint32_t GetCapability () const
 GetRotatorCapability returns the capability of the Rotator. More...
 
void SetCapability (uint32_t cap)
 SetRotatorCapability sets the Rotator capabilities. More...
 
bool CanAbort ()
 
bool CanHome ()
 
bool CanSync ()
 
bool CanReverse ()
 

Public Attributes

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

Protected Types

enum  { REVERSE_ENABLED, REVERSE_DISABLED }
 
enum  { REVERSE_ENABLED, REVERSE_DISABLED }
 

Protected Member Functions

 RotatorInterface (DefaultDevice *defaultDevice)
 
void initProperties (const char *groupName)
 Initilize Rotator properties. 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. More...
 
virtual bool AbortRotator ()
 AbortRotator Abort all motion. More...
 
 RotatorInterface (DefaultDevice *defaultDevice)
 
void initProperties (const char *groupName)
 Initilize Rotator properties. 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. 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 }
 

Member Enumeration Documentation

◆ anonymous enum

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?

◆ anonymous enum

anonymous enum
protected
Enumerator
REVERSE_ENABLED 
REVERSE_DISABLED 

◆ anonymous enum

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?

◆ anonymous enum

anonymous enum
protected
Enumerator
REVERSE_ENABLED 
REVERSE_DISABLED 

Constructor & Destructor Documentation

◆ RotatorInterface() [1/2]

RotatorInterface::RotatorInterface ( DefaultDevice defaultDevice)
explicitprotected

◆ RotatorInterface() [2/2]

INDI::RotatorInterface::RotatorInterface ( DefaultDevice defaultDevice)
explicitprotected

Member Function Documentation

◆ AbortRotator() [1/2]

bool RotatorInterface::AbortRotator ( )
protectedvirtual

AbortRotator Abort all motion.

Returns
True if successful, false otherwise.

Reimplemented in Integra, and NightCrawler.

◆ AbortRotator() [2/2]

virtual bool INDI::RotatorInterface::AbortRotator ( )
protectedvirtual

AbortRotator Abort all motion.

Returns
True if successful, false otherwise.

Reimplemented in Integra, and NightCrawler.

◆ CanAbort() [1/2]

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

◆ CanAbort() [2/2]

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

◆ CanHome() [1/2]

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

◆ CanHome() [2/2]

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

◆ CanReverse() [1/2]

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

◆ CanReverse() [2/2]

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

◆ CanSync() [1/2]

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

◆ CanSync() [2/2]

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

◆ GetCapability() [1/2]

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

GetRotatorCapability returns the capability of the Rotator.

◆ GetCapability() [2/2]

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

GetRotatorCapability returns the capability of the Rotator.

◆ HomeRotator() [1/2]

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.

◆ HomeRotator() [2/2]

virtual IPState INDI::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.

◆ initProperties() [1/2]

void INDI::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.

◆ initProperties() [2/2]

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.

◆ MoveRotator() [1/2]

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.

◆ MoveRotator() [2/2]

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.

◆ processNumber() [1/2]

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

Process Rotator number properties.

◆ processNumber() [2/2]

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

Process Rotator number properties.

◆ processSwitch() [1/2]

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

Process Rotator switch properties.

◆ processSwitch() [2/2]

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

Process Rotator switch properties.

◆ ReverseRotator() [1/2]

virtual bool INDI::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.

◆ ReverseRotator() [2/2]

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.

◆ SetCapability() [1/2]

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

SetRotatorCapability sets the Rotator capabilities.

All capabilities must be initialized.

Parameters
cappointer to Rotator capability struct.

◆ SetCapability() [2/2]

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

SetRotatorCapability sets the Rotator capabilities.

All capabilities must be initialized.

Parameters
cappointer to Rotator capability struct.

◆ SyncRotator() [1/2]

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.

◆ SyncRotator() [2/2]

virtual bool INDI::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.

◆ updateProperties() [1/2]

bool INDI::RotatorInterface::updateProperties ( )
protected

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

Returns
True if successful, false otherwise.

◆ updateProperties() [2/2]

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.

Member Data Documentation

◆ AbortRotatorS

ISwitch RotatorInterface::AbortRotatorS
protected

◆ AbortRotatorSP

ISwitchVectorProperty RotatorInterface::AbortRotatorSP
protected

◆ GotoRotatorN

INumber RotatorInterface::GotoRotatorN
protected

◆ GotoRotatorNP

INumberVectorProperty RotatorInterface::GotoRotatorNP
protected

◆ HomeRotatorS

ISwitch RotatorInterface::HomeRotatorS
protected

◆ HomeRotatorSP

ISwitchVectorProperty RotatorInterface::HomeRotatorSP
protected

◆ m_defaultDevice

DefaultDevice * RotatorInterface::m_defaultDevice { nullptr }
protected

◆ ReverseRotatorS

ISwitch RotatorInterface::ReverseRotatorS
protected

◆ ReverseRotatorSP

ISwitchVectorProperty RotatorInterface::ReverseRotatorSP
protected

◆ RotatorCapability [1/2]

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

◆ RotatorCapability [2/2]

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

◆ rotatorCapability

uint32_t RotatorInterface::rotatorCapability = 0
protected

◆ SyncRotatorN

INumber RotatorInterface::SyncRotatorN
protected

◆ SyncRotatorNP

INumberVectorProperty RotatorInterface::SyncRotatorNP
protected

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