182 virtual bool ISNewNumber(
const char * dev,
const char * name,
double values[],
char * names[],
int n)
override;
183 virtual bool ISNewSwitch(
const char * dev,
const char * name,
ISState * states,
char * names[],
int n)
override;
184 virtual bool ISNewText(
const char * dev,
const char * name,
char * texts[],
char * names[],
int n)
override;
331 virtual bool Sync(
double az);
337 virtual bool Abort();
395 m_ShutterParkPolicyHandledByDriver = enabled;
479 bool GetTargetAz(
double &Az,
double &Alt,
double &minAz,
double &maxAz);
551 double Csc(
double x);
552 double Sec(
double x);
649 void processButton(
const char * button_n,
ISState state);
650 void triggerSnoop(
const char * driverName,
const char * propertyName);
655 void SyncParkStatus(
bool isparked);
660 const char * LoadParkXML();
667 std::string GetHomeDirectory()
const;
671 bool IsParked =
false;
672 bool IsMountParked =
true;
673 bool IsLocked =
true;
674 bool AutoSyncWarning =
false;
675 bool UseHourAngle =
false;
677 const char * ParkDeviceName;
678 const std::string ParkDataFileName;
681 XMLEle * ParkdataXmlRoot, *ParkdeviceXml, *ParkstatusXml, *ParkpositionXml, *ParkpositionAxis1Xml;
683 double Axis1ParkPosition;
684 double Axis1DefaultParkPosition;
686 bool callHandshake();
694 enum ShutterParkSequence
696 SHUTTER_SEQUENCE_NONE,
697 SHUTTER_SEQUENCE_PARK,
698 SHUTTER_SEQUENCE_UNPARK
706 void shutterParkMotionDone();
708 void checkShutterParkSequence();
710 void cancelShutterParkSequence();
712 bool m_ShutterParkPolicyHandledByDriver {
false};
713 ShutterParkSequence m_ShutterParkSequence {SHUTTER_SEQUENCE_NONE};
714 bool m_ShutterParkCommandSent {
false};
715 bool m_ShutterParkMotionDone {
false};
716 bool m_ShutterParkShutterDone {
false};
717 bool m_ShutterParkShutterFailed {
false};
718 INDI::Timer m_ShutterParkTimer;
719 static constexpr uint32_t SHUTTER_PARK_POLL_INTERVAL { 1000 };
722 static constexpr uint32_t HORZ_UPDATE_TIMER { 10000 };
The Serial class manages connection with serial devices including Bluetooth. Serial communication is ...
The TCP class manages connection with devices over the network via TCP/IP. Upon successful connection...
The Controller class provides functionality to access a controller (e.g. joystick) input and send it ...
INDI::PropertySwitch PresetGotoSP
INDI::IHorizontalCoordinates mountHoriztonalCoords
Connection::TCP * tcpConnection
virtual IPState UnPark()
UnPark dome. The action of the Unpark command is dome specific, but it may include opening the shutte...
void SetParked(bool isparked)
SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData....
void SetDomeCapability(uint32_t cap)
SetDomeCapability set the dome capabilities. All capabilities must be initialized.
void setDomeConnection(const uint8_t &value)
setDomeConnection Set Dome connection mode. Child class should call this in the constructor before Do...
INDI::PropertySwitch ShutterParkPolicySP
INDI::PropertySwitch ParkOptionSP
const char * GetShutterStatusString(ShutterState status)
getShutterStatusString
INDI::IEquatorialCoordinates mountEquatorialCoords
bool CheckHorizon(double HA, double dec, double lat)
CheckHorizon Returns true if telescope points above horizon.
INDI::PropertyNumber DomeRelPosNP
bool isParked()
isParked is dome currently parked?
INDI::PropertyNumber DomeParamNP
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.
INDI::PropertyNumber ParkPositionNP
virtual bool SetSpeed(double rpm)
SetSpeed Set Dome speed. This does not initiate motion, it sets the speed for the next motion command...
virtual bool Sync(double az)
Sync sets the dome current azimuth as the supplied azimuth position.
virtual void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
ShutterState m_ShutterState
void SetAxis1Park(double value)
SetRAPark Set current AZ parking position. The data park file (stored in ~/.indi/ParkData....
void UpdateMountCoords()
updateCoords updates the horizontal coordinates (Az & Alt) of the mount from the snooped RA,...
ShutterOperation
Shutter operation command.
IPState getMountState() const
void SetAxis1ParkDefault(double steps)
SetAxis1Park Set default AZ parking position.
INDI::PropertySwitch AbortSP
INDI::PropertyNumber DomeSpeedNP
virtual bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
INDI::PropertyNumber DomeMeasurementsNP
virtual void UpdateAutoSync()
UpdateAutoSync This function calculates the target dome azimuth from the mount's target coordinates g...
INDI::PropertyNumber DomeBacklashNP
virtual IPState MoveRel(double azDiff)
Move the Dome to an relative position.
uint32_t GetDomeCapability() const
GetDomeCapability returns the capability of the dome.
bool isLocked()
isLocked, is the dome currently locked?
@ DOME_HAS_VARIABLE_SPEED
virtual void ActiveDevicesUpdated()
INDI::PropertySwitch ParkSP
virtual bool SetBacklash(int32_t steps)
SetBacklash Set the dome backlash compensation value.
double GetAxis1ParkDefault()
virtual IPState Park()
Goto Park Position. The park position is an absolute azimuth value.
const char * LoadParkData()
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
INDI::PropertyNumber DomeAbsPosNP
DomeMeasurements
Measurements necessary for dome-slit synchronization. All values are in meters. The displacements are...
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool SetDefaultPark()
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
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...
virtual bool SetBacklashEnabled(bool enabled)
SetBacklashEnabled Enables or disables the dome backlash compensation.
virtual IPState MoveAbs(double az)
Move the Dome to an absolute azimuth.
INDI::PropertySwitch DomeMotionSP
IGeographicCoordinates observer
virtual bool ISSnoopDevice(XMLEle *root) override
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
static void buttonHelper(const char *button_n, ISState state, void *context)
INDI::PropertySwitch DomeBacklashSP
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Saves the Device Port and Dome Presets in the configuration file
virtual bool SetCurrentPark()
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
void setShutterState(const ShutterState &value)
bool OpticalVector(double Az, double Alt, point3D &OV)
OpticalVector This function calculates a second point for determining the optical axis.
void setDomeState(const DomeState &value)
void SetShutterParkPolicyHandledByDriver(bool enabled)
SetShutterParkPolicyHandledByDriver By default, INDI::Dome applies the shutter park policy (DOME_SHUT...
bool InitPark()
InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking...
Connection::Serial * serialConnection
INDI::PropertySwitch MountPolicySP
void SetParkDataType(DomeParkData type)
setParkDataType Sets the type of parking data stored in the park data file and presented to the user.
INDI::PropertySwitch DomeAutoSyncSP
INDI::PropertySwitch DomeShutterSP
DomeParkData parkDataType
ShutterState getShutterState() const
virtual bool Handshake()
perform handshake with device to check communication
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual IPState ControlShutter(ShutterOperation operation)
Open or Close shutter.
INDI::PropertyText ActiveDeviceTP
DomeState getDomeState() const
INDI::PropertySwitch OTASideSP
bool GetTargetAz(double &Az, double &Alt, double &minAz, double &maxAz)
GetTargetAz.
INDI::PropertyNumber DomeSyncNP
uint8_t getDomeConnection() const
virtual IPState Move(DomeDirection dir, DomeMotionCommand operation)
Move the Dome in a particular direction.
INDI::PropertyNumber PresetNP
virtual bool Abort()
Abort all dome motion.
The Timer class provides repetitive and single-shot timers.
*brief user defined string literal for JSON values *sa std::size_t n
Combines all INDI Connection Plugins. Each INDI connection plugin is responsible of managing communic...
Namespace to encapsulate INDI client, drivers, and mediator classes.
Holds the connection mode of the Dome.