Instrument Neutral Distributed Interface INDI  2.0.2
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected 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:
INDI::DefaultDevice INDI::ParentDevice INDI::BaseDevice BaaderDome Beaver DDW DomePro2 DomeScript DomeSim RigelDome RollOff ScopeDome

Public Types

enum  DomeMeasurements {
  DM_DOME_RADIUS , DM_SHUTTER_WIDTH , DM_NORTH_DISPLACEMENT , DM_EAST_DISPLACEMENT ,
  DM_UP_DISPLACEMENT , DM_OTA_OFFSET
}
 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. More...
 
enum  DomeDirection { DOME_CW , DOME_CCW }
 
enum  DomeMotionCommand { MOTION_START , MOTION_STOP }
 
enum  DomeParkData { PARK_NONE , PARK_AZ , PARK_AZ_ENCODER }
 
enum  ShutterOperation { SHUTTER_OPEN , SHUTTER_CLOSE }
 Shutter operation command. More...
 
enum  MountLockingPolicy { MOUNT_IGNORED , MOUNT_LOCKS }
 
enum  DomeState {
  DOME_IDLE , DOME_MOVING , DOME_SYNCED , DOME_PARKING ,
  DOME_UNPARKING , DOME_PARKED , DOME_UNPARKED , DOME_UNKNOWN ,
  DOME_ERROR
}
 Dome status. More...
 
enum  ShutterState {
  SHUTTER_OPENED , SHUTTER_CLOSED , SHUTTER_MOVING , SHUTTER_UNKNOWN ,
  SHUTTER_ERROR
}
 
enum  {
  DOME_CAN_ABORT = 1 << 0 , DOME_CAN_ABS_MOVE = 1 << 1 , DOME_CAN_REL_MOVE = 1 << 2 , DOME_CAN_PARK = 1 << 3 ,
  DOME_CAN_SYNC = 1 << 4 , DOME_HAS_SHUTTER = 1 << 5 , DOME_HAS_VARIABLE_SPEED = 1 << 6 , DOME_HAS_BACKLASH = 1 << 7
}
 
enum  { CONNECTION_NONE = 1 << 0 , CONNECTION_SERIAL = 1 << 1 , CONNECTION_TCP = 1 << 2 }
 
- Public Types inherited from INDI::ParentDevice
enum  Type { Valid , Invalid }
 
- 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 }
 
enum  { INDI_ENABLED , INDI_DISABLED }
 
enum  WATCH { WATCH_NEW = 0 , WATCH_UPDATE , WATCH_NEW_OR_UPDATE }
 
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) , CORRELATOR_INTERFACE = (1 << 14) ,
  AUX_INTERFACE = (1 << 15) , SENSOR_INTERFACE = SPECTROGRAPH_INTERFACE | DETECTOR_INTERFACE | CORRELATOR_INTERFACE
}
 The DRIVER_INTERFACE enum defines the class of devices the driver implements. A driver may implement one or more interfaces. More...
 
typedef INDI::Properties Properties
 

Public Member Functions

 Dome ()
 
virtual ~Dome ()
 
virtual bool initProperties () override
 Initilize properties initial state and value. The child class must implement this function. More...
 
virtual void ISGetProperties (const char *dev) override
 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. More...
 
virtual bool updateProperties () override
 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. More...
 
virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n) override
 Process the client newNumber command. More...
 
virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) override
 Process the client newSwitch command. More...
 
virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n) override
 Process the client newSwitch command. More...
 
virtual bool ISSnoopDevice (XMLEle *root) override
 Process a snoop event from INDI server. This function is called when a snooped property is updated in a snooped driver. More...
 
void setDomeConnection (const uint8_t &value)
 setDomeConnection Set Dome connection mode. Child class should call this in the constructor before Dome registers any connection interfaces 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. All capabilities must be initialized. More...
 
bool CanAbort ()
 
bool CanAbsMove ()
 
bool CanRelMove ()
 
bool CanPark ()
 
bool CanSync ()
 
bool HasShutter ()
 
bool HasVariableSpeed ()
 
bool HasBacklash ()
 
bool isLocked ()
 isLocked, is the dome currently locked? More...
 
DomeState getDomeState () const
 
void setDomeState (const DomeState &value)
 
ShutterState getShutterState () const
 
void setShutterState (const ShutterState &value)
 
IPState getMountState () const
 
- Public Member Functions inherited from INDI::DefaultDevice
 DefaultDevice ()
 
virtual ~DefaultDevice () override=default
 
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. Alternatively, IDDefNumber can be used but the property will not get registered and the driver will not be able to save configuration files. More...
 
void defineProperty (INumberVectorProperty *property)
 
void defineText (ITextVectorProperty *tvp)
 Define text vector to client & register it. Alternatively, IDDefText can be used but the property will not get registered and the driver will not be able to save configuration files. More...
 
void defineProperty (ITextVectorProperty *property)
 
void defineSwitch (ISwitchVectorProperty *svp)
 Define switch vector to client & register it. Alternatively, IDDefswitch can be used but the property will not get registered and the driver will not be able to save configuration files. More...
 
void defineProperty (ISwitchVectorProperty *property)
 
void defineLight (ILightVectorProperty *lvp)
 Define light vector to client & register it. Alternatively, IDDeflight can be used but the property will not get registered and the driver will not be able to save configuration files. More...
 
void defineProperty (ILightVectorProperty *property)
 
void defineBLOB (IBLOBVectorProperty *bvp)
 Define BLOB vector to client & register it. Alternatively, IDDefBLOB can be used but the property will not get registered and the driver will not be able to save configuration files. More...
 
void defineProperty (IBLOBVectorProperty *property)
 
void defineProperty (INDI::Property &property)
 
virtual bool deleteProperty (const char *propertyName)
 Delete a property and unregister it. It will also be deleted from all clients. More...
 
bool deleteProperty (INDI::Property &property)
 deleteProperty Delete a property and unregister it. It will also be deleted from all clients. 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 () const
 
uint16_t getMinorVersion () const
 
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...
 
uint16_t getDriverInterface () const
 
void setDriverInterface (uint16_t value)
 setInterface Set driver interface. By default the driver interface is set to GENERAL_DEVICE. You may send an ORed list of DeviceInterface values. More...
 
void watchDevice (const char *deviceName, const std::function< void(INDI::BaseDevice)> &callback)
 Add a device to the watch list. More...
 
- Public Member Functions inherited from INDI::ParentDevice
 ParentDevice (Type type)
 
 ~ParentDevice ()
 
 ParentDevice (ParentDevice &&other)=default
 
ParentDeviceoperator= (ParentDevice &&other)=default
 
- Public Member Functions inherited from INDI::BaseDevice
 BaseDevice ()
 
virtual ~BaseDevice ()
 
void registerProperty (const INDI::Property &property)
 Register the property to be able to observe and update. More...
 
void registerProperty (const INDI::Property &property, INDI_PROPERTY_TYPE type)
 
int removeProperty (const char *name, char *errmsg)
 Remove a property. More...
 
void watchProperty (const char *name, const std::function< void(INDI::Property)> &callback, WATCH watch=WATCH_NEW)
 Call the callback function if property is available. More...
 
Property getProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN) const
 Return a property and its type given its name. More...
 
Properties getProperties ()
 Return a list of all properties in the device. More...
 
const Properties getProperties () const
 
INDI::PropertyNumber getNumber (const char *name) const
 
INDI::PropertyText getText (const char *name) const
 
INDI::PropertySwitch getSwitch (const char *name) const
 
INDI::PropertyLight getLight (const char *name) const
 
INDI::PropertyBlob getBLOB (const char *name) const
 
IPState getPropertyState (const char *name) const
 
IPerm getPropertyPermission (const char *name) const
 
void * getRawProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN) const
 Return a property and its type given its name. More...
 
void addMessage (const std::string &msg)
 Add message to the driver's message queue. More...
 
void checkMessage (XMLEle *root)
 
void doMessage (XMLEle *msg)
 
const std::string & messageQueue (size_t index) const
 
const std::string & lastMessage () const
 
bool isValid () const
 
bool isConnected () const
 
void attach ()
 indicates that the device is ready More...
 
void detach ()
 indicates that the device is being removed More...
 
void setMediator (INDI::BaseMediator *mediator)
 Set the driver's mediator to receive notification of news devices and updated property values. More...
 
INDI::BaseMediatorgetMediator () const
 
void setDeviceName (const char *dev)
 Set the device name. More...
 
const char * getDeviceName () const
 
bool isDeviceNameMatch (const char *otherName) const
 Check that the device name matches the argument. More...
 
bool isDeviceNameMatch (const std::string &otherName) const
 Check that the device name matches the argument. More...
 
const char * getDriverName () const
 
const char * getDriverExec () const
 
const char * getDriverVersion () const
 
uint16_t getDriverInterface () const
 getDriverInterface returns ORed values of DRIVER_INTERFACE. It presents the device classes supported by the driver. More...
 
bool buildSkeleton (const char *filename)
 Build driver properties from a skeleton file. More...
 
int buildProp (const INDI::LilXmlElement &root, char *errmsg, bool isDynamic=false)
 Build a property given the supplied XML element (defXXX) More...
 
int setValue (const INDI::LilXmlElement &root, char *errmsg)
 handle SetXXX commands from client More...
 
 operator BaseDevice * ()
 
BaseDeviceoperator-> ()
 
bool operator!= (std::nullptr_t) const
 
bool operator== (std::nullptr_t) const
 
 operator bool () const
 
 operator bool ()
 

Static Public Member Functions

static void buttonHelper (const char *button_n, ISState state, void *context)
 
- Static Public Member Functions inherited from INDI::BaseDevice
static std::string getSharedFilePath (std::string fileName)
 

Public Attributes

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

Protected Types

enum  { SHUTTER_CLOSE_ON_PARK , SHUTTER_OPEN_ON_UNPARK }
 
enum  {
  DM_OTA_SIDE_EAST , DM_OTA_SIDE_WEST , DM_OTA_SIDE_MOUNT , DM_OTA_SIDE_HA ,
  DM_OTA_SIDE_IGNORE
}
 

Protected Member Functions

virtual bool SetSpeed (double rpm)
 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. 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 Sync (double az)
 Sync sets the dome current azimuth as the supplied azimuth position. More...
 
virtual bool Abort ()
 Abort all dome motion. More...
 
virtual IPState Park ()
 Goto Park Position. The park position is an absolute azimuth value. More...
 
virtual IPState UnPark ()
 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. More...
 
virtual bool SetBacklash (int32_t steps)
 SetBacklash Set the dome backlash compensation value. More...
 
virtual bool SetBacklashEnabled (bool enabled)
 SetBacklashEnabled Enables or disables the dome backlash compensation. More...
 
virtual IPState ControlShutter (ShutterOperation operation)
 Open or Close shutter. More...
 
const char * GetShutterStatusString (ShutterState 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. InitPark() should be called after successful connection to the dome on startup. More...
 
bool isParked ()
 isParked is dome currently parked? More...
 
void SetParked (bool isparked)
 SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData.xml) is updated in the process. More...
 
double GetAxis1Park ()
 
double GetAxis1ParkDefault ()
 
void SetAxis1Park (double value)
 SetRAPark Set current AZ parking position. The data park file (stored in ~/.indi/ParkData.xml) is updated in the process. 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...
 
const 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. 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) 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) override
 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. 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. 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. Dyanmic properties are those generated from an external skeleton XML file. By default all properties, including dynamic properties, are defined to the client in ISGetProperties(). Furthermore, when űdeleteProperty(properyName) is called, the dynamic property is deleted by default, and can only be restored by calling buildSkeleton(filename) again. However, it is sometimes desirable to skip the definition of the dynamic properties on startup and delegate this task to the child class. To control this behavior, set enabled to false. More...
 
virtual bool loadConfig (bool silent=false, const char *property=nullptr)
 Load the last saved configuration file. More...
 
bool loadConfig (INDI::Property &property)
 Load property config from the configuration file. If the property configuration is successfully parsed, the corresponding ISNewXXX is called with the values parsed from the config file. More...
 
virtual bool saveConfig (bool silent=false, const char *property=nullptr)
 Save the current properties in a configuration file. More...
 
bool saveConfig (INDI::Property &property)
 Save a property in the configuration file. More...
 
virtual bool purgeConfig ()
 purgeConfig Remove config file from disk. 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. This function is called after setDebug is triggered by the client. Reimplement this function if your driver needs to take specific action after debug is enabled/disabled. Otherwise, you can use isDebug() to check if simulation is enabled or disabled. More...
 
virtual void simulationTriggered (bool enable)
 Inform driver that the simulation option was triggered. This function is called after setSimulation is triggered by the client. Reimplement this function if your driver needs to take specific action after simulation is enabled/disabled. Otherwise, you can use isSimulation() to check if simulation is enabled or disabled. More...
 
bool isDebug () const
 
bool isSimulation () const
 
virtual bool Connect ()
 Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interface (Serial or TCP) governed by connectionMode. If connection is successful, it proceed to call Handshake() function to ensure communication with device is successful. For other communication interface, override the method in the child class implementation. More...
 
virtual bool Disconnect ()
 Disconnect from device. More...
 
void registerConnection (Connection::Interface *newConnection)
 registerConnection Add new connection plugin to the existing connection pool. The connection type shall be defined to the client in ISGetProperties() More...
 
bool unRegisterConnection (Connection::Interface *existingConnection)
 unRegisterConnection Remove connection from existing pool More...
 
Connection::InterfacegetActiveConnection ()
 
void setActiveConnection (Connection::Interface *existingConnection)
 setActiveConnection Switch the active connection to the passed connection plugin More...
 
void setDefaultPollingPeriod (uint32_t msec)
 setDefaultPollingPeriod Change the default polling period to call TimerHit() function in the driver. More...
 
void setPollingPeriodRange (uint32_t minimum, uint32_t maximum)
 setPollingPeriodRange Set the range permitted by the polling range in milliseconds More...
 
uint32_t getPollingPeriod () const
 getPollingPeriod Return the polling period. More...
 
void setCurrentPollingPeriod (uint32_t msec)
 setCurrentPollingPeriod Change the current polling period to call TimerHit() function in the driver. More...
 
uint32_t getCurrentPollingPeriod () const
 getCurrentPollingPeriod Return the current polling period. More...
 
uint32_t & refCurrentPollingPeriod () __attribute__((deprecated))
 
uint32_t refCurrentPollingPeriod () const __attribute__((deprecated))
 
bool isConfigLoading () const
 isConfigLoading Check if driver configuration is currently in the process of getting loaded. More...
 
bool isInitializationComplete () const
 isInitializationComplete Check if driver initialization is complete. More...
 
void syncDriverInfo ()
 syncDriverInfo sends the current driver information to the client. More...
 
virtual const char * getDefaultName ()=0
 
 DefaultDevice (const std::shared_ptr< DefaultDevicePrivate > &dd)
 
- Protected Member Functions inherited from INDI::ParentDevice
 ParentDevice (const std::shared_ptr< ParentDevicePrivate > &dd)
 
- Protected Member Functions inherited from INDI::BaseDevice
 BaseDevice (BaseDevicePrivate &dd)
 
 BaseDevice (const std::shared_ptr< BaseDevicePrivate > &dd)
 

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]
 
INumberVectorProperty DomeSyncNP
 
INumber DomeSyncN [1]
 
ISwitchVectorProperty DomeShutterSP
 
ISwitch DomeShutterS [2]
 
ISwitchVectorProperty ParkSP
 
ISwitch ParkS [2]
 
INumber ParkPositionN [1]
 
INumberVectorProperty ParkPositionNP
 
ISwitch ParkOptionS [3]
 
ISwitchVectorProperty ParkOptionSP
 
uint32_t capability
 
DomeParkData parkDataType
 
ITextVectorProperty ActiveDeviceTP
 
IText ActiveDeviceT [1] {}
 
ISwitchVectorProperty MountPolicySP
 
ISwitch MountPolicyS [2]
 
ISwitchVectorProperty ShutterParkPolicySP
 
ISwitch ShutterParkPolicyS [2]
 
INumber PresetN [3]
 
INumberVectorProperty PresetNP
 
ISwitch PresetGotoS [3]
 
ISwitchVectorProperty PresetGotoSP
 
INumber DomeMeasurementsN [6]
 
INumberVectorProperty DomeMeasurementsNP
 
ISwitchVectorProperty OTASideSP
 
ISwitch OTASideS [5]
 
int mountOTASide = 0
 
ISwitchVectorProperty DomeAutoSyncSP
 
ISwitch DomeAutoSyncS [2]
 
ISwitchVectorProperty DomeBacklashSP
 
ISwitch DomeBacklashS [2]
 
INumberVectorProperty DomeBacklashNP
 
INumber DomeBacklashN [1]
 
double prev_az
 
double prev_alt
 
double prev_ra
 
double prev_dec
 
int PortFD = -1
 
Connection::SerialserialConnection = nullptr
 
Connection::TCPtcpConnection = nullptr
 
DomeState m_DomeState
 
ShutterState m_ShutterState
 
IPState m_MountState
 
IGeographicCoordinates observer
 
bool HaveLatLong = false
 
INDI::IHorizontalCoordinates mountHoriztonalCoords
 
INDI::IEquatorialCoordinates mountEquatorialCoords
 
bool HaveRaDec = false
 
- Protected Attributes inherited from INDI::BaseDevice
std::shared_ptr< BaseDevicePrivated_ptr
 

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

Definition at line 74 of file indidome.h.

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_CAN_SYNC 

Can the dome sync to arbitrary position?

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?

DOME_HAS_BACKLASH 

Can the dome compensate for backlash?

Definition at line 154 of file indidome.h.

◆ anonymous enum

anonymous enum
Enumerator
CONNECTION_NONE 
CONNECTION_SERIAL 

Do not use any connection plugin

CONNECTION_TCP 

For regular serial and bluetooth connections

Definition at line 169 of file indidome.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
SHUTTER_CLOSE_ON_PARK 
SHUTTER_OPEN_ON_UNPARK 

Definition at line 576 of file indidome.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
DM_OTA_SIDE_EAST 
DM_OTA_SIDE_WEST 
DM_OTA_SIDE_MOUNT 
DM_OTA_SIDE_HA 
DM_OTA_SIDE_IGNORE 

Definition at line 593 of file indidome.h.

◆ DomeDirection

Enumerator
DOME_CW 
DOME_CCW 

Definition at line 91 of file indidome.h.

◆ DomeMeasurements

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

Definition at line 81 of file indidome.h.

◆ DomeMotionCommand

Enumerator
MOTION_START 
MOTION_STOP 

Definition at line 96 of file indidome.h.

◆ DomeParkData

Dome Parking data type enum

Enumerator
PARK_NONE 

2-state parking (Open or Closed only)

PARK_AZ 

Parking via azimuth angle control

PARK_AZ_ENCODER 

Parking via azimuth encoder control

Definition at line 103 of file indidome.h.

◆ DomeState

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_UNKNOWN 

Dome state is known

DOME_ERROR 

Dome has errors

Definition at line 129 of file indidome.h.

◆ MountLockingPolicy

Mount Locking Policy

Enumerator
MOUNT_IGNORED 

Mount is ignored. Dome can park or unpark irrespective of mount parking status

MOUNT_LOCKS 

Mount Locks. Dome can park if mount is completely parked first.

Definition at line 120 of file indidome.h.

◆ ShutterOperation

Shutter operation command.

Enumerator
SHUTTER_OPEN 

Open Shutter

SHUTTER_CLOSE 

Close Shutter

Definition at line 113 of file indidome.h.

◆ ShutterState

Enumerator
SHUTTER_OPENED 

Shutter is open

SHUTTER_CLOSED 

Shutter is closed

SHUTTER_MOVING 

Shutter in motion (opening or closing)

SHUTTER_UNKNOWN 

Shutter status is unknown

SHUTTER_ERROR 

Shutter status is unknown

Definition at line 145 of file indidome.h.

Constructor & Destructor Documentation

◆ Dome()

Dome::Dome ( )

Definition at line 50 of file indidome.cpp.

◆ ~Dome()

Dome::~Dome ( )
virtual

Definition at line 71 of file indidome.cpp.

Member Function Documentation

◆ Abort()

bool Dome::Abort ( )
protectedvirtual

Abort all dome motion.

Returns
True if abort is successful, false otherwise.

Reimplemented in ScopeDome, RollOff, RigelDome, Beaver, DomePro2, DomeSim, DomeScript, DDW, and BaaderDome.

Definition at line 2052 of file indidome.cpp.

◆ buttonHelper()

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

Definition at line 1082 of file indidome.cpp.

◆ CanAbort()

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

Definition at line 218 of file indidome.h.

◆ CanAbsMove()

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

Definition at line 226 of file indidome.h.

◆ CanPark()

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

Definition at line 242 of file indidome.h.

◆ CanRelMove()

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

Definition at line 234 of file indidome.h.

◆ CanSync()

bool INDI::Dome::CanSync ( )
inline
Returns
True if dome can sync.

Definition at line 250 of file indidome.h.

◆ CheckHorizon()

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.

Definition at line 1476 of file indidome.cpp.

◆ ControlShutter()

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 ScopeDome, RigelDome, Beaver, DomePro2, DomeSim, DomeScript, DDW, and BaaderDome.

Definition at line 2127 of file indidome.cpp.

◆ Csc()

double Dome::Csc ( double  x)
protected

Definition at line 1466 of file indidome.cpp.

◆ GetAxis1Park()

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

Definition at line 1851 of file indidome.cpp.

◆ GetAxis1ParkDefault()

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

Definition at line 1856 of file indidome.cpp.

◆ GetDomeCapability()

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

GetDomeCapability returns the capability of the dome.

Definition at line 204 of file indidome.h.

◆ getDomeConnection()

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

Definition at line 2292 of file indidome.cpp.

◆ getDomeState()

DomeState INDI::Dome::getDomeState ( ) const
inline

Definition at line 285 of file indidome.h.

◆ getMountState()

IPState Dome::getMountState ( ) const

Definition at line 1114 of file indidome.cpp.

◆ getShutterState()

ShutterState INDI::Dome::getShutterState ( ) const
inline

Definition at line 291 of file indidome.h.

◆ GetShutterStatusString()

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

getShutterStatusString

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

Definition at line 1569 of file indidome.cpp.

◆ GetTargetAz()

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

Definition at line 1273 of file indidome.cpp.

◆ Handshake()

bool Dome::Handshake ( )
protectedvirtual

perform handshake with device to check communication

Reimplemented in ScopeDome, RigelDome, Beaver, DomePro2, DDW, and BaaderDome.

Definition at line 2274 of file indidome.cpp.

◆ HasBacklash()

bool INDI::Dome::HasBacklash ( )
inline
Returns
True if the dome supports backlash

Definition at line 274 of file indidome.h.

◆ HasShutter()

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

Definition at line 258 of file indidome.h.

◆ HasVariableSpeed()

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

Definition at line 266 of file indidome.h.

◆ InitPark()

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.

Definition at line 1644 of file indidome.cpp.

◆ initProperties()

bool Dome::initProperties ( )
overridevirtual

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 ScopeDome, RollOff, RigelDome, Beaver, DomePro2, DomeSim, DomeScript, DDW, and BaaderDome.

Definition at line 93 of file indidome.cpp.

◆ Intersection()

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.

Definition at line 1408 of file indidome.cpp.

◆ ISGetProperties()

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

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.

Definition at line 259 of file indidome.cpp.

◆ isLocked()

bool Dome::isLocked ( )

isLocked, is the dome currently locked?

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

Definition at line 1077 of file indidome.cpp.

◆ ISNewNumber()

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

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 ScopeDome, RigelDome, Beaver, and DomePro2.

Definition at line 390 of file indidome.cpp.

◆ ISNewSwitch()

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

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 ScopeDome, RollOff, RigelDome, Beaver, DomePro2, and BaaderDome.

Definition at line 492 of file indidome.cpp.

◆ ISNewText()

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

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 ScopeDome, and DomeScript.

Definition at line 795 of file indidome.cpp.

◆ isParked()

bool Dome::isParked ( )
protected

isParked is dome currently parked?

Returns
True if parked, false otherwise.

Definition at line 1639 of file indidome.cpp.

◆ ISSnoopDevice()

bool Dome::ISSnoopDevice ( XMLEle root)
overridevirtual

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.

Definition at line 822 of file indidome.cpp.

◆ LoadParkData()

const char * Dome::LoadParkData ( )
protected

Definition at line 1758 of file indidome.cpp.

◆ Move()

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 ScopeDome, RollOff, RigelDome, Beaver, DomePro2, DomeSim, and DomeScript.

Definition at line 1873 of file indidome.cpp.

◆ MoveAbs()

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 ScopeDome, RigelDome, Beaver, DomePro2, DomeSim, DomeScript, DDW, and BaaderDome.

Definition at line 1981 of file indidome.cpp.

◆ MoveRel()

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 ScopeDome, RigelDome, Beaver, DomePro2, DomeSim, and BaaderDome.

Definition at line 1913 of file indidome.cpp.

◆ OpticalCenter()

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.

Definition at line 1432 of file indidome.cpp.

◆ OpticalVector()

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.

Definition at line 1453 of file indidome.cpp.

◆ Park()

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 ScopeDome, RollOff, RigelDome, Beaver, DomePro2, DomeSim, DomeScript, DDW, and BaaderDome.

Definition at line 2171 of file indidome.cpp.

◆ saveConfigItems()

bool Dome::saveConfigItems ( FILE *  fp)
overrideprotectedvirtual

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 ScopeDome, RollOff, Beaver, DomePro2, DomeScript, DDW, and BaaderDome.

Definition at line 1043 of file indidome.cpp.

◆ Sec()

double Dome::Sec ( double  x)
protected

Definition at line 1471 of file indidome.cpp.

◆ SetAxis1Park()

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

Definition at line 1861 of file indidome.cpp.

◆ SetAxis1ParkDefault()

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

Definition at line 1868 of file indidome.cpp.

◆ SetBacklash()

bool Dome::SetBacklash ( int32_t  steps)
protectedvirtual

SetBacklash Set the dome backlash compensation value.

Parameters
stepsvalue in absolute steps to compensate
Returns
True if successful, false otherwise.

Definition at line 1027 of file indidome.cpp.

◆ SetBacklashEnabled()

bool Dome::SetBacklashEnabled ( bool  enabled)
protectedvirtual

SetBacklashEnabled Enables or disables the dome backlash compensation.

Parameters
enableflag to enable or disable backlash compensation
Returns
True if successful, false otherwise.

Definition at line 1034 of file indidome.cpp.

◆ SetCurrentPark()

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 ScopeDome, RigelDome, Beaver, DomePro2, DomeSim, DDW, and BaaderDome.

Definition at line 2262 of file indidome.cpp.

◆ SetDefaultPark()

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 ScopeDome, RigelDome, Beaver, DomePro2, DomeSim, DDW, and BaaderDome.

Definition at line 2268 of file indidome.cpp.

◆ SetDomeCapability()

void Dome::SetDomeCapability ( uint32_t  cap)

SetDomeCapability set the dome capabilities. All capabilities must be initialized.

Parameters
cappointer to dome capability

Definition at line 1561 of file indidome.cpp.

◆ setDomeConnection()

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.

Definition at line 2297 of file indidome.cpp.

◆ setDomeState()

void Dome::setDomeState ( const DomeState value)

Definition at line 1156 of file indidome.cpp.

◆ SetParkDataType()

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.

Definition at line 1587 of file indidome.cpp.

◆ SetParked()

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.

Definition at line 1633 of file indidome.cpp.

◆ setShutterState()

void Dome::setShutterState ( const ShutterState value)

Definition at line 1119 of file indidome.cpp.

◆ SetSpeed()

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

Definition at line 2106 of file indidome.cpp.

◆ Sync()

bool Dome::Sync ( double  az)
protectedvirtual

Sync sets the dome current azimuth as the supplied azimuth position.

Returns
True if sync is successful, false otherwise.

Reimplemented in RigelDome, and DomePro2.

Definition at line 2045 of file indidome.cpp.

◆ UnPark()

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 ScopeDome, RollOff, RigelDome, Beaver, DomePro2, DomeSim, DomeScript, DDW, and BaaderDome.

Definition at line 2225 of file indidome.cpp.

◆ UpdateAutoSync()

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.

Definition at line 1516 of file indidome.cpp.

◆ UpdateMountCoords()

void Dome::UpdateMountCoords ( )
protected

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

Definition at line 1488 of file indidome.cpp.

◆ updateProperties()

bool Dome::updateProperties ( )
overridevirtual

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 ScopeDome, RollOff, RigelDome, Beaver, DomePro2, DomeSim, DomeScript, DDW, and BaaderDome.

Definition at line 279 of file indidome.cpp.

◆ WriteParkData()

bool Dome::WriteParkData ( )
protected

Definition at line 1789 of file indidome.cpp.

Member Data Documentation

◆ AbortS

ISwitch INDI::Dome::AbortS[1]
protected

Definition at line 540 of file indidome.h.

◆ AbortSP

ISwitchVectorProperty INDI::Dome::AbortSP
protected

Definition at line 539 of file indidome.h.

◆ ActiveDeviceT

IText INDI::Dome::ActiveDeviceT[1] {}
protected

Definition at line 567 of file indidome.h.

◆ ActiveDeviceTP

ITextVectorProperty INDI::Dome::ActiveDeviceTP
protected

Definition at line 566 of file indidome.h.

◆ capability

uint32_t INDI::Dome::capability
protected

Definition at line 563 of file indidome.h.

◆ DomeAbsPosN

INumber INDI::Dome::DomeAbsPosN[1]
protected

Definition at line 534 of file indidome.h.

◆ DomeAbsPosNP

INumberVectorProperty INDI::Dome::DomeAbsPosNP
protected

Definition at line 533 of file indidome.h.

◆ DomeAutoSyncS

ISwitch INDI::Dome::DomeAutoSyncS[2]
protected

Definition at line 604 of file indidome.h.

◆ DomeAutoSyncSP

ISwitchVectorProperty INDI::Dome::DomeAutoSyncSP
protected

Definition at line 603 of file indidome.h.

◆ DomeBacklashN

INumber INDI::Dome::DomeBacklashN[1]
protected

Definition at line 612 of file indidome.h.

◆ DomeBacklashNP

INumberVectorProperty INDI::Dome::DomeBacklashNP
protected

Definition at line 611 of file indidome.h.

◆ DomeBacklashS

ISwitch INDI::Dome::DomeBacklashS[2]
protected

Definition at line 608 of file indidome.h.

◆ DomeBacklashSP

ISwitchVectorProperty INDI::Dome::DomeBacklashSP
protected

Definition at line 607 of file indidome.h.

◆ 

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

◆ DomeMeasurementsN

INumber INDI::Dome::DomeMeasurementsN[6]
protected

Definition at line 586 of file indidome.h.

◆ DomeMeasurementsNP

INumberVectorProperty INDI::Dome::DomeMeasurementsNP
protected

Definition at line 587 of file indidome.h.

◆ DomeMotionS

ISwitch INDI::Dome::DomeMotionS[2]
protected

Definition at line 531 of file indidome.h.

◆ DomeMotionSP

ISwitchVectorProperty INDI::Dome::DomeMotionSP
protected

Definition at line 530 of file indidome.h.

◆ DomeParamN

INumber INDI::Dome::DomeParamN[1]
protected

Definition at line 543 of file indidome.h.

◆ DomeParamNP

INumberVectorProperty INDI::Dome::DomeParamNP
protected

Definition at line 542 of file indidome.h.

◆ DomeRelPosN

INumber INDI::Dome::DomeRelPosN[1]
protected

Definition at line 537 of file indidome.h.

◆ DomeRelPosNP

INumberVectorProperty INDI::Dome::DomeRelPosNP
protected

Definition at line 536 of file indidome.h.

◆ DomeShutterS

ISwitch INDI::Dome::DomeShutterS[2]
protected

Definition at line 549 of file indidome.h.

◆ DomeShutterSP

ISwitchVectorProperty INDI::Dome::DomeShutterSP
protected

Definition at line 548 of file indidome.h.

◆ DomeSpeedN

INumber INDI::Dome::DomeSpeedN[1]
protected

Definition at line 528 of file indidome.h.

◆ DomeSpeedNP

INumberVectorProperty INDI::Dome::DomeSpeedNP
protected

Definition at line 527 of file indidome.h.

◆ DomeSyncN

INumber INDI::Dome::DomeSyncN[1]
protected

Definition at line 546 of file indidome.h.

◆ DomeSyncNP

INumberVectorProperty INDI::Dome::DomeSyncNP
protected

Definition at line 545 of file indidome.h.

◆ HaveLatLong

bool INDI::Dome::HaveLatLong = false
protected

Definition at line 630 of file indidome.h.

◆ HaveRaDec

bool INDI::Dome::HaveRaDec = false
protected

Definition at line 636 of file indidome.h.

◆ m_DomeState

DomeState INDI::Dome::m_DomeState
protected

Definition at line 623 of file indidome.h.

◆ m_MountState

IPState INDI::Dome::m_MountState
protected

Definition at line 625 of file indidome.h.

◆ m_ShutterState

ShutterState INDI::Dome::m_ShutterState
protected

Definition at line 624 of file indidome.h.

◆ mountEquatorialCoords

INDI::IEquatorialCoordinates INDI::Dome::mountEquatorialCoords
protected

Definition at line 634 of file indidome.h.

◆ mountHoriztonalCoords

INDI::IHorizontalCoordinates INDI::Dome::mountHoriztonalCoords
protected

Definition at line 633 of file indidome.h.

◆ mountOTASide

int INDI::Dome::mountOTASide = 0
protected

Definition at line 602 of file indidome.h.

◆ MountPolicyS

ISwitch INDI::Dome::MountPolicyS[2]
protected

Definition at line 571 of file indidome.h.

◆ MountPolicySP

ISwitchVectorProperty INDI::Dome::MountPolicySP
protected

Definition at line 570 of file indidome.h.

◆ observer

IGeographicCoordinates INDI::Dome::observer
protected

Definition at line 628 of file indidome.h.

◆ OTASideS

ISwitch INDI::Dome::OTASideS[5]
protected

Definition at line 590 of file indidome.h.

◆ OTASideSP

ISwitchVectorProperty INDI::Dome::OTASideSP
protected

Definition at line 589 of file indidome.h.

◆ parkDataType

DomeParkData INDI::Dome::parkDataType
protected

Definition at line 564 of file indidome.h.

◆ ParkOptionS

ISwitch INDI::Dome::ParkOptionS[3]
protected

Definition at line 557 of file indidome.h.

◆ ParkOptionSP

ISwitchVectorProperty INDI::Dome::ParkOptionSP
protected

Definition at line 558 of file indidome.h.

◆ ParkPositionN

INumber INDI::Dome::ParkPositionN[1]
protected

Definition at line 554 of file indidome.h.

◆ ParkPositionNP

INumberVectorProperty INDI::Dome::ParkPositionNP
protected

Definition at line 555 of file indidome.h.

◆ ParkS

ISwitch INDI::Dome::ParkS[2]
protected

Definition at line 552 of file indidome.h.

◆ ParkSP

ISwitchVectorProperty INDI::Dome::ParkSP
protected

Definition at line 551 of file indidome.h.

◆ PortFD

int INDI::Dome::PortFD = -1
protected

Definition at line 617 of file indidome.h.

◆ PresetGotoS

ISwitch INDI::Dome::PresetGotoS[3]
protected

Definition at line 584 of file indidome.h.

◆ PresetGotoSP

ISwitchVectorProperty INDI::Dome::PresetGotoSP
protected

Definition at line 585 of file indidome.h.

◆ PresetN

INumber INDI::Dome::PresetN[3]
protected

Definition at line 582 of file indidome.h.

◆ PresetNP

INumberVectorProperty INDI::Dome::PresetNP
protected

Definition at line 583 of file indidome.h.

◆ prev_alt

double INDI::Dome::prev_alt
protected

Definition at line 614 of file indidome.h.

◆ prev_az

double INDI::Dome::prev_az
protected

Definition at line 614 of file indidome.h.

◆ prev_dec

double INDI::Dome::prev_dec
protected

Definition at line 614 of file indidome.h.

◆ prev_ra

double INDI::Dome::prev_ra
protected

Definition at line 614 of file indidome.h.

◆ serialConnection

Connection::Serial* INDI::Dome::serialConnection = nullptr
protected

Definition at line 619 of file indidome.h.

◆ ShutterParkPolicyS

ISwitch INDI::Dome::ShutterParkPolicyS[2]
protected

Definition at line 575 of file indidome.h.

◆ ShutterParkPolicySP

ISwitchVectorProperty INDI::Dome::ShutterParkPolicySP
protected

Definition at line 574 of file indidome.h.

◆ tcpConnection

Connection::TCP* INDI::Dome::tcpConnection = nullptr
protected

Definition at line 620 of file indidome.h.


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