Instrument Neutral Distributed Interface INDI 2.2.5
Public Types | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
INDI::DustCapInterface Class Reference

#include <indidustcapinterface.h>

Inheritance diagram for INDI::DustCapInterface:
ALTO AllunaTCS2 DeepSkyDadFP DustCoverSimulator Excalibur FlipFlat GeminiFlatpanel PegasusFlatMasterNeo SnapCap WandererCover WandererCoverV4EC WandererCoverV4ProEC WandererEclipse

Public Types

enum  { CAP_PARK , CAP_UNPARK }
 
enum  { CAN_ABORT = 1 << 0 , CAN_SET_POSITION = 1 << 1 , CAN_SET_LIMITS = 1 << 2 }
 

Public Attributes

enum INDI::DustCapInterface:: { ... }  DustCapCapability
 

Protected Member Functions

 DustCapInterface (DefaultDevice *device)
 
virtual ~DustCapInterface ()=default
 
virtual IPState ParkCap ()
 Park dust cap (close cover). Must be implemented by child.
 
virtual IPState UnParkCap ()
 unPark dust cap (open cover). Must be implemented by child.
 
virtual IPState AbortCap ()
 Abort motion. Must be implemented by child.
 
void initProperties (const char *group, uint32_t capabilities=0)
 Initialize dust cap properties. It is recommended to call this function within initProperties() of your primary device.
 
bool updateProperties ()
 updateProperties Defines or Delete properties based on default device connection status
 
bool processSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 Process dust cap switch properties.
 

Protected Attributes

INDI::PropertySwitch ParkCapSP {2}
 
INDI::PropertySwitch AbortCapSP {1}
 

Detailed Description

Definition at line 43 of file indidustcapinterface.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CAP_PARK 
CAP_UNPARK 

Definition at line 46 of file indidustcapinterface.h.

◆ anonymous enum

anonymous enum
Enumerator
CAN_ABORT 
CAN_SET_POSITION 

Can the dust cap abort motion?

CAN_SET_LIMITS 

Can the dust go to a specific angular position? UNUSED

Definition at line 52 of file indidustcapinterface.h.

Constructor & Destructor Documentation

◆ DustCapInterface()

DustCapInterface::DustCapInterface ( DefaultDevice *  defaultDevice)
protected

Dust Cap status: Parked: PARK switch is ON and state is IPS_OK Unparked: UNPARK switch is ON and state is IPS_OK Unknown: PARK and UNPARK are either not toggled or state is IPS_ALERT

Definition at line 35 of file indidustcapinterface.cpp.

◆ ~DustCapInterface()

virtual INDI::DustCapInterface::~DustCapInterface ( )
protectedvirtualdefault

Member Function Documentation

◆ AbortCap()

IPState DustCapInterface::AbortCap ( )
protectedvirtual

Abort motion. Must be implemented by child.

Returns
If command completed immediately, return IPS_OK. If command is in progress, return IPS_BUSY. If there is an error, return IPS_ALERT

Reimplemented in ALTO, GeminiFlatpanel, PegasusFlatMasterNeo, and SnapCap.

Definition at line 129 of file indidustcapinterface.cpp.

◆ initProperties()

void DustCapInterface::initProperties ( const char *  group,
uint32_t  capabilities = 0 
)
protected

Initialize dust cap properties. It is recommended to call this function within initProperties() of your primary device.

Parameters
groupGroup or tab name to be used to define properties.
capabilitiesAny additional capabilities the dust cap supports besides Parking and Unparking.

Definition at line 42 of file indidustcapinterface.cpp.

◆ ParkCap()

IPState DustCapInterface::ParkCap ( )
protectedvirtual

Park dust cap (close cover). Must be implemented by child.

Returns
If command completed immediately, return IPS_OK. If command is in progress, return IPS_BUSY. If there is an error, return IPS_ALERT

Reimplemented in ALTO, DeepSkyDadFP, DustCoverSimulator, Excalibur, FlipFlat, GeminiFlatpanel, PegasusFlatMasterNeo, SnapCap, WandererCover, WandererCoverV4EC, WandererCoverV4ProEC, WandererEclipse, and AllunaTCS2.

Definition at line 117 of file indidustcapinterface.cpp.

◆ processSwitch()

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

Process dust cap switch properties.

Definition at line 80 of file indidustcapinterface.cpp.

◆ UnParkCap()

IPState DustCapInterface::UnParkCap ( )
protectedvirtual

unPark dust cap (open cover). Must be implemented by child.

Returns
If command completed immediately, return IPS_OK. If command is in progress, return IPS_BUSY. If there is an error, return IPS_ALERT

Reimplemented in ALTO, DeepSkyDadFP, DustCoverSimulator, Excalibur, FlipFlat, GeminiFlatpanel, PegasusFlatMasterNeo, SnapCap, WandererCover, WandererCoverV4EC, WandererCoverV4ProEC, WandererEclipse, and AllunaTCS2.

Definition at line 123 of file indidustcapinterface.cpp.

◆ updateProperties()

bool DustCapInterface::updateProperties ( )
protected

updateProperties Defines or Delete properties based on default device connection status

Returns
True if all is OK, false otherwise.

Definition at line 59 of file indidustcapinterface.cpp.

Member Data Documentation

◆ AbortCapSP

INDI::PropertySwitch INDI::DustCapInterface::AbortCapSP {1}
protected

Definition at line 99 of file indidustcapinterface.h.

◆ []

enum { ... } INDI::DustCapInterface::DustCapCapability

◆ ParkCapSP

INDI::PropertySwitch INDI::DustCapInterface::ParkCapSP {2}
protected

Definition at line 97 of file indidustcapinterface.h.


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