Instrument Neutral Distributed Interface INDI 2.2.5
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 AlpacaDome BaaderDome Beaver DDW DomePro2 DomeScript DomeSim DragonLAIR HakosRoof RTIDome RigelDome RollOff ScopeDome UniversalROR

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) , OUTPUT_INTERFACE = (1 << 16) , INPUT_INTERFACE = (1 << 17) , POWER_INTERFACE = (1 << 18) ,
  IMU_INTERFACE = (1 << 19) , PAC_INTERFACE = (1 << 20) , 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
 Initialize properties initial state and value. The child class must implement this function.
 
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.
 
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.
 
virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n) override
 Process the client newNumber command.
 
virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) override
 Process the client newSwitch command.
 
virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n) override
 Process the client newSwitch command.
 
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.
 
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
 
uint8_t getDomeConnection () const
 
uint32_t GetDomeCapability () const
 GetDomeCapability returns the capability of the dome.
 
void SetDomeCapability (uint32_t cap)
 SetDomeCapability set the dome capabilities. All capabilities must be initialized.
 
bool CanAbort ()
 
bool CanAbsMove ()
 
bool CanRelMove ()
 
bool CanPark ()
 
bool CanSync ()
 
bool HasShutter ()
 
bool HasVariableSpeed ()
 
bool HasBacklash ()
 
bool isLocked ()
 isLocked, is the dome currently locked?
 
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.
 
void addDebugControl ()
 Add Debug control to the driver.
 
void addSimulationControl ()
 Add Simulation control to the driver.
 
void addConfigurationControl ()
 Add Configuration control to the driver.
 
void addPollPeriodControl ()
 Add Polling period control to the driver.
 
void addNicknameControl ()
 Add Nickname text property to the driver.
 
void resetProperties ()
 Set all properties to IDLE state.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
bool deleteProperty (INDI::Property &property)
 deleteProperty Delete a property and unregister it. It will also be deleted from all clients.
 
virtual void setConnected (bool status, IPState state=IPS_OK, const char *msg=nullptr)
 Set connection switch status in the client.
 
int SetTimer (uint32_t ms)
 Set a timer to call the function TimerHit after ms milliseconds.
 
void RemoveTimer (int id)
 Remove timer added with SetTimer.
 
virtual void TimerHit ()
 Callback function to be called once SetTimer duration elapses.
 
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.
 
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.
 
bool ISNewProperty (INDI::Property &property, const std::string &elementName, const std::any &value)
 Generic convenience function to update a property element as if by client request, simulating an ISNew... call.
 
template<typename PropertyType , typename ValueType >
bool updateProperty (PropertyType &property, ValueType *values, char *names[], int n, std::function< bool()> updater, bool saveConfig=false)
 Generic helper function to update an INDI property based on an external operation.
 
uint32_t getDriverInterface () const
 
void setDriverInterface (uint32_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.
 
void watchDevice (const char *deviceName, const std::function< void(INDI::BaseDevice)> &callback)
 Add a device to the watch list.
 
- Public Member Functions inherited from INDI::ParentDevice
 ParentDevice (Type type)
 
 ~ParentDevice ()
 
 ParentDevice (ParentDevice &&other)=default
 
ParentDevice & operator= (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.
 
void registerProperty (const INDI::Property &property, INDI_PROPERTY_TYPE type)
 
int removeProperty (const char *name, char *errmsg)
 Remove a property.
 
void watchProperty (const char *name, const std::function< void(INDI::Property)> &callback, WATCH watch=WATCH_NEW)
 Call the callback function if property is available.
 
Property getProperty (const char *name, INDI_PROPERTY_TYPE type=INDI_UNKNOWN) const
 Return a property and its type given its name.
 
Properties getProperties ()
 Return a list of all properties in the device.
 
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.
 
void addMessage (const std::string &msg)
 Add message to the driver's message queue.
 
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 isSameDevice (const BaseDevice &other) const
 
bool isConnected () const
 
void attach ()
 indicates that the device is ready
 
void detach ()
 indicates that the device is being removed
 
void setMediator (INDI::BaseMediator *mediator)
 Set the driver's mediator to receive notification of news devices and updated property values.
 
INDI::BaseMediator * getMediator () const
 
void setDeviceName (const char *dev)
 Set the device name.
 
const char * getDeviceName () const
 
bool isDeviceNameMatch (const char *otherName) const
 Check that the device name matches the argument.
 
bool isDeviceNameMatch (const std::string &otherName) const
 Check that the device name matches the argument.
 
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.
 
bool buildSkeleton (const char *filename)
 Build driver properties from a skeleton file.
 
int buildProp (const INDI::LilXmlElement &root, char *errmsg, bool isDynamic=false)
 Build a property given the supplied XML element (defXXX)
 
int setValue (const INDI::LilXmlElement &root, char *errmsg)
 handle SetXXX commands from client
 
 operator BaseDevice * ()
 
BaseDevice * operator-> ()
 
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  { ACTIVE_MOUNT , ACTIVE_INPUT , ACTIVE_OUTPUT }
 
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.
 
virtual IPState Move (DomeDirection dir, DomeMotionCommand operation)
 Move the Dome in a particular direction.
 
virtual IPState MoveAbs (double az)
 Move the Dome to an absolute azimuth.
 
virtual IPState MoveRel (double azDiff)
 Move the Dome to an relative position.
 
virtual bool Sync (double az)
 Sync sets the dome current azimuth as the supplied azimuth position.
 
virtual bool Abort ()
 Abort all dome motion.
 
virtual IPState Park ()
 Goto Park Position. The park position is an absolute azimuth value.
 
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.
 
virtual bool SetBacklash (int32_t steps)
 SetBacklash Set the dome backlash compensation value.
 
virtual bool SetBacklashEnabled (bool enabled)
 SetBacklashEnabled Enables or disables the dome backlash compensation.
 
virtual IPState ControlShutter (ShutterOperation operation)
 Open or Close shutter.
 
const char * GetShutterStatusString (ShutterState status)
 getShutterStatusString
 
void SetParkDataType (DomeParkData type)
 setParkDataType Sets the type of parking data stored in the park data file and presented to the user.
 
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.
 
bool isParked ()
 isParked is dome currently parked?
 
void SetParked (bool isparked)
 SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData.xml) is updated in the process.
 
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.
 
void SetAxis1ParkDefault (double steps)
 SetAxis1Park Set default AZ parking position.
 
virtual bool SetCurrentPark ()
 SetCurrentPark Set current coordinates/encoders value as the desired parking position.
 
virtual bool SetDefaultPark ()
 SetDefaultPark Set default coordinates/encoders value as the desired parking position.
 
const char * LoadParkData ()
 
bool WriteParkData ()
 
bool GetTargetAz (double &Az, double &Alt, double &minAz, double &maxAz)
 GetTargetAz.
 
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)
 
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.
 
bool OpticalVector (double Az, double Alt, point3D &OV)
 OpticalVector This function calculates a second point for determining the optical axis.
 
bool CheckHorizon (double HA, double dec, double lat)
 CheckHorizon Returns true if telescope points above horizon.
 
virtual bool saveConfigItems (FILE *fp) override
 saveConfigItems Saves the Device Port and Dome Presets in the configuration file
 
void UpdateMountCoords ()
 updateCoords updates the horizontal coordinates (Az & Alt) of the mount from the snooped RA, DEC and observer's location.
 
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.
 
virtual bool Handshake ()
 perform handshake with device to check communication
 
virtual void ActiveDevicesUpdated ()
 
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. Dynamic 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.
 
virtual bool loadConfig (bool silent=false, const char *property=nullptr)
 Load the last saved configuration file.
 
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.
 
virtual bool saveConfig (bool silent=false, const char *property=nullptr)
 Save the current properties in a configuration file.
 
bool saveConfig (INDI::Property &property)
 Save a property in the configuration file.
 
virtual bool purgeConfig ()
 purgeConfig Remove config file from disk.
 
virtual bool saveAllConfigItems (FILE *fp)
 saveAllConfigItems Save all the drivers' properties in the configuration file
 
virtual bool loadDefaultConfig ()
 Load the default configuration file.
 
void setDebug (bool enable)
 Toggle driver debug status A driver can be more verbose if Debug option is enabled by the client.
 
void setSimulation (bool enable)
 Toggle driver simulation status A driver can run in simulation mode if Simulation option is enabled by the client.
 
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.
 
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.
 
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.
 
virtual bool Disconnect ()
 Disconnect from device.
 
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()
 
bool unRegisterConnection (Connection::Interface *existingConnection)
 unRegisterConnection Remove connection from existing pool
 
Connection::Interface * getActiveConnection ()
 
void setActiveConnection (Connection::Interface *existingConnection)
 setActiveConnection Switch the active connection to the passed connection plugin
 
void setDefaultPollingPeriod (uint32_t msec)
 setDefaultPollingPeriod Change the default polling period to call TimerHit() function in the driver.
 
void setPollingPeriodRange (uint32_t minimum, uint32_t maximum)
 setPollingPeriodRange Set the range permitted by the polling range in milliseconds
 
uint32_t getPollingPeriod () const
 getPollingPeriod Return the polling period.
 
void setCurrentPollingPeriod (uint32_t msec)
 setCurrentPollingPeriod Change the current polling period to call TimerHit() function in the driver.
 
uint32_t getCurrentPollingPeriod () const
 getCurrentPollingPeriod Return the current polling period.
 
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.
 
bool isInitializationComplete () const
 isInitializationComplete Check if driver initialization is complete.
 
void syncDriverInfo ()
 syncDriverInfo sends the current driver information to the client.
 
virtual const char * getDefaultName ()=0
 
void setDeviceNickname (const char *nick)
 Set the device nickname.
 
const char * getDeviceNickname ()
 
const char * lookupDeviceNicknameFromId (const char *identifier, const char *device=nullptr)
 Lookup device nickname for an identifier.
 
bool setDeviceNicknameFromId (const char *identifier)
 Set device nickname based on an identifier.
 
void saveNicknameId (const char *nickname, const char *identifier)
 
virtual void nicknameSet (const char *nickname)
 Inform driver that the nickname has been set.
 
 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

INDI::PropertyNumber DomeSpeedNP {1}
 
INDI::PropertySwitch DomeMotionSP {2}
 
INDI::PropertyNumber DomeAbsPosNP {1}
 
INDI::PropertyNumber DomeRelPosNP {1}
 
INDI::PropertySwitch AbortSP {1}
 
INDI::PropertyNumber DomeParamNP {1}
 
INDI::PropertyNumber DomeSyncNP {1}
 
INDI::PropertySwitch DomeShutterSP {2}
 
INDI::PropertySwitch ParkSP {2}
 
INDI::PropertyNumber ParkPositionNP {1}
 
INDI::PropertySwitch ParkOptionSP {3}
 
INDI::PropertyText ActiveDeviceTP {3}
 
INDI::PropertySwitch MountPolicySP {2}
 
INDI::PropertySwitch ShutterParkPolicySP {2}
 
INDI::PropertyNumber PresetNP {3}
 
INDI::PropertySwitch PresetGotoSP {3}
 
INDI::PropertyNumber DomeMeasurementsNP {6}
 
INDI::PropertySwitch OTASideSP {5}
 
int mountOTASide = 0
 
INDI::PropertySwitch DomeAutoSyncSP {2}
 
INDI::PropertySwitch DomeBacklashSP {2}
 
INDI::PropertyNumber DomeBacklashNP {1}
 
uint32_t capability
 
DomeParkData parkDataType
 
double prev_az
 
double prev_alt
 
double prev_ra
 
double prev_dec
 
int PortFD = -1
 
Connection::Serial * serialConnection = nullptr
 
Connection::TCP * tcpConnection = 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< BaseDevicePrivate > d_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 Coordinates 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 degrees 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
ACTIVE_MOUNT 
ACTIVE_INPUT 
ACTIVE_OUTPUT 

Definition at line 555 of file indidome.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
SHUTTER_CLOSE_ON_PARK 
SHUTTER_OPEN_ON_UNPARK 

Definition at line 567 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 581 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 53 of file indidome.cpp.

◆ ~Dome()

Dome::~Dome ( )
virtual

Definition at line 77 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 AlpacaDome, BaaderDome, DDW, DomeScript, DomeSim, DomePro2, DragonLAIR, HakosRoof, Beaver, RigelDome, RollOff, RTIDome, ScopeDome, and UniversalROR.

Definition at line 2179 of file indidome.cpp.

◆ ActiveDevicesUpdated()

virtual void INDI::Dome::ActiveDevicesUpdated ( )
inlineprotectedvirtual

Signal to concrete driver when Active Devices are updated.

Reimplemented in UniversalROR.

Definition at line 527 of file indidome.h.

◆ buttonHelper()

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

Definition at line 1131 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 1602 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 AlpacaDome, BaaderDome, DDW, DomeScript, DomeSim, DomePro2, Beaver, RigelDome, RTIDome, and ScopeDome.

Definition at line 2254 of file indidome.cpp.

◆ Csc()

double Dome::Csc ( double  x)
protected

Definition at line 1592 of file indidome.cpp.

◆ GetAxis1Park()

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

Definition at line 1977 of file indidome.cpp.

◆ GetAxis1ParkDefault()

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

Definition at line 1982 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 2408 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 1169 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 1697 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

The problem to get a dome azimuth given a telescope azimuth, altitude and geometry (telescope placement, mount geometry) can be seen as solve the intersection between the optical axis with the dome, that is, the intersection between a line and a sphere. To do that we need to calculate the optical axis line taking the centre of the dome as origin of coordinates. Returns false if it can't solve it due bad geometry of the observatory Returns:

Parameters
Az: Azimuth required to the dome in order to center the shutter aperture with telescope
minAzMinimum azimuth in order to avoid any dome interference to the full aperture of the telescope
maxAzMaximum azimuth in order to avoid any dome interference to the full aperture of the telescope

Definition at line 1335 of file indidome.cpp.

◆ Handshake()

bool Dome::Handshake ( )
protectedvirtual

perform handshake with device to check communication

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

Definition at line 2390 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 1770 of file indidome.cpp.

◆ initProperties()

bool Dome::initProperties ( )
overridevirtual

Initialize properties initial state and value. The child class must implement this function.

Returns
True if initialization is successful, false otherwise.

Reimplemented from INDI::DefaultDevice.

Reimplemented in AlpacaDome, BaaderDome, DDW, DomeScript, DomeSim, DomePro2, DragonLAIR, HakosRoof, Beaver, RigelDome, RollOff, RTIDome, ScopeDome, and UniversalROR.

Definition at line 105 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 1533 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 AlpacaDome, DomeScript, DragonLAIR, and HakosRoof.

Definition at line 270 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 1123 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 AlpacaDome, DomeSim, DomePro2, HakosRoof, Beaver, RigelDome, RTIDome, and ScopeDome.

Definition at line 394 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 AlpacaDome, BaaderDome, DomeScript, DomePro2, DragonLAIR, HakosRoof, Beaver, RigelDome, RollOff, RTIDome, ScopeDome, and UniversalROR.

Definition at line 503 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 AlpacaDome, DomeScript, DragonLAIR, HakosRoof, ScopeDome, and UniversalROR.

Definition at line 809 of file indidome.cpp.

◆ isParked()

bool Dome::isParked ( )
protected

isParked is dome currently parked?

Returns
True if parked, false otherwise.

Definition at line 1765 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 DragonLAIR, RollOff, and UniversalROR.

Definition at line 841 of file indidome.cpp.

◆ LoadParkData()

const char * Dome::LoadParkData ( )
protected

Definition at line 1884 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 AlpacaDome, DomeScript, DomeSim, DomePro2, DragonLAIR, HakosRoof, Beaver, RigelDome, RollOff, RTIDome, ScopeDome, and UniversalROR.

Definition at line 1999 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 AlpacaDome, BaaderDome, DDW, DomeScript, DomeSim, DomePro2, Beaver, RigelDome, RTIDome, and ScopeDome.

Definition at line 2107 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 AlpacaDome, BaaderDome, DomeSim, DomePro2, Beaver, RigelDome, RTIDome, and ScopeDome.

Definition at line 2039 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 1557 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 1579 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 AlpacaDome, BaaderDome, DDW, DomeScript, DomeSim, DomePro2, DragonLAIR, HakosRoof, Beaver, RigelDome, RollOff, RTIDome, ScopeDome, and UniversalROR.

Definition at line 2295 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 AlpacaDome, BaaderDome, DDW, DomeScript, DomeSim, DomePro2, DragonLAIR, HakosRoof, Beaver, RollOff, ScopeDome, and UniversalROR.

Definition at line 1083 of file indidome.cpp.

◆ Sec()

double Dome::Sec ( double  x)
protected

Definition at line 1597 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 specified by the DomeParkData type).

Definition at line 1987 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 specified by the DomeParkData type).

Definition at line 1994 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 1061 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 1071 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 AlpacaDome, BaaderDome, DDW, DomeSim, DomePro2, Beaver, RigelDome, RTIDome, and ScopeDome.

Definition at line 2378 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 AlpacaDome, BaaderDome, DDW, DomeSim, DomePro2, Beaver, RigelDome, RTIDome, and ScopeDome.

Definition at line 2384 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 1689 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 2413 of file indidome.cpp.

◆ setDomeState()

void Dome::setDomeState ( const DomeState &  value)

Definition at line 1217 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 1715 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 1759 of file indidome.cpp.

◆ setShutterState()

void Dome::setShutterState ( const ShutterState &  value)

Definition at line 1177 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

Reimplemented in AlpacaDome.

Definition at line 2233 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 AlpacaDome, DomePro2, RigelDome, and RTIDome.

Definition at line 2172 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 AlpacaDome, BaaderDome, DDW, DomeScript, DomeSim, DomePro2, DragonLAIR, HakosRoof, Beaver, RigelDome, RollOff, RTIDome, ScopeDome, and UniversalROR.

Definition at line 2349 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 1642 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 1614 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 AlpacaDome, BaaderDome, DDW, DomeScript, DomeSim, DomePro2, DragonLAIR, HakosRoof, Beaver, RigelDome, RollOff, RTIDome, ScopeDome, and UniversalROR.

Definition at line 284 of file indidome.cpp.

◆ WriteParkData()

bool Dome::WriteParkData ( )
protected

Definition at line 1915 of file indidome.cpp.

Member Data Documentation

◆ AbortSP

INDI::PropertySwitch INDI::Dome::AbortSP {1}
protected

Definition at line 540 of file indidome.h.

◆ ActiveDeviceTP

INDI::PropertyText INDI::Dome::ActiveDeviceTP {3}
protected

Definition at line 554 of file indidome.h.

◆ capability

uint32_t INDI::Dome::capability
protected

Definition at line 599 of file indidome.h.

◆ DomeAbsPosNP

INDI::PropertyNumber INDI::Dome::DomeAbsPosNP {1}
protected

Definition at line 536 of file indidome.h.

◆ DomeAutoSyncSP

INDI::PropertySwitch INDI::Dome::DomeAutoSyncSP {2}
protected

Definition at line 591 of file indidome.h.

◆ DomeBacklashNP

INDI::PropertyNumber INDI::Dome::DomeBacklashNP {1}
protected

Definition at line 597 of file indidome.h.

◆ DomeBacklashSP

INDI::PropertySwitch INDI::Dome::DomeBacklashSP {2}
protected

Definition at line 594 of file indidome.h.

◆ []

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

◆ DomeMeasurementsNP

INDI::PropertyNumber INDI::Dome::DomeMeasurementsNP {6}
protected

Definition at line 576 of file indidome.h.

◆ DomeMotionSP

INDI::PropertySwitch INDI::Dome::DomeMotionSP {2}
protected

Definition at line 534 of file indidome.h.

◆ DomeParamNP

INDI::PropertyNumber INDI::Dome::DomeParamNP {1}
protected

Definition at line 542 of file indidome.h.

◆ DomeRelPosNP

INDI::PropertyNumber INDI::Dome::DomeRelPosNP {1}
protected

Definition at line 538 of file indidome.h.

◆ DomeShutterSP

INDI::PropertySwitch INDI::Dome::DomeShutterSP {2}
protected

Definition at line 546 of file indidome.h.

◆ DomeSpeedNP

INDI::PropertyNumber INDI::Dome::DomeSpeedNP {1}
protected

Definition at line 532 of file indidome.h.

◆ DomeSyncNP

INDI::PropertyNumber INDI::Dome::DomeSyncNP {1}
protected

Definition at line 544 of file indidome.h.

◆ HaveLatLong

bool INDI::Dome::HaveLatLong = false
protected

Definition at line 618 of file indidome.h.

◆ HaveRaDec

bool INDI::Dome::HaveRaDec = false
protected

Definition at line 624 of file indidome.h.

◆ m_DomeState

DomeState INDI::Dome::m_DomeState
protected

Definition at line 611 of file indidome.h.

◆ m_MountState

IPState INDI::Dome::m_MountState
protected

Definition at line 613 of file indidome.h.

◆ m_ShutterState

ShutterState INDI::Dome::m_ShutterState
protected

Definition at line 612 of file indidome.h.

◆ mountEquatorialCoords

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

Definition at line 622 of file indidome.h.

◆ mountHoriztonalCoords

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

Definition at line 621 of file indidome.h.

◆ mountOTASide

int INDI::Dome::mountOTASide = 0
protected

Definition at line 590 of file indidome.h.

◆ MountPolicySP

INDI::PropertySwitch INDI::Dome::MountPolicySP {2}
protected

Definition at line 563 of file indidome.h.

◆ observer

IGeographicCoordinates INDI::Dome::observer
protected

Definition at line 616 of file indidome.h.

◆ OTASideSP

INDI::PropertySwitch INDI::Dome::OTASideSP {5}
protected

Definition at line 578 of file indidome.h.

◆ parkDataType

DomeParkData INDI::Dome::parkDataType
protected

Definition at line 600 of file indidome.h.

◆ ParkOptionSP

INDI::PropertySwitch INDI::Dome::ParkOptionSP {3}
protected

Definition at line 552 of file indidome.h.

◆ ParkPositionNP

INDI::PropertyNumber INDI::Dome::ParkPositionNP {1}
protected

Definition at line 550 of file indidome.h.

◆ ParkSP

INDI::PropertySwitch INDI::Dome::ParkSP {2}
protected

Definition at line 548 of file indidome.h.

◆ PortFD

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

Definition at line 605 of file indidome.h.

◆ PresetGotoSP

INDI::PropertySwitch INDI::Dome::PresetGotoSP {3}
protected

Definition at line 574 of file indidome.h.

◆ PresetNP

INDI::PropertyNumber INDI::Dome::PresetNP {3}
protected

Definition at line 573 of file indidome.h.

◆ prev_alt

double INDI::Dome::prev_alt
protected

Definition at line 602 of file indidome.h.

◆ prev_az

double INDI::Dome::prev_az
protected

Definition at line 602 of file indidome.h.

◆ prev_dec

double INDI::Dome::prev_dec
protected

Definition at line 602 of file indidome.h.

◆ prev_ra

double INDI::Dome::prev_ra
protected

Definition at line 602 of file indidome.h.

◆ serialConnection

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

Definition at line 607 of file indidome.h.

◆ ShutterParkPolicySP

INDI::PropertySwitch INDI::Dome::ShutterParkPolicySP {2}
protected

Definition at line 566 of file indidome.h.

◆ tcpConnection

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

Definition at line 608 of file indidome.h.


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