TwiceAsNice  2019-02-18
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
INDI::Dome Class Reference


Class to provide general functionality of a Dome device. More...

#include <indidome.h>

Inheritance diagram for INDI::Dome:
Inheritance graph
Collaboration diagram for INDI::Dome:
Collaboration graph

Public Types

enum  DomeMeasurements {
  DM_DOME_RADIUS, DM_SHUTTER_WIDTH, DM_NORTH_DISPLACEMENT, DM_EAST_DISPLACEMENT,
  DM_UP_DISPLACEMENT, DM_OTA_OFFSET, DM_DOME_RADIUS, DM_SHUTTER_WIDTH,
  DM_NORTH_DISPLACEMENT, DM_EAST_DISPLACEMENT, DM_UP_DISPLACEMENT, DM_OTA_OFFSET
}
 Measurements necessary for dome-slit synchronization. More...
 
enum  DomeDirection { DOME_CW, DOME_CCW, DOME_CW, DOME_CCW }
 
enum  DomeMotionCommand { MOTION_START, MOTION_STOP, MOTION_START, MOTION_STOP }
 
enum  DomeParkData {
  PARK_NONE, PARK_AZ, PARK_AZ_ENCODER, PARK_NONE,
  PARK_AZ, PARK_AZ_ENCODER
}
 
enum  ShutterOperation { SHUTTER_OPEN, SHUTTER_CLOSE, SHUTTER_OPEN, SHUTTER_CLOSE }
 Shutter operation command. More...
 
enum  DomeState {
  DOME_IDLE, DOME_MOVING, DOME_SYNCED, DOME_PARKING,
  DOME_UNPARKING, DOME_PARKED, DOME_UNPARKED, DOME_IDLE,
  DOME_MOVING, DOME_SYNCED, DOME_PARKING, DOME_UNPARKING,
  DOME_PARKED, DOME_UNPARKED
}
 Dome status. More...
 
enum  ShutterStatus {
  SHUTTER_OPENED, SHUTTER_CLOSED, SHUTTER_MOVING, SHUTTER_UNKNOWN,
  SHUTTER_OPENED, SHUTTER_CLOSED, SHUTTER_MOVING, SHUTTER_UNKNOWN
}
 Shutter Status. More...
 
enum  {
  DOME_CAN_ABORT = 1 << 0, DOME_CAN_ABS_MOVE = 1 << 1, DOME_CAN_REL_MOVE, DOME_CAN_PARK = 1 << 3,
  DOME_HAS_SHUTTER = 1 << 4, DOME_HAS_VARIABLE_SPEED = 1 << 5
}
 
enum  { CONNECTION_NONE = 1 << 0, CONNECTION_SERIAL = 1 << 1, CONNECTION_TCP = 1 << 2 }
 
enum  DomeMeasurements {
  DM_DOME_RADIUS, DM_SHUTTER_WIDTH, DM_NORTH_DISPLACEMENT, DM_EAST_DISPLACEMENT,
  DM_UP_DISPLACEMENT, DM_OTA_OFFSET, DM_DOME_RADIUS, DM_SHUTTER_WIDTH,
  DM_NORTH_DISPLACEMENT, DM_EAST_DISPLACEMENT, DM_UP_DISPLACEMENT, DM_OTA_OFFSET
}
 
enum  DomeDirection { DOME_CW, DOME_CCW, DOME_CW, DOME_CCW }
 
enum  DomeMotionCommand { MOTION_START, MOTION_STOP, MOTION_START, MOTION_STOP }
 
enum  DomeParkData {
  PARK_NONE, PARK_AZ, PARK_AZ_ENCODER, PARK_NONE,
  PARK_AZ, PARK_AZ_ENCODER
}
 
enum  ShutterOperation { SHUTTER_OPEN, SHUTTER_CLOSE, SHUTTER_OPEN, SHUTTER_CLOSE }
 
enum  DomeState {
  DOME_IDLE, DOME_MOVING, DOME_SYNCED, DOME_PARKING,
  DOME_UNPARKING, DOME_PARKED, DOME_UNPARKED, DOME_IDLE,
  DOME_MOVING, DOME_SYNCED, DOME_PARKING, DOME_UNPARKING,
  DOME_PARKED, DOME_UNPARKED
}
 
enum  ShutterStatus {
  SHUTTER_OPENED, SHUTTER_CLOSED, SHUTTER_MOVING, SHUTTER_UNKNOWN,
  SHUTTER_OPENED, SHUTTER_CLOSED, SHUTTER_MOVING, SHUTTER_UNKNOWN
}
 
enum  {
  DOME_CAN_ABORT = 1 << 0, DOME_CAN_ABS_MOVE = 1 << 1, DOME_CAN_REL_MOVE, DOME_CAN_PARK = 1 << 3,
  DOME_HAS_SHUTTER = 1 << 4, DOME_HAS_VARIABLE_SPEED = 1 << 5
}
 
enum  { CONNECTION_NONE = 1 << 0, CONNECTION_SERIAL = 1 << 1, CONNECTION_TCP = 1 << 2 }
 
- Public Types inherited from INDI::BaseDevice
enum  INDI_ERROR {
  INDI_DEVICE_NOT_FOUND = -1, INDI_PROPERTY_INVALID = -2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR = -4,
  INDI_DEVICE_NOT_FOUND = -1, INDI_PROPERTY_INVALID = -2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR = -4
}
 
enum  DRIVER_INTERFACE {
  GENERAL_INTERFACE = 0, TELESCOPE_INTERFACE = (1 << 0), CCD_INTERFACE = (1 << 1), GUIDER_INTERFACE = (1 << 2),
  FOCUSER_INTERFACE = (1 << 3), FILTER_INTERFACE = (1 << 4), DOME_INTERFACE = (1 << 5), GPS_INTERFACE = (1 << 6),
  WEATHER_INTERFACE = (1 << 7), AO_INTERFACE = (1 << 8), DUSTCAP_INTERFACE = (1 << 9), LIGHTBOX_INTERFACE = (1 << 10),
  DETECTOR_INTERFACE = (1 << 11), ROTATOR_INTERFACE = (1 << 12), SPECTROGRAPH_INTERFACE = (1 << 13), AUX_INTERFACE = (1 << 15),
  GENERAL_INTERFACE = 0, TELESCOPE_INTERFACE = (1 << 0), CCD_INTERFACE = (1 << 1), GUIDER_INTERFACE = (1 << 2),
  FOCUSER_INTERFACE = (1 << 3), FILTER_INTERFACE = (1 << 4), DOME_INTERFACE = (1 << 5), GPS_INTERFACE = (1 << 6),
  WEATHER_INTERFACE = (1 << 7), AO_INTERFACE = (1 << 8), DUSTCAP_INTERFACE = (1 << 9), LIGHTBOX_INTERFACE = (1 << 10),
  DETECTOR_INTERFACE = (1 << 11), ROTATOR_INTERFACE = (1 << 12), SPECTROGRAPH_INTERFACE = (1 << 13), AUX_INTERFACE = (1 << 15)
}
 The DRIVER_INTERFACE enum defines the class of devices the driver implements. More...
 
enum  INDI_ERROR {
  INDI_DEVICE_NOT_FOUND = -1, INDI_PROPERTY_INVALID = -2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR = -4,
  INDI_DEVICE_NOT_FOUND = -1, INDI_PROPERTY_INVALID = -2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR = -4
}
 
enum  DRIVER_INTERFACE {
  GENERAL_INTERFACE = 0, TELESCOPE_INTERFACE = (1 << 0), CCD_INTERFACE = (1 << 1), GUIDER_INTERFACE = (1 << 2),
  FOCUSER_INTERFACE = (1 << 3), FILTER_INTERFACE = (1 << 4), DOME_INTERFACE = (1 << 5), GPS_INTERFACE = (1 << 6),
  WEATHER_INTERFACE = (1 << 7), AO_INTERFACE = (1 << 8), DUSTCAP_INTERFACE = (1 << 9), LIGHTBOX_INTERFACE = (1 << 10),
  DETECTOR_INTERFACE = (1 << 11), ROTATOR_INTERFACE = (1 << 12), SPECTROGRAPH_INTERFACE = (1 << 13), AUX_INTERFACE = (1 << 15),
  GENERAL_INTERFACE = 0, TELESCOPE_INTERFACE = (1 << 0), CCD_INTERFACE = (1 << 1), GUIDER_INTERFACE = (1 << 2),
  FOCUSER_INTERFACE = (1 << 3), FILTER_INTERFACE = (1 << 4), DOME_INTERFACE = (1 << 5), GPS_INTERFACE = (1 << 6),
  WEATHER_INTERFACE = (1 << 7), AO_INTERFACE = (1 << 8), DUSTCAP_INTERFACE = (1 << 9), LIGHTBOX_INTERFACE = (1 << 10),
  DETECTOR_INTERFACE = (1 << 11), ROTATOR_INTERFACE = (1 << 12), SPECTROGRAPH_INTERFACE = (1 << 13), AUX_INTERFACE = (1 << 15)
}
 The DRIVER_INTERFACE enum defines the class of devices the driver implements. More...
 

Public Member Functions

 Dome ()
 
virtual ~Dome ()
 
virtual bool initProperties ()
 Initilize properties initial state and value. More...
 
virtual void ISGetProperties (const char *dev)
 define the driver's properties to the client. More...
 
virtual bool updateProperties ()
 updateProperties is called whenever there is a change in the CONNECTION status of the driver. More...
 
virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
 Process the client newNumber command. More...
 
virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 Process the client newSwitch command. More...
 
virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
 Process the client newSwitch command. More...
 
virtual bool ISSnoopDevice (XMLEle *root)
 Process a snoop event from INDI server. More...
 
void setDomeConnection (const uint8_t &value)
 setDomeConnection Set Dome connection mode. More...
 
uint8_t getDomeConnection () const
 
uint32_t GetDomeCapability () const
 GetDomeCapability returns the capability of the dome. More...
 
void SetDomeCapability (uint32_t cap)
 SetDomeCapability set the dome capabilities. More...
 
bool CanAbort ()
 
bool CanAbsMove ()
 
bool CanRelMove ()
 
bool CanPark ()
 
bool HasShutter ()
 
bool HasVariableSpeed ()
 
bool isLocked ()
 isLocked, is the dome currently locked? More...
 
DomeState getDomeState () const
 
void setDomeState (const DomeState &value)
 
IPState getWeatherState () const
 
IPState getMountState () const
 
 Dome ()
 
virtual ~Dome ()
 
virtual bool initProperties ()
 Initilize properties initial state and value. More...
 
virtual void ISGetProperties (const char *dev)
 define the driver's properties to the client. More...
 
virtual bool updateProperties ()
 updateProperties is called whenever there is a change in the CONNECTION status of the driver. More...
 
virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
 Process the client newNumber command. More...
 
virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 Process the client newSwitch command. More...
 
virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
 Process the client newSwitch command. More...
 
virtual bool ISSnoopDevice (XMLEle *root)
 Process a snoop event from INDI server. More...
 
void setDomeConnection (const uint8_t &value)
 setDomeConnection Set Dome connection mode. More...
 
uint8_t getDomeConnection () const
 
uint32_t GetDomeCapability () const
 GetDomeCapability returns the capability of the dome. More...
 
void SetDomeCapability (uint32_t cap)
 SetDomeCapability set the dome capabilities. More...
 
bool CanAbort ()
 
bool CanAbsMove ()
 
bool CanRelMove ()
 
bool CanPark ()
 
bool HasShutter ()
 
bool HasVariableSpeed ()
 
bool isLocked ()
 isLocked, is the dome currently locked? More...
 
DomeState getDomeState () const
 
void setDomeState (const DomeState &value)
 
IPState getWeatherState () const
 
IPState getMountState () const
 
- Public Member Functions inherited from INDI::DefaultDevice
 DefaultDevice ()
 
virtual ~DefaultDevice ()
 
void addAuxControls ()
 Add Debug, Simulation, and Configuration options to the driver. More...
 
void addDebugControl ()
 Add Debug control to the driver. More...
 
void addSimulationControl ()
 Add Simulation control to the driver. More...
 
void addConfigurationControl ()
 Add Configuration control to the driver. More...
 
void addPollPeriodControl ()
 Add Polling period control to the driver. More...
 
void resetProperties ()
 Set all properties to IDLE state. More...
 
void defineNumber (INumberVectorProperty *nvp)
 Define number vector to client & register it. More...
 
void defineText (ITextVectorProperty *tvp)
 Define text vector to client & register it. More...
 
void defineSwitch (ISwitchVectorProperty *svp)
 Define switch vector to client & register it. More...
 
void defineLight (ILightVectorProperty *lvp)
 Define light vector to client & register it. More...
 
void defineBLOB (IBLOBVectorProperty *bvp)
 Define BLOB vector to client & register it. More...
 
virtual bool deleteProperty (const char *propertyName)
 Delete a property and unregister it. More...
 
virtual void setConnected (bool status, IPState state=IPS_OK, const char *msg=nullptr)
 Set connection switch status in the client. More...
 
int SetTimer (uint32_t ms)
 Set a timer to call the function TimerHit after ms milliseconds. More...
 
void RemoveTimer (int id)
 Remove timer added with SetTimer. More...
 
virtual void TimerHit ()
 Callback function to be called once SetTimer duration elapses. More...
 
virtual const char * getDriverExec ()
 
virtual const char * getDriverName ()
 
void setVersion (uint16_t vMajor, uint16_t vMinor)
 Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor. More...
 
uint16_t getMajorVersion ()
 
uint16_t getMinorVersion ()
 
virtual bool ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
 Process the client newBLOB command. More...
 
virtual uint16_t getDriverInterface ()
 
void setDriverInterface (uint16_t value)
 setInterface Set driver interface. More...
 
 DefaultDevice ()
 
virtual ~DefaultDevice ()
 
void addAuxControls ()
 Add Debug, Simulation, and Configuration options to the driver. More...
 
void addDebugControl ()
 Add Debug control to the driver. More...
 
void addSimulationControl ()
 Add Simulation control to the driver. More...
 
void addConfigurationControl ()
 Add Configuration control to the driver. More...
 
void addPollPeriodControl ()
 Add Polling period control to the driver. More...
 
void resetProperties ()
 Set all properties to IDLE state. More...
 
void defineNumber (INumberVectorProperty *nvp)
 Define number vector to client & register it. More...
 
void defineText (ITextVectorProperty *tvp)
 Define text vector to client & register it. More...
 
void defineSwitch (ISwitchVectorProperty *svp)
 Define switch vector to client & register it. More...
 
void defineLight (ILightVectorProperty *lvp)
 Define light vector to client & register it. More...
 
void defineBLOB (IBLOBVectorProperty *bvp)
 Define BLOB vector to client & register it. More...
 
virtual bool deleteProperty (const char *propertyName)
 Delete a property and unregister it. More...
 
virtual void setConnected (bool status, IPState state=IPS_OK, const char *msg=nullptr)
 Set connection switch status in the client. More...
 
int SetTimer (uint32_t ms)
 Set a timer to call the function TimerHit after ms milliseconds. More...
 
void RemoveTimer (int id)
 Remove timer added with SetTimer. More...
 
virtual void TimerHit ()
 Callback function to be called once SetTimer duration elapses. More...
 
virtual const char * getDriverExec ()
 
virtual const char * getDriverName ()
 
void setVersion (uint16_t vMajor, uint16_t vMinor)
 Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor. More...
 
uint16_t getMajorVersion ()
 
uint16_t getMinorVersion ()
 
virtual bool ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
 Process the client newBLOB command. More...
 
virtual uint16_t getDriverInterface ()
 
void setDriverInterface (uint16_t value)
 setInterface Set driver interface. More...
 
- Public Member Functions inherited from INDI::BaseDevice
 BaseDevice ()
 
virtual ~BaseDevice ()
 
INumberVectorPropertygetNumber (const char *name)
 
ITextVectorPropertygetText (const char *name)
 
ISwitchVectorPropertygetSwitch (const char *name)
 
ILightVectorPropertygetLight (const char *name)
 
IBLOBVectorPropertygetBLOB (const char *name)
 
IPState getPropertyState (const char *name)
 
IPerm getPropertyPermission (const char *name)
 
void registerProperty (void *p, INDI_PROPERTY_TYPE type)
 
int removeProperty (const char *name, char *errmsg)
 Remove a property. More...
 
void * getRawProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN)
 Return a property and its type given its name. More...
 
INDI::PropertygetProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN)
 Return a property and its type given its name. More...
 
std::vector< INDI::Property * > * getProperties ()
 Return a list of all properties in the device. More...
 
bool buildSkeleton (const char *filename)
 Build driver properties from a skeleton file. More...
 
bool isConnected ()
 
void setDeviceName (const char *dev)
 Set the device name. More...
 
const char * getDeviceName ()
 
void addMessage (const std::string &msg)
 Add message to the driver's message queue. More...
 
void checkMessage (XMLEle *root)
 
void doMessage (XMLEle *msg)
 
std::string messageQueue (int index) const
 
std::string lastMessage ()
 
void setMediator (INDI::BaseMediator *med)
 Set the driver's mediator to receive notification of news devices and updated property values. More...
 
INDI::BaseMediatorgetMediator ()
 
const char * getDriverName ()
 
const char * getDriverExec ()
 
const char * getDriverVersion ()
 
 BaseDevice ()
 
virtual ~BaseDevice ()
 
INumberVectorPropertygetNumber (const char *name)
 
ITextVectorPropertygetText (const char *name)
 
ISwitchVectorPropertygetSwitch (const char *name)
 
ILightVectorPropertygetLight (const char *name)
 
IBLOBVectorPropertygetBLOB (const char *name)
 
IPState getPropertyState (const char *name)
 
IPerm getPropertyPermission (const char *name)
 
void registerProperty (void *p, INDI_PROPERTY_TYPE type)
 
int removeProperty (const char *name, char *errmsg)
 Remove a property. More...
 
void * getRawProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN)
 Return a property and its type given its name. More...
 
INDI::PropertygetProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN)
 Return a property and its type given its name. More...
 
std::vector< INDI::Property * > * getProperties ()
 Return a list of all properties in the device. More...
 
bool buildSkeleton (const char *filename)
 Build driver properties from a skeleton file. More...
 
bool isConnected ()
 
void setDeviceName (const char *dev)
 Set the device name. More...
 
const char * getDeviceName ()
 
void addMessage (const std::string &msg)
 Add message to the driver's message queue. More...
 
void checkMessage (XMLEle *root)
 
void doMessage (XMLEle *msg)
 
std::string messageQueue (int index) const
 
std::string lastMessage ()
 
void setMediator (INDI::BaseMediator *med)
 Set the driver's mediator to receive notification of news devices and updated property values. More...
 
INDI::BaseMediatorgetMediator ()
 
const char * getDriverName ()
 
const char * getDriverExec ()
 
const char * getDriverVersion ()
 

Static Public Member Functions

static void buttonHelper (const char *button_n, ISState state, void *context)
 
static void buttonHelper (const char *button_n, ISState state, void *context)
 

Public Attributes

enum INDI::Dome:: { ... }  DomeConnection
 
enum INDI::Dome:: { ... }  DomeConnection
 

Protected Member Functions

virtual bool SetSpeed (double rpm)
 SetSpeed Set Dome speed. More...
 
virtual IPState Move (DomeDirection dir, DomeMotionCommand operation)
 Move the Dome in a particular direction. More...
 
virtual IPState MoveAbs (double az)
 Move the Dome to an absolute azimuth. More...
 
virtual IPState MoveRel (double azDiff)
 Move the Dome to an relative position. More...
 
virtual bool Abort ()
 Abort all dome motion. More...
 
virtual IPState Park ()
 Goto Park Position. More...
 
virtual IPState UnPark ()
 UnPark dome. More...
 
virtual IPState ControlShutter (ShutterOperation operation)
 Open or Close shutter. More...
 
const char * GetShutterStatusString (ShutterStatus status)
 getShutterStatusString More...
 
void SetParkDataType (DomeParkData type)
 setParkDataType Sets the type of parking data stored in the park data file and presented to the user. More...
 
bool InitPark ()
 InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking position. More...
 
bool isParked ()
 isParked is dome currently parked? More...
 
void SetParked (bool isparked)
 SetParked Change the mount parking status. More...
 
double GetAxis1Park ()
 
double GetAxis1ParkDefault ()
 
void SetAxis1Park (double value)
 SetRAPark Set current AZ parking position. More...
 
void SetAxis1ParkDefault (double steps)
 SetAxis1Park Set default AZ parking position. More...
 
virtual bool SetCurrentPark ()
 SetCurrentPark Set current coordinates/encoders value as the desired parking position. More...
 
virtual bool SetDefaultPark ()
 SetDefaultPark Set default coordinates/encoders value as the desired parking position. More...
 
char * LoadParkData ()
 
bool WriteParkData ()
 
bool GetTargetAz (double &Az, double &Alt, double &minAz, double &maxAz)
 GetTargetAz. More...
 
bool Intersection (point3D p1, point3D p2, double r, double &mu1, double &mu2)
 Intersection Calculate the intersection of a ray and a sphere. More...
 
bool OpticalCenter (point3D MountCenter, double dOpticalAxis, double Lat, double Ah, point3D &OP)
 OpticalCenter This function calculates the distance from the optical axis to the Dome center. More...
 
bool OpticalVector (double Az, double Alt, point3D &OV)
 OpticalVector This function calculates a second point for determining the optical axis. More...
 
bool CheckHorizon (double HA, double dec, double lat)
 CheckHorizon Returns true if telescope points above horizon. More...
 
virtual bool saveConfigItems (FILE *fp)
 saveConfigItems Saves the Device Port and Dome Presets in the configuration file More...
 
void UpdateMountCoords ()
 updateCoords updates the horizontal coordinates (Az & Alt) of the mount from the snooped RA, DEC and observer's location. More...
 
virtual void UpdateAutoSync ()
 UpdateAutoSync This function calculates the target dome azimuth from the mount's target coordinates given the dome parameters. More...
 
virtual bool Handshake ()
 perform handshake with device to check communication More...
 
double Csc (double x)
 
double Sec (double x)
 
virtual bool SetSpeed (double rpm)
 SetSpeed Set Dome speed. More...
 
virtual IPState Move (DomeDirection dir, DomeMotionCommand operation)
 Move the Dome in a particular direction. More...
 
virtual IPState MoveAbs (double az)
 Move the Dome to an absolute azimuth. More...
 
virtual IPState MoveRel (double azDiff)
 Move the Dome to an relative position. More...
 
virtual bool Abort ()
 Abort all dome motion. More...
 
virtual IPState Park ()
 Goto Park Position. More...
 
virtual IPState UnPark ()
 UnPark dome. More...
 
virtual IPState ControlShutter (ShutterOperation operation)
 Open or Close shutter. More...
 
const char * GetShutterStatusString (ShutterStatus status)
 getShutterStatusString More...
 
void SetParkDataType (DomeParkData type)
 setParkDataType Sets the type of parking data stored in the park data file and presented to the user. More...
 
bool InitPark ()
 InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking position. More...
 
bool isParked ()
 isParked is dome currently parked? More...
 
void SetParked (bool isparked)
 SetParked Change the mount parking status. More...
 
double GetAxis1Park ()
 
double GetAxis1ParkDefault ()
 
void SetAxis1Park (double value)
 SetRAPark Set current AZ parking position. More...
 
void SetAxis1ParkDefault (double steps)
 SetAxis1Park Set default AZ parking position. More...
 
virtual bool SetCurrentPark ()
 SetCurrentPark Set current coordinates/encoders value as the desired parking position. More...
 
virtual bool SetDefaultPark ()
 SetDefaultPark Set default coordinates/encoders value as the desired parking position. More...
 
char * LoadParkData ()
 
bool WriteParkData ()
 
bool GetTargetAz (double &Az, double &Alt, double &minAz, double &maxAz)
 GetTargetAz. More...
 
bool Intersection (point3D p1, point3D p2, double r, double &mu1, double &mu2)
 Intersection Calculate the intersection of a ray and a sphere. More...
 
bool OpticalCenter (point3D MountCenter, double dOpticalAxis, double Lat, double Ah, point3D &OP)
 OpticalCenter This function calculates the distance from the optical axis to the Dome center. More...
 
bool OpticalVector (double Az, double Alt, point3D &OV)
 OpticalVector This function calculates a second point for determining the optical axis. More...
 
bool CheckHorizon (double HA, double dec, double lat)
 CheckHorizon Returns true if telescope points above horizon. More...
 
virtual bool saveConfigItems (FILE *fp)
 saveConfigItems Saves the Device Port and Dome Presets in the configuration file More...
 
void UpdateMountCoords ()
 updateCoords updates the horizontal coordinates (Az & Alt) of the mount from the snooped RA, DEC and observer's location. More...
 
virtual void UpdateAutoSync ()
 UpdateAutoSync This function calculates the target dome azimuth from the mount's target coordinates given the dome parameters. More...
 
virtual bool Handshake ()
 perform handshake with device to check communication More...
 
double Csc (double x)
 
double Sec (double x)
 
- Protected Member Functions inherited from INDI::DefaultDevice
void setDynamicPropertiesBehavior (bool defineEnabled, bool deleteEnabled)
 setDynamicPropertiesBehavior controls handling of dynamic properties. More...
 
virtual bool loadConfig (bool silent=false, const char *property=nullptr)
 Load the last saved configuration file. More...
 
virtual bool saveConfig (bool silent=false, const char *property=nullptr)
 Save the current properties in a configuration file. More...
 
virtual bool saveAllConfigItems (FILE *fp)
 saveAllConfigItems Save all the drivers' properties in the configuration file More...
 
virtual bool loadDefaultConfig ()
 Load the default configuration file. More...
 
void setDebug (bool enable)
 Toggle driver debug status A driver can be more verbose if Debug option is enabled by the client. More...
 
void setSimulation (bool enable)
 Toggle driver simulation status A driver can run in simulation mode if Simulation option is enabled by the client. More...
 
virtual void debugTriggered (bool enable)
 Inform driver that the debug option was triggered. More...
 
virtual void simulationTriggered (bool enable)
 Inform driver that the simulation option was triggered. More...
 
bool isDebug ()
 
bool isSimulation ()
 
virtual bool Connect ()
 Connect to the device. More...
 
virtual bool Disconnect ()
 Disconnect from device. More...
 
void registerConnection (Connection::Interface *newConnection)
 registerConnection Add new connection plugin to the existing connection pool. More...
 
bool unRegisterConnection (Connection::Interface *existingConnection)
 unRegisterConnection Remove connection from existing pool More...
 
Connection::InterfacegetActiveConnection ()
 
void setDefaultPollingPeriod (uint32_t period)
 
uint32_t getPollingPeriod ()
 
virtual const char * getDefaultName ()=0
 
void setDynamicPropertiesBehavior (bool defineEnabled, bool deleteEnabled)
 setDynamicPropertiesBehavior controls handling of dynamic properties. More...
 
virtual bool loadConfig (bool silent=false, const char *property=nullptr)
 Load the last saved configuration file. More...
 
virtual bool saveConfig (bool silent=false, const char *property=nullptr)
 Save the current properties in a configuration file. More...
 
virtual bool saveAllConfigItems (FILE *fp)
 saveAllConfigItems Save all the drivers' properties in the configuration file More...
 
virtual bool loadDefaultConfig ()
 Load the default configuration file. More...
 
void setDebug (bool enable)
 Toggle driver debug status A driver can be more verbose if Debug option is enabled by the client. More...
 
void setSimulation (bool enable)
 Toggle driver simulation status A driver can run in simulation mode if Simulation option is enabled by the client. More...
 
virtual void debugTriggered (bool enable)
 Inform driver that the debug option was triggered. More...
 
virtual void simulationTriggered (bool enable)
 Inform driver that the simulation option was triggered. More...
 
bool isDebug ()
 
bool isSimulation ()
 
virtual bool Connect ()
 Connect to the device. More...
 
virtual bool Disconnect ()
 Disconnect from device. More...
 
void registerConnection (Connection::Interface *newConnection)
 registerConnection Add new connection plugin to the existing connection pool. More...
 
bool unRegisterConnection (Connection::Interface *existingConnection)
 unRegisterConnection Remove connection from existing pool More...
 
Connection::InterfacegetActiveConnection ()
 
void setDefaultPollingPeriod (uint32_t period)
 
uint32_t getPollingPeriod ()
 
virtual const char * getDefaultName ()=0
 
- Protected Member Functions inherited from INDI::BaseDevice
int buildProp (XMLEle *root, char *errmsg)
 Build a property given the supplied XML element (defXXX) More...
 
int setValue (XMLEle *root, char *errmsg)
 handle SetXXX commands from client More...
 
int setBLOB (IBLOBVectorProperty *pp, XMLEle *root, char *errmsg)
 Parse and store BLOB in the respective vector. More...
 
int buildProp (XMLEle *root, char *errmsg)
 Build a property given the supplied XML element (defXXX) More...
 
int setValue (XMLEle *root, char *errmsg)
 handle SetXXX commands from client More...
 
int setBLOB (IBLOBVectorProperty *pp, XMLEle *root, char *errmsg)
 Parse and store BLOB in the respective vector. More...
 

Protected Attributes

INumberVectorProperty DomeSpeedNP
 
INumber DomeSpeedN [1]
 
ISwitchVectorProperty DomeMotionSP
 
ISwitch DomeMotionS [2]
 
INumberVectorProperty DomeAbsPosNP
 
INumber DomeAbsPosN [1]
 
INumberVectorProperty DomeRelPosNP
 
INumber DomeRelPosN [1]
 
ISwitchVectorProperty AbortSP
 
ISwitch AbortS [1]
 
INumberVectorProperty DomeParamNP
 
INumber DomeParamN [1]
 
ISwitchVectorProperty DomeShutterSP
 
ISwitch DomeShutterS [2]
 
ISwitchVectorProperty ParkSP
 
ISwitch ParkS [2]
 
INumber ParkPositionN [1]
 
INumberVectorProperty ParkPositionNP
 
ISwitch ParkOptionS [3]
 
ISwitchVectorProperty ParkOptionSP
 
ISwitch AutoParkS [2]
 
ISwitchVectorProperty AutoParkSP
 
uint32_t capability
 
ShutterStatus shutterState
 
DomeParkData parkDataType
 
ITextVectorProperty ActiveDeviceTP
 
IText ActiveDeviceT [2] {}
 
ISwitchVectorProperty TelescopeClosedLockTP
 
ISwitch TelescopeClosedLockT [2]
 
INumber PresetN [3]
 
INumberVectorProperty PresetNP
 
ISwitch PresetGotoS [3]
 
ISwitchVectorProperty PresetGotoSP
 
INumber DomeMeasurementsN [6]
 
INumberVectorProperty DomeMeasurementsNP
 
ISwitchVectorProperty OTASideSP
 
ISwitch OTASideS [2]
 
ISwitchVectorProperty DomeAutoSyncSP
 
ISwitch DomeAutoSyncS [2]
 
double prev_az
 
double prev_alt
 
double prev_ra
 
double prev_dec
 
int PortFD = -1
 
Connection::SerialserialConnection = NULL
 
Connection::TCPtcpConnection = NULL
 
DomeState domeState
 
IPState mountState
 
IPState weatherState
 
struct ln_lnlat_posn observer
 
bool HaveLatLong = false
 
struct ln_hrz_posn mountHoriztonalCoords
 
struct ln_equ_posn mountEquatorialCoords
 
bool HaveRaDec = false
 
- Protected Attributes inherited from INDI::DefaultDevice
uint32_t POLLMS = 1000
 Period in milliseconds to call TimerHit(). Default 1000 ms. More...
 

Private Member Functions

void processButton (const char *button_n, ISState state)
 
void triggerSnoop (const char *driverName, const char *propertyName)
 
bool callHandshake ()
 
void processButton (const char *button_n, ISState state)
 
void triggerSnoop (const char *driverName, const char *propertyName)
 
bool callHandshake ()
 

Private Attributes

Controllercontroller = nullptr
 
bool IsParked = false
 
bool IsMountParked = false
 
bool IsLocked = true
 
const char * ParkDeviceName
 
const char * Parkdatafile
 
XMLEleParkdataXmlRoot
 
XMLEleParkdeviceXml
 
XMLEleParkstatusXml
 
XMLEleParkpositionXml
 
XMLEleParkpositionAxis1Xml
 
double Axis1ParkPosition
 
double Axis1DefaultParkPosition
 
uint8_t domeConnection = CONNECTION_SERIAL | CONNECTION_TCP
 

Detailed Description


Class to provide general functionality of a Dome device.

Both relative and absolute position domes are supported. Furthermore, if no position feedback is available from the dome, an open-loop control is possible with simple direction commands (Clockwise and counter clockwise).

Before using any of the dome functions, you must define the capabilities of the dome by calling SetDomeCapability() function. All positions are represented as degrees of azimuth.

Relative motion is specified in degrees as either positive (clock wise direction), or negative (counter clock-wise direction).

Slaving is used to synchronizes the dome's azimuth position with that of the mount. The mount's coordinates are snooped from the active mount that has its name specified in ACTIVE_TELESCOPE property in the ACTIVE_DEVICES vector. Dome motion begins when it receives TARGET_EOD_COORD property from the mount driver when the mount starts slewing to the desired target coordinates /em OR when the mount's current tracking position exceeds the AutoSync threshold. Therefore, slaving is performed while slewing and tracking. The user is required to fill in all required parameters before slaving can be used. The AutoSync threshold is the difference in degrees between the dome's azimuth angle and the mount's azimuth angle that should trigger a dome motion. By default, it is set to 0.5 degrees which would trigger dome motion due to any difference between the dome and mount azimuth angles that exceeds 0.5 degrees. For example, if the threshold is set to 5 degrees, the dome will only start moving to sync with the mount's azimuth angle once the difference in azimuth angles is equal or exceeds 5 degrees.

Custom parking position is available for absolute/relative position domes.

For roll-off observatories, parking state reflects whether the roof is closed or open.

Developers need to subclass INDI::Dome to implement any driver for Domes within INDI.

Note
The code used calculate dome target AZ and ZD is written by Ferran Casarramona, and adapted from code from Markus Wildi. The transformations are based on the paper Matrix Method for Coodinates Transformation written by Toshimi Taki (http://www.asahi-net.or.jp/~zs3t-tk).
Author
Jasem Mutlaq

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DOME_CAN_ABORT 

Can the dome motion be aborted?

DOME_CAN_ABS_MOVE 

Can the dome move to an absolute azimuth position?

DOME_CAN_REL_MOVE 

Can the dome move to a relative position a number of degrees away from current position? Positive degress is Clockwise direction. Negative Degrees is counter clock wise direction

DOME_CAN_PARK 

Can the dome park and unpark itself?

DOME_HAS_SHUTTER 

Does the dome has a shutter than can be opened and closed electronically?

DOME_HAS_VARIABLE_SPEED 

Can the dome move in different configurable speeds?

◆ anonymous enum

anonymous enum
Enumerator
CONNECTION_NONE 
CONNECTION_SERIAL 

Do not use any connection plugin.

CONNECTION_TCP 

For regular serial and bluetooth connections.

◆ anonymous enum

anonymous enum
Enumerator
DOME_CAN_ABORT 

Can the dome motion be aborted?

DOME_CAN_ABS_MOVE 

Can the dome move to an absolute azimuth position?

DOME_CAN_REL_MOVE 

Can the dome move to a relative position a number of degrees away from current position? Positive degress is Clockwise direction. Negative Degrees is counter clock wise direction

DOME_CAN_PARK 

Can the dome park and unpark itself?

DOME_HAS_SHUTTER 

Does the dome has a shutter than can be opened and closed electronically?

DOME_HAS_VARIABLE_SPEED 

Can the dome move in different configurable speeds?

◆ anonymous enum

anonymous enum
Enumerator
CONNECTION_NONE 
CONNECTION_SERIAL 

Do not use any connection plugin.

CONNECTION_TCP 

For regular serial and bluetooth connections.

◆ DomeDirection [1/2]

Enumerator
DOME_CW 
DOME_CCW 
DOME_CW 
DOME_CCW 

◆ DomeDirection [2/2]

Enumerator
DOME_CW 
DOME_CCW 
DOME_CW 
DOME_CCW 

◆ DomeMeasurements [1/2]

Measurements necessary for dome-slit synchronization.

All values are in meters. The displacements are measured from the true dome centre, and the dome is assumed spherical.

Note
: The mount centre is the point where RA and Dec. axis crosses, no matter the kind of mount. For example, for a fork mount this displacement is typically 0 if it's perfectly centred with RA axis.
Enumerator
DM_DOME_RADIUS 

Dome RADIUS

DM_SHUTTER_WIDTH 

Shutter width

DM_NORTH_DISPLACEMENT 

Displacement to north of the mount center

DM_EAST_DISPLACEMENT 

Displacement to east of the mount center

DM_UP_DISPLACEMENT 

Up Displacement of the mount center

DM_OTA_OFFSET 

Distance from the optical axis to the mount center

DM_DOME_RADIUS 

Dome RADIUS

DM_SHUTTER_WIDTH 

Shutter width

DM_NORTH_DISPLACEMENT 

Displacement to north of the mount center

DM_EAST_DISPLACEMENT 

Displacement to east of the mount center

DM_UP_DISPLACEMENT 

Up Displacement of the mount center

DM_OTA_OFFSET 

Distance from the optical axis to the mount center

◆ DomeMeasurements [2/2]

Enumerator
DM_DOME_RADIUS 

Dome RADIUS

DM_SHUTTER_WIDTH 

Shutter width

DM_NORTH_DISPLACEMENT 

Displacement to north of the mount center

DM_EAST_DISPLACEMENT 

Displacement to east of the mount center

DM_UP_DISPLACEMENT 

Up Displacement of the mount center

DM_OTA_OFFSET 

Distance from the optical axis to the mount center

DM_DOME_RADIUS 

Dome RADIUS

DM_SHUTTER_WIDTH 

Shutter width

DM_NORTH_DISPLACEMENT 

Displacement to north of the mount center

DM_EAST_DISPLACEMENT 

Displacement to east of the mount center

DM_UP_DISPLACEMENT 

Up Displacement of the mount center

DM_OTA_OFFSET 

Distance from the optical axis to the mount center

◆ DomeMotionCommand [1/2]

Enumerator
MOTION_START 
MOTION_STOP 
MOTION_START 
MOTION_STOP 

◆ DomeMotionCommand [2/2]

Enumerator
MOTION_START 
MOTION_STOP 
MOTION_START 
MOTION_STOP 

◆ DomeParkData [1/2]

Dome Parking data type enum

Enumerator
PARK_NONE 

Open loop Parking

PARK_AZ 

Parking via azimuth angle control

PARK_AZ_ENCODER 

Parking via azimuth encoder control

PARK_NONE 

Open loop Parking

PARK_AZ 

Parking via azimuth angle control

PARK_AZ_ENCODER 

Parking via azimuth encoder control

◆ DomeParkData [2/2]

Dome Parking data type enum

Enumerator
PARK_NONE 

Open loop Parking

PARK_AZ 

Parking via azimuth angle control

PARK_AZ_ENCODER 

Parking via azimuth encoder control

PARK_NONE 

Open loop Parking

PARK_AZ 

Parking via azimuth angle control

PARK_AZ_ENCODER 

Parking via azimuth encoder control

◆ DomeState [1/2]

Dome status.

Enumerator
DOME_IDLE 

Dome is idle

DOME_MOVING 

Dome is in motion

DOME_SYNCED 

Dome is synced

DOME_PARKING 

Dome is parking

DOME_UNPARKING 

Dome is unparking

DOME_PARKED 

Dome is parked

DOME_UNPARKED 

Dome is unparked

DOME_IDLE 

Dome is idle

DOME_MOVING 

Dome is in motion

DOME_SYNCED 

Dome is synced

DOME_PARKING 

Dome is parking

DOME_UNPARKING 

Dome is unparking

DOME_PARKED 

Dome is parked

DOME_UNPARKED 

Dome is unparked

◆ DomeState [2/2]

Enumerator
DOME_IDLE 

Dome is idle

DOME_MOVING 

Dome is in motion

DOME_SYNCED 

Dome is synced

DOME_PARKING 

Dome is parking

DOME_UNPARKING 

Dome is unparking

DOME_PARKED 

Dome is parked

DOME_UNPARKED 

Dome is unparked

DOME_IDLE 

Dome is idle

DOME_MOVING 

Dome is in motion

DOME_SYNCED 

Dome is synced

DOME_PARKING 

Dome is parking

DOME_UNPARKING 

Dome is unparking

DOME_PARKED 

Dome is parked

DOME_UNPARKED 

Dome is unparked

◆ ShutterOperation [1/2]

Shutter operation command.

Enumerator
SHUTTER_OPEN 

Open Shutter

SHUTTER_CLOSE 

Close Shutter

SHUTTER_OPEN 

Open Shutter

SHUTTER_CLOSE 

Close Shutter

◆ ShutterOperation [2/2]

Enumerator
SHUTTER_OPEN 

Open Shutter

SHUTTER_CLOSE 

Close Shutter

SHUTTER_OPEN 

Open Shutter

SHUTTER_CLOSE 

Close Shutter

◆ ShutterStatus [1/2]

Shutter Status.

Enumerator
SHUTTER_OPENED 

Shutter is open

SHUTTER_CLOSED 

Shutter is closed

SHUTTER_MOVING 

Shutter is in motion

SHUTTER_UNKNOWN 

Shutter status is unknown

SHUTTER_OPENED 

Shutter is open

SHUTTER_CLOSED 

Shutter is closed

SHUTTER_MOVING 

Shutter is in motion

SHUTTER_UNKNOWN 

Shutter status is unknown

◆ ShutterStatus [2/2]

Enumerator
SHUTTER_OPENED 

Shutter is open

SHUTTER_CLOSED 

Shutter is closed

SHUTTER_MOVING 

Shutter is in motion

SHUTTER_UNKNOWN 

Shutter status is unknown

SHUTTER_OPENED 

Shutter is open

SHUTTER_CLOSED 

Shutter is closed

SHUTTER_MOVING 

Shutter is in motion

SHUTTER_UNKNOWN 

Shutter status is unknown

Constructor & Destructor Documentation

◆ Dome() [1/2]

Dome::Dome ( )

◆ ~Dome() [1/2]

Dome::~Dome ( )
virtual

◆ Dome() [2/2]

INDI::Dome::Dome ( )

◆ ~Dome() [2/2]

virtual INDI::Dome::~Dome ( )
virtual

Member Function Documentation

◆ Abort() [1/2]

bool Dome::Abort ( )
protectedvirtual

Abort all dome motion.

Returns
True if abort is successful, false otherwise.

Reimplemented in NexDome, BaaderDome, MaxDomeII, DomeSim, DomeScript, and RollOff.

◆ Abort() [2/2]

virtual bool INDI::Dome::Abort ( )
protectedvirtual

Abort all dome motion.

Returns
True if abort is successful, false otherwise.

Reimplemented in NexDome, BaaderDome, MaxDomeII, DomeSim, DomeScript, and RollOff.

◆ buttonHelper() [1/2]

static void INDI::Dome::buttonHelper ( const char *  button_n,
ISState  state,
void *  context 
)
static

◆ buttonHelper() [2/2]

void Dome::buttonHelper ( const char *  button_n,
ISState  state,
void *  context 
)
static

◆ callHandshake() [1/2]

bool Dome::callHandshake ( )
private

◆ callHandshake() [2/2]

bool INDI::Dome::callHandshake ( )
private

◆ CanAbort() [1/2]

bool INDI::Dome::CanAbort ( )
inline
Returns
True if dome support aborting motion

◆ CanAbort() [2/2]

bool INDI::Dome::CanAbort ( )
inline
Returns
True if dome support aborting motion

◆ CanAbsMove() [1/2]

bool INDI::Dome::CanAbsMove ( )
inline
Returns
True if dome has absolute postion encoders.

◆ CanAbsMove() [2/2]

bool INDI::Dome::CanAbsMove ( )
inline
Returns
True if dome has absolute postion encoders.

◆ CanPark() [1/2]

bool INDI::Dome::CanPark ( )
inline
Returns
True if dome can park.

◆ CanPark() [2/2]

bool INDI::Dome::CanPark ( )
inline
Returns
True if dome can park.

◆ CanRelMove() [1/2]

bool INDI::Dome::CanRelMove ( )
inline
Returns
True if dome has relative position encoders.

◆ CanRelMove() [2/2]

bool INDI::Dome::CanRelMove ( )
inline
Returns
True if dome has relative position encoders.

◆ CheckHorizon() [1/2]

bool Dome::CheckHorizon ( double  HA,
double  dec,
double  lat 
)
protected

CheckHorizon Returns true if telescope points above horizon.

Parameters
HAHour angle
decDeclination
latobserver's latitude
Returns
True if telescope points above horizon, false otherwise.

◆ CheckHorizon() [2/2]

bool INDI::Dome::CheckHorizon ( double  HA,
double  dec,
double  lat 
)
protected

CheckHorizon Returns true if telescope points above horizon.

Parameters
HAHour angle
decDeclination
latobserver's latitude
Returns
True if telescope points above horizon, false otherwise.

◆ ControlShutter() [1/2]

virtual IPState INDI::Dome::ControlShutter ( ShutterOperation  operation)
protectedvirtual

Open or Close shutter.

Parameters
operationEither open or close the shutter.
Returns
Return IPS_OK if shutter operation is complete. Return IPS_BUSY if shutter operation is in progress. Return IPS_ALERT if there is an error.

Reimplemented in NexDome, MaxDomeII, BaaderDome, DomeSim, and DomeScript.

◆ ControlShutter() [2/2]

IPState Dome::ControlShutter ( ShutterOperation  operation)
protectedvirtual

Open or Close shutter.

Parameters
operationEither open or close the shutter.
Returns
Return IPS_OK if shutter operation is complete. Return IPS_BUSY if shutter operation is in progress. Return IPS_ALERT if there is an error.

Reimplemented in NexDome, MaxDomeII, BaaderDome, DomeSim, and DomeScript.

◆ Csc() [1/2]

double Dome::Csc ( double  x)
protected

◆ Csc() [2/2]

double INDI::Dome::Csc ( double  x)
protected

◆ GetAxis1Park() [1/2]

double Dome::GetAxis1Park ( )
protected
Returns
Get current AZ parking position.

◆ GetAxis1Park() [2/2]

double INDI::Dome::GetAxis1Park ( )
protected
Returns
Get current AZ parking position.

◆ GetAxis1ParkDefault() [1/2]

double Dome::GetAxis1ParkDefault ( )
protected
Returns
Get default AZ parking position.

◆ GetAxis1ParkDefault() [2/2]

double INDI::Dome::GetAxis1ParkDefault ( )
protected
Returns
Get default AZ parking position.

◆ GetDomeCapability() [1/2]

uint32_t INDI::Dome::GetDomeCapability ( ) const
inline

GetDomeCapability returns the capability of the dome.

◆ GetDomeCapability() [2/2]

uint32_t INDI::Dome::GetDomeCapability ( ) const
inline

GetDomeCapability returns the capability of the dome.

◆ getDomeConnection() [1/2]

uint8_t INDI::Dome::getDomeConnection ( ) const
Returns
Get current Dome connection mode

◆ getDomeConnection() [2/2]

uint8_t Dome::getDomeConnection ( ) const
Returns
Get current Dome connection mode

◆ getDomeState() [1/2]

DomeState INDI::Dome::getDomeState ( ) const

◆ getDomeState() [2/2]

DomeState INDI::Dome::getDomeState ( ) const

◆ getMountState() [1/2]

IPState INDI::Dome::getMountState ( ) const

◆ getMountState() [2/2]

IPState Dome::getMountState ( ) const

◆ GetShutterStatusString() [1/2]

const char * Dome::GetShutterStatusString ( ShutterStatus  status)
protected

getShutterStatusString

Parameters
statusStatus of shutter
Returns
Returns string representation of the shutter status

◆ GetShutterStatusString() [2/2]

const char* INDI::Dome::GetShutterStatusString ( ShutterStatus  status)
protected

getShutterStatusString

Parameters
statusStatus of shutter
Returns
Returns string representation of the shutter status

◆ GetTargetAz() [1/2]

bool Dome::GetTargetAz ( double &  Az,
double &  Alt,
double &  minAz,
double &  maxAz 
)
protected

GetTargetAz.

Parameters
AzReturns Azimuth required to the dome in order to center the shutter aperture with telescope
Alt
minAzReturns Minimum azimuth in order to avoid any dome interference to the full aperture of the telescope
maxAzReturns Maximum azimuth in order to avoid any dome interference to the full aperture of the telescope
Returns
Returns false if it can't solve it due bad geometry of the observatory

◆ GetTargetAz() [2/2]

bool INDI::Dome::GetTargetAz ( double &  Az,
double &  Alt,
double &  minAz,
double &  maxAz 
)
protected

GetTargetAz.

Parameters
AzReturns Azimuth required to the dome in order to center the shutter aperture with telescope
Alt
minAzReturns Minimum azimuth in order to avoid any dome interference to the full aperture of the telescope
maxAzReturns Maximum azimuth in order to avoid any dome interference to the full aperture of the telescope
Returns
Returns false if it can't solve it due bad geometry of the observatory

◆ getWeatherState() [1/2]

IPState INDI::Dome::getWeatherState ( ) const

◆ getWeatherState() [2/2]

IPState Dome::getWeatherState ( ) const

◆ Handshake() [1/2]

bool Dome::Handshake ( )
protectedvirtual

perform handshake with device to check communication

Reimplemented in NexDome, BaaderDome, and MaxDomeII.

◆ Handshake() [2/2]

virtual bool INDI::Dome::Handshake ( )
protectedvirtual

perform handshake with device to check communication

Reimplemented in NexDome, BaaderDome, and MaxDomeII.

◆ HasShutter() [1/2]

bool INDI::Dome::HasShutter ( )
inline
Returns
True if dome has controllable shutter door

◆ HasShutter() [2/2]

bool INDI::Dome::HasShutter ( )
inline
Returns
True if dome has controllable shutter door

◆ HasVariableSpeed() [1/2]

bool INDI::Dome::HasVariableSpeed ( )
inline
Returns
True if dome support multiple speeds

◆ HasVariableSpeed() [2/2]

bool INDI::Dome::HasVariableSpeed ( )
inline
Returns
True if dome support multiple speeds

◆ InitPark() [1/2]

bool Dome::InitPark ( )
protected

InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking position.

InitPark() should be called after successful connection to the dome on startup.

Returns
True if loading is successful and data is read, false otherwise. On success, you must call SetAzParkDefault() to set the default parking values. On failure, you must call SetAzParkDefault() to set the default parking values in addition to SetAzPark() to set the current parking position.

◆ InitPark() [2/2]

bool INDI::Dome::InitPark ( )
protected

InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking position.

InitPark() should be called after successful connection to the dome on startup.

Returns
True if loading is successful and data is read, false otherwise. On success, you must call SetAzParkDefault() to set the default parking values. On failure, you must call SetAzParkDefault() to set the default parking values in addition to SetAzPark() to set the current parking position.

◆ initProperties() [1/2]

bool Dome::initProperties ( )
virtual

Initilize properties initial state and value.

The child class must implement this function.

Returns
True if initilization is successful, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in BaaderDome, MaxDomeII, DomeSim, NexDome, DomeScript, and RollOff.

◆ initProperties() [2/2]

virtual bool INDI::Dome::initProperties ( )
virtual

Initilize properties initial state and value.

The child class must implement this function.

Returns
True if initilization is successful, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in BaaderDome, MaxDomeII, DomeSim, NexDome, DomeScript, and RollOff.

◆ Intersection() [1/2]

bool Dome::Intersection ( point3D  p1,
point3D  p2,
double  r,
double &  mu1,
double &  mu2 
)
protected

Intersection Calculate the intersection of a ray and a sphere.

The line segment is defined from p1 to p2. The sphere is of radius r and centered at (0,0,0). From http://local.wasp.uwa.edu.au/~pbourke/geometry/sphereline/ There are potentially two points of intersection given by p := p1 + mu1 (p2 - p1) p := p1 + mu2 (p2 - p1)

Parameters
p1First point
p2Direction of the ray
rRADIUS of sphere
mu1First point of potentional intersection.
mu2Second point of potentional intersection.
Returns
Returns FALSE if the ray doesn't intersect the sphere.

◆ Intersection() [2/2]

bool INDI::Dome::Intersection ( point3D  p1,
point3D  p2,
double  r,
double &  mu1,
double &  mu2 
)
protected

Intersection Calculate the intersection of a ray and a sphere.

The line segment is defined from p1 to p2. The sphere is of radius r and centered at (0,0,0). From http://local.wasp.uwa.edu.au/~pbourke/geometry/sphereline/ There are potentially two points of intersection given by p := p1 + mu1 (p2 - p1) p := p1 + mu2 (p2 - p1)

Parameters
p1First point
p2Direction of the ray
rRADIUS of sphere
mu1First point of potentional intersection.
mu2Second point of potentional intersection.
Returns
Returns FALSE if the ray doesn't intersect the sphere.

◆ ISGetProperties() [1/2]

void Dome::ISGetProperties ( const char *  dev)
virtual

define the driver's properties to the client.

Usually, only a minimum set of properties are defined to the client in this function if the device is in disconnected state. Those properties should be enough to enable the client to establish a connection to the device. In addition to CONNECT/DISCONNECT, such properties may include port name, IP address, etc. You should check if the device is already connected, and if this is true, then you must define the remainder of the the properties to the client in this function. Otherwise, the remainder of the driver's properties are defined to the client in updateProperties() function which is called when a client connects/disconnects from a device.

Parameters
devname of the device
Note
This function is called by the INDI framework, do not call it directly. See LX200 Generic driver for an example implementation

Reimplemented from INDI::DefaultDevice.

Reimplemented in DomeScript.

◆ ISGetProperties() [2/2]

virtual void INDI::Dome::ISGetProperties ( const char *  dev)
virtual

define the driver's properties to the client.

Usually, only a minimum set of properties are defined to the client in this function if the device is in disconnected state. Those properties should be enough to enable the client to establish a connection to the device. In addition to CONNECT/DISCONNECT, such properties may include port name, IP address, etc. You should check if the device is already connected, and if this is true, then you must define the remainder of the the properties to the client in this function. Otherwise, the remainder of the driver's properties are defined to the client in updateProperties() function which is called when a client connects/disconnects from a device.

Parameters
devname of the device
Note
This function is called by the INDI framework, do not call it directly. See LX200 Generic driver for an example implementation

Reimplemented from INDI::DefaultDevice.

Reimplemented in DomeScript.

◆ isLocked() [1/2]

bool INDI::Dome::isLocked ( )

isLocked, is the dome currently locked?

Returns
True if lock status equals true, and TelescopeClosedLockTP is Telescope Locks.

◆ isLocked() [2/2]

bool Dome::isLocked ( )

isLocked, is the dome currently locked?

Returns
True if lock status equals true, and TelescopeClosedLockTP is Telescope Locks.

◆ ISNewNumber() [1/2]

bool Dome::ISNewNumber ( const char *  dev,
const char *  name,
double  values[],
char *  names[],
int  n 
)
virtual

Process the client newNumber command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in MaxDomeII, and NexDome.

◆ ISNewNumber() [2/2]

virtual bool INDI::Dome::ISNewNumber ( const char *  dev,
const char *  name,
double  values[],
char *  names[],
int  n 
)
virtual

Process the client newNumber command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in MaxDomeII, and NexDome.

◆ ISNewSwitch() [1/2]

bool Dome::ISNewSwitch ( const char *  dev,
const char *  name,
ISState states,
char *  names[],
int  n 
)
virtual

Process the client newSwitch command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in BaaderDome, MaxDomeII, NexDome, and RollOff.

◆ ISNewSwitch() [2/2]

virtual bool INDI::Dome::ISNewSwitch ( const char *  dev,
const char *  name,
ISState states,
char *  names[],
int  n 
)
virtual

Process the client newSwitch command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in BaaderDome, MaxDomeII, NexDome, and RollOff.

◆ ISNewText() [1/2]

virtual bool INDI::Dome::ISNewText ( const char *  dev,
const char *  name,
char *  texts[],
char *  names[],
int  n 
)
virtual

Process the client newSwitch command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in DomeScript.

◆ ISNewText() [2/2]

bool Dome::ISNewText ( const char *  dev,
const char *  name,
char *  texts[],
char *  names[],
int  n 
)
virtual

Process the client newSwitch command.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in DomeScript.

◆ isParked() [1/2]

bool INDI::Dome::isParked ( )
protected

isParked is dome currently parked?

Returns
True if parked, false otherwise.

◆ isParked() [2/2]

bool Dome::isParked ( )
protected

isParked is dome currently parked?

Returns
True if parked, false otherwise.

◆ ISSnoopDevice() [1/2]

virtual bool INDI::Dome::ISSnoopDevice ( XMLEle root)
virtual

Process a snoop event from INDI server.

This function is called when a snooped property is updated in a snooped driver.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in RollOff.

◆ ISSnoopDevice() [2/2]

bool Dome::ISSnoopDevice ( XMLEle root)
virtual

Process a snoop event from INDI server.

This function is called when a snooped property is updated in a snooped driver.

Note
This function is called by the INDI framework, do not call it directly.
Returns
True if any property was successfully processed, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in RollOff.

◆ LoadParkData() [1/2]

char * Dome::LoadParkData ( )
protected

◆ LoadParkData() [2/2]

char* INDI::Dome::LoadParkData ( )
protected

◆ Move() [1/2]

virtual IPState INDI::Dome::Move ( DomeDirection  dir,
DomeMotionCommand  operation 
)
protectedvirtual

Move the Dome in a particular direction.

Parameters
dirDirection of Dome, either DOME_CW or DOME_CCW.
Returns
Return IPS_OK if dome operation is complete. IPS_BUSY if operation is in progress. IPS_ALERT on error.

Reimplemented in NexDome, MaxDomeII, DomeSim, RollOff, and DomeScript.

◆ Move() [2/2]

IPState Dome::Move ( DomeDirection  dir,
DomeMotionCommand  operation 
)
protectedvirtual

Move the Dome in a particular direction.

Parameters
dirDirection of Dome, either DOME_CW or DOME_CCW.
Returns
Return IPS_OK if dome operation is complete. IPS_BUSY if operation is in progress. IPS_ALERT on error.

Reimplemented in NexDome, MaxDomeII, DomeSim, RollOff, and DomeScript.

◆ MoveAbs() [1/2]

virtual IPState INDI::Dome::MoveAbs ( double  az)
protectedvirtual

Move the Dome to an absolute azimuth.

Parameters
azThe new position of the Dome.
Returns
Return IPS_OK if motion is completed and Dome reached requested position. Return IPS_BUSY if Dome started motion to requested position and is in progress. Return IPS_ALERT if there is an error.

Reimplemented in NexDome, BaaderDome, MaxDomeII, DomeSim, and DomeScript.

◆ MoveAbs() [2/2]

IPState Dome::MoveAbs ( double  az)
protectedvirtual

Move the Dome to an absolute azimuth.

Parameters
azThe new position of the Dome.
Returns
Return IPS_OK if motion is completed and Dome reached requested position. Return IPS_BUSY if Dome started motion to requested position and is in progress. Return IPS_ALERT if there is an error.

Reimplemented in NexDome, BaaderDome, MaxDomeII, DomeSim, and DomeScript.

◆ MoveRel() [1/2]

virtual IPState INDI::Dome::MoveRel ( double  azDiff)
protectedvirtual

Move the Dome to an relative position.

Parameters
azDiffThe relative azimuth angle to move. Positive degree is clock-wise direction. Negative degrees is counter clock-wise direction.
Returns
Return IPS_OK if motion is completed and Dome reached requested position. Return IPS_BUSY if Dome started motion to requested position and is in progress. Return IPS_ALERT if there is an error.

Reimplemented in BaaderDome, and DomeSim.

◆ MoveRel() [2/2]

IPState Dome::MoveRel ( double  azDiff)
protectedvirtual

Move the Dome to an relative position.

Parameters
azDiffThe relative azimuth angle to move. Positive degree is clock-wise direction. Negative degrees is counter clock-wise direction.
Returns
Return IPS_OK if motion is completed and Dome reached requested position. Return IPS_BUSY if Dome started motion to requested position and is in progress. Return IPS_ALERT if there is an error.

Reimplemented in BaaderDome, and DomeSim.

◆ OpticalCenter() [1/2]

bool INDI::Dome::OpticalCenter ( point3D  MountCenter,
double  dOpticalAxis,
double  Lat,
double  Ah,
point3D OP 
)
protected

OpticalCenter This function calculates the distance from the optical axis to the Dome center.

Parameters
MountCenterDistance from the Dome center to the point where mount axis crosses
dOpticalAxisDistance from the mount center to the optical axis.
LatLatitude
AhHour Angle (in hours)
OPa 3D point from the optical center to the Dome center.
Returns
false in case of error.

◆ OpticalCenter() [2/2]

bool Dome::OpticalCenter ( point3D  MountCenter,
double  dOpticalAxis,
double  Lat,
double  Ah,
point3D OP 
)
protected

OpticalCenter This function calculates the distance from the optical axis to the Dome center.

Parameters
MountCenterDistance from the Dome center to the point where mount axis crosses
dOpticalAxisDistance from the mount center to the optical axis.
LatLatitude
AhHour Angle (in hours)
OPa 3D point from the optical center to the Dome center.
Returns
false in case of error.

◆ OpticalVector() [1/2]

bool INDI::Dome::OpticalVector ( double  Az,
double  Alt,
point3D OV 
)
protected

OpticalVector This function calculates a second point for determining the optical axis.

Parameters
AzAzimuth
AltAltitude
OVa 3D point that determines the optical line.
Returns
false in case of error.

◆ OpticalVector() [2/2]

bool Dome::OpticalVector ( double  Az,
double  Alt,
point3D OV 
)
protected

OpticalVector This function calculates a second point for determining the optical axis.

Parameters
AzAzimuth
AltAltitude
OVa 3D point that determines the optical line.
Returns
false in case of error.

◆ Park() [1/2]

IPState Dome::Park ( )
protectedvirtual

Goto Park Position.

The park position is an absolute azimuth value.

Returns
Return IPS_OK if motion is completed and Dome reached park position. Return IPS_BUSY if Dome started motion to park requested position and is in progress. Return -IPS_ALERT if there is an error.

Reimplemented in NexDome, BaaderDome, DomeSim, DomeScript, and RollOff.

◆ Park() [2/2]

virtual IPState INDI::Dome::Park ( )
protectedvirtual

Goto Park Position.

The park position is an absolute azimuth value.

Returns
Return IPS_OK if motion is completed and Dome reached park position. Return IPS_BUSY if Dome started motion to park requested position and is in progress. Return -IPS_ALERT if there is an error.

Reimplemented in NexDome, BaaderDome, DomeSim, DomeScript, and RollOff.

◆ processButton() [1/2]

void Dome::processButton ( const char *  button_n,
ISState  state 
)
private

◆ processButton() [2/2]

void INDI::Dome::processButton ( const char *  button_n,
ISState  state 
)
private

◆ saveConfigItems() [1/2]

bool Dome::saveConfigItems ( FILE *  fp)
protectedvirtual

saveConfigItems Saves the Device Port and Dome Presets in the configuration file

Parameters
fppointer to configuration file
Returns
true if successful, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in BaaderDome, MaxDomeII, RollOff, and DomeScript.

◆ saveConfigItems() [2/2]

virtual bool INDI::Dome::saveConfigItems ( FILE *  fp)
protectedvirtual

saveConfigItems Saves the Device Port and Dome Presets in the configuration file

Parameters
fppointer to configuration file
Returns
true if successful, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in BaaderDome, MaxDomeII, RollOff, and DomeScript.

◆ Sec() [1/2]

double Dome::Sec ( double  x)
protected

◆ Sec() [2/2]

double INDI::Dome::Sec ( double  x)
protected

◆ SetAxis1Park() [1/2]

void Dome::SetAxis1Park ( double  value)
protected

SetRAPark Set current AZ parking position.

The data park file (stored in ~/.indi/ParkData.xml) is updated in the process.

Parameters
valuecurrent Axis 1 value (AZ either in angles or encoder values as specificed by the DomeParkData type).

◆ SetAxis1Park() [2/2]

void INDI::Dome::SetAxis1Park ( double  value)
protected

SetRAPark Set current AZ parking position.

The data park file (stored in ~/.indi/ParkData.xml) is updated in the process.

Parameters
valuecurrent Axis 1 value (AZ either in angles or encoder values as specificed by the DomeParkData type).

◆ SetAxis1ParkDefault() [1/2]

void Dome::SetAxis1ParkDefault ( double  steps)
protected

SetAxis1Park Set default AZ parking position.

Parameters
valueDefault Axis 1 value (AZ either in angles or encoder values as specificed by the DomeParkData type).

◆ SetAxis1ParkDefault() [2/2]

void INDI::Dome::SetAxis1ParkDefault ( double  steps)
protected

SetAxis1Park Set default AZ parking position.

Parameters
valueDefault Axis 1 value (AZ either in angles or encoder values as specificed by the DomeParkData type).

◆ SetCurrentPark() [1/2]

bool Dome::SetCurrentPark ( )
protectedvirtual

SetCurrentPark Set current coordinates/encoders value as the desired parking position.

Note
This function performs no action unless subclassed by the child class if required.

Reimplemented in NexDome, BaaderDome, MaxDomeII, and DomeSim.

◆ SetCurrentPark() [2/2]

virtual bool INDI::Dome::SetCurrentPark ( )
protectedvirtual

SetCurrentPark Set current coordinates/encoders value as the desired parking position.

Note
This function performs no action unless subclassed by the child class if required.

Reimplemented in NexDome, BaaderDome, MaxDomeII, and DomeSim.

◆ SetDefaultPark() [1/2]

bool Dome::SetDefaultPark ( )
protectedvirtual

SetDefaultPark Set default coordinates/encoders value as the desired parking position.

Note
This function performs no action unless subclassed by the child class if required.

Reimplemented in NexDome, BaaderDome, MaxDomeII, and DomeSim.

◆ SetDefaultPark() [2/2]

virtual bool INDI::Dome::SetDefaultPark ( )
protectedvirtual

SetDefaultPark Set default coordinates/encoders value as the desired parking position.

Note
This function performs no action unless subclassed by the child class if required.

Reimplemented in NexDome, BaaderDome, MaxDomeII, and DomeSim.

◆ SetDomeCapability() [1/2]

void Dome::SetDomeCapability ( uint32_t  cap)

SetDomeCapability set the dome capabilities.

All capabilities must be initialized.

Parameters
cappointer to dome capability

◆ SetDomeCapability() [2/2]

void INDI::Dome::SetDomeCapability ( uint32_t  cap)

SetDomeCapability set the dome capabilities.

All capabilities must be initialized.

Parameters
cappointer to dome capability

◆ setDomeConnection() [1/2]

void INDI::Dome::setDomeConnection ( const uint8_t value)

setDomeConnection Set Dome connection mode.

Child class should call this in the constructor before Dome registers any connection interfaces

Parameters
valueORed combination of DomeConnection values.

◆ setDomeConnection() [2/2]

void Dome::setDomeConnection ( const uint8_t value)

setDomeConnection Set Dome connection mode.

Child class should call this in the constructor before Dome registers any connection interfaces

Parameters
valueORed combination of DomeConnection values.

◆ setDomeState() [1/2]

void Dome::setDomeState ( const DomeState value)

◆ setDomeState() [2/2]

void INDI::Dome::setDomeState ( const DomeState value)

◆ SetParkDataType() [1/2]

void INDI::Dome::SetParkDataType ( DomeParkData  type)
protected

setParkDataType Sets the type of parking data stored in the park data file and presented to the user.

Parameters
typeparking data type. If PARK_NONE then no properties will be presented to the user for custom parking position.

◆ SetParkDataType() [2/2]

void Dome::SetParkDataType ( Dome::DomeParkData  type)
protected

setParkDataType Sets the type of parking data stored in the park data file and presented to the user.

Parameters
typeparking data type. If PARK_NONE then no properties will be presented to the user for custom parking position.

◆ SetParked() [1/2]

void INDI::Dome::SetParked ( bool  isparked)
protected

SetParked Change the mount parking status.

The data park file (stored in ~/.indi/ParkData.xml) is updated in the process.

Parameters
isparkedset to true if parked, false otherwise.

◆ SetParked() [2/2]

void Dome::SetParked ( bool  isparked)
protected

SetParked Change the mount parking status.

The data park file (stored in ~/.indi/ParkData.xml) is updated in the process.

Parameters
isparkedset to true if parked, false otherwise.

◆ SetSpeed() [1/2]

virtual bool INDI::Dome::SetSpeed ( double  rpm)
protectedvirtual

SetSpeed Set Dome speed.

This does not initiate motion, it sets the speed for the next motion command. If motion is in progress, then change speed accordingly.

Parameters
rpmDome speed (RPM)
Returns
true if successful, false otherwise

◆ SetSpeed() [2/2]

bool Dome::SetSpeed ( double  rpm)
protectedvirtual

SetSpeed Set Dome speed.

This does not initiate motion, it sets the speed for the next motion command. If motion is in progress, then change speed accordingly.

Parameters
rpmDome speed (RPM)
Returns
true if successful, false otherwise

◆ triggerSnoop() [1/2]

void INDI::Dome::triggerSnoop ( const char *  driverName,
const char *  propertyName 
)
private

◆ triggerSnoop() [2/2]

void Dome::triggerSnoop ( const char *  driverName,
const char *  propertyName 
)
private

◆ UnPark() [1/2]

virtual IPState INDI::Dome::UnPark ( )
protectedvirtual

UnPark dome.

The action of the Unpark command is dome specific, but it may include opening the shutter and moving to home position. When UnPark() is successful The observatory should be in a ready state to utilize the mount to perform observations.

Returns
Return IPS_OK if motion is completed and Dome is unparked. Return IPS_BUSY if Dome unparking is in progress. Return -IPS_ALERT if there is an error.

Reimplemented in NexDome, BaaderDome, DomeSim, DomeScript, and RollOff.

◆ UnPark() [2/2]

IPState Dome::UnPark ( )
protectedvirtual

UnPark dome.

The action of the Unpark command is dome specific, but it may include opening the shutter and moving to home position. When UnPark() is successful The observatory should be in a ready state to utilize the mount to perform observations.

Returns
Return IPS_OK if motion is completed and Dome is unparked. Return IPS_BUSY if Dome unparking is in progress. Return -IPS_ALERT if there is an error.

Reimplemented in NexDome, BaaderDome, DomeSim, DomeScript, and RollOff.

◆ UpdateAutoSync() [1/2]

void Dome::UpdateAutoSync ( )
protectedvirtual

UpdateAutoSync This function calculates the target dome azimuth from the mount's target coordinates given the dome parameters.

If the difference between the dome's and mount's azimuth angles exceeds the AutoSync threshold, the dome will be commanded to sync to the mount azimuth position.

◆ UpdateAutoSync() [2/2]

virtual void INDI::Dome::UpdateAutoSync ( )
protectedvirtual

UpdateAutoSync This function calculates the target dome azimuth from the mount's target coordinates given the dome parameters.

If the difference between the dome's and mount's azimuth angles exceeds the AutoSync threshold, the dome will be commanded to sync to the mount azimuth position.

◆ UpdateMountCoords() [1/2]

void INDI::Dome::UpdateMountCoords ( )
protected

updateCoords updates the horizontal coordinates (Az & Alt) of the mount from the snooped RA, DEC and observer's location.

◆ UpdateMountCoords() [2/2]

void Dome::UpdateMountCoords ( )
protected

updateCoords updates the horizontal coordinates (Az & Alt) of the mount from the snooped RA, DEC and observer's location.

◆ updateProperties() [1/2]

virtual bool INDI::Dome::updateProperties ( )
virtual

updateProperties is called whenever there is a change in the CONNECTION status of the driver.

This will enable the driver to react to changes of switching ON/OFF a device. For example, a driver may only define a set of properties after a device is connected, but not before.

Returns
True if update is successful, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in BaaderDome, DomeSim, MaxDomeII, NexDome, DomeScript, and RollOff.

◆ updateProperties() [2/2]

bool Dome::updateProperties ( )
virtual

updateProperties is called whenever there is a change in the CONNECTION status of the driver.

This will enable the driver to react to changes of switching ON/OFF a device. For example, a driver may only define a set of properties after a device is connected, but not before.

Returns
True if update is successful, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in BaaderDome, DomeSim, MaxDomeII, NexDome, DomeScript, and RollOff.

◆ WriteParkData() [1/2]

bool INDI::Dome::WriteParkData ( )
protected

◆ WriteParkData() [2/2]

bool Dome::WriteParkData ( )
protected

Member Data Documentation

◆ AbortS

ISwitch Dome::AbortS
protected

◆ AbortSP

ISwitchVectorProperty Dome::AbortSP
protected

◆ ActiveDeviceT

IText Dome::ActiveDeviceT {}
protected

◆ ActiveDeviceTP

ITextVectorProperty Dome::ActiveDeviceTP
protected

◆ AutoParkS

ISwitch Dome::AutoParkS
protected

◆ AutoParkSP

ISwitchVectorProperty Dome::AutoParkSP
protected

◆ Axis1DefaultParkPosition

double Dome::Axis1DefaultParkPosition
private

◆ Axis1ParkPosition

double Dome::Axis1ParkPosition
private

◆ capability

uint32_t Dome::capability
protected

◆ controller

Controller * Dome::controller = nullptr
private

◆ DomeAbsPosN

INumber Dome::DomeAbsPosN
protected

◆ DomeAbsPosNP

INumberVectorProperty Dome::DomeAbsPosNP
protected

◆ DomeAutoSyncS

ISwitch Dome::DomeAutoSyncS
protected

◆ DomeAutoSyncSP

ISwitchVectorProperty Dome::DomeAutoSyncSP
protected

◆ DomeConnection [1/2]

enum { ... } INDI::Dome::DomeConnection

◆ DomeConnection [2/2]

enum { ... } INDI::Dome::DomeConnection

◆ domeConnection

uint8_t Dome::domeConnection = CONNECTION_SERIAL | CONNECTION_TCP
private

◆ DomeMeasurementsN

INumber Dome::DomeMeasurementsN
protected

◆ DomeMeasurementsNP

INumberVectorProperty Dome::DomeMeasurementsNP
protected

◆ DomeMotionS

ISwitch Dome::DomeMotionS
protected

◆ DomeMotionSP

ISwitchVectorProperty Dome::DomeMotionSP
protected

◆ DomeParamN

INumber Dome::DomeParamN
protected

◆ DomeParamNP

INumberVectorProperty Dome::DomeParamNP
protected

◆ DomeRelPosN

INumber Dome::DomeRelPosN
protected

◆ DomeRelPosNP

INumberVectorProperty Dome::DomeRelPosNP
protected

◆ DomeShutterS

ISwitch Dome::DomeShutterS
protected

◆ DomeShutterSP

ISwitchVectorProperty Dome::DomeShutterSP
protected

◆ DomeSpeedN

INumber Dome::DomeSpeedN
protected

◆ DomeSpeedNP

INumberVectorProperty Dome::DomeSpeedNP
protected

◆ domeState

DomeState Dome::domeState
protected

◆ HaveLatLong

bool Dome::HaveLatLong = false
protected

◆ HaveRaDec

bool Dome::HaveRaDec = false
protected

◆ IsLocked

bool Dome::IsLocked = true
private

◆ IsMountParked

bool Dome::IsMountParked = false
private

◆ IsParked

bool Dome::IsParked = false
private

◆ mountEquatorialCoords

struct ln_equ_posn Dome::mountEquatorialCoords
protected

◆ mountHoriztonalCoords

struct ln_hrz_posn Dome::mountHoriztonalCoords
protected

◆ mountState

IPState Dome::mountState
protected

◆ observer

struct ln_lnlat_posn Dome::observer
protected

◆ OTASideS

ISwitch Dome::OTASideS
protected

◆ OTASideSP

ISwitchVectorProperty Dome::OTASideSP
protected

◆ Parkdatafile

const char * Dome::Parkdatafile
private

◆ parkDataType

DomeParkData Dome::parkDataType
protected

◆ ParkdataXmlRoot

XMLEle * Dome::ParkdataXmlRoot
private

◆ ParkDeviceName

const char * Dome::ParkDeviceName
private

◆ ParkdeviceXml

XMLEle * Dome::ParkdeviceXml
private

◆ ParkOptionS

ISwitch Dome::ParkOptionS
protected

◆ ParkOptionSP

ISwitchVectorProperty Dome::ParkOptionSP
protected

◆ ParkpositionAxis1Xml

XMLEle * Dome::ParkpositionAxis1Xml
private

◆ ParkPositionN

INumber Dome::ParkPositionN
protected

◆ ParkPositionNP

INumberVectorProperty Dome::ParkPositionNP
protected

◆ ParkpositionXml

XMLEle * Dome::ParkpositionXml
private

◆ ParkS

ISwitch Dome::ParkS
protected

◆ ParkSP

ISwitchVectorProperty Dome::ParkSP
protected

◆ ParkstatusXml

XMLEle * Dome::ParkstatusXml
private

◆ PortFD

int Dome::PortFD = -1
protected

◆ PresetGotoS

ISwitch Dome::PresetGotoS
protected

◆ PresetGotoSP

ISwitchVectorProperty Dome::PresetGotoSP
protected

◆ PresetN

INumber Dome::PresetN
protected

◆ PresetNP

INumberVectorProperty Dome::PresetNP
protected

◆ prev_alt

double Dome::prev_alt
protected

◆ prev_az

double Dome::prev_az
protected

◆ prev_dec

double Dome::prev_dec
protected

◆ prev_ra

double Dome::prev_ra
protected

◆ serialConnection

Connection::Serial * Dome::serialConnection = NULL
protected

◆ shutterState

ShutterStatus Dome::shutterState
protected

◆ tcpConnection

Connection::TCP * Dome::tcpConnection = NULL
protected

◆ TelescopeClosedLockT

ISwitch Dome::TelescopeClosedLockT
protected

◆ TelescopeClosedLockTP

ISwitchVectorProperty Dome::TelescopeClosedLockTP
protected

◆ weatherState

IPState Dome::weatherState
protected

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