32 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
33 virtual bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
46 virtual bool Abort()
override;
47 virtual bool Sync(
double az)
override;
57 double m_TargetAz {0};
59 bool m_bShutterPresent {
false};
61 int m_nShutterPollCounter {0};
66 bool setupInitialParameters();
71 bool getFirmwareVersion();
72 bool getShutterFirmwareVersion();
73 bool getDomeAzimuth(
double &az);
74 bool getSlewingStatus(
int &status);
75 bool getHomedStatus(
int &status);
76 bool queryShutterState(
int &status);
77 bool getStepsPerRotation(uint32_t &steps);
78 bool getStepRate(uint32_t &rate);
79 bool getAcceleration(uint32_t &accel);
80 bool getHomePosition(
double &az);
81 bool getParkPosition(
double &az);
82 bool getMotorReversed(
bool &reversed);
83 bool getRainAction(
int &action);
84 bool getRainStatus(
bool &raining);
85 bool getShutterVoltage(
double &voltage,
double &cutoff);
87 bool sendShutterHello();
89 bool getShutterPresent(
bool &present);
94 bool gotoAzimuth(
double az);
95 bool syncAzimuth(
double az);
98 bool setHomePosition(
double az);
99 bool setParkPosition(
double az);
100 bool setStepsPerRotation(uint32_t steps);
101 bool setStepRate(uint32_t rate);
102 bool setAcceleration(uint32_t accel);
103 bool setMotorReversed(
bool reversed);
104 bool setRainAction(
int action);
119 bool sendCommand(
const char *
cmd,
char *res =
nullptr);
120 void hexDump(
char *buf,
const char *data,
int size);
146 SETTINGS_STEPS_PER_ROTATION,
148 SETTINGS_ACCELERATION
182 SHUTTER_VOLTAGE_CURRENT,
183 SHUTTER_VOLTAGE_CUTOFF
189 static constexpr const char *SETTINGS_TAB =
"Settings";
190 static constexpr const char *INFO_TAB =
"Info";
192 static const char DRIVER_STOP_CHAR {
'#' };
194 static constexpr const uint8_t DRIVER_TIMEOUT {3};
196 static constexpr const uint8_t DRIVER_LEN {64};
198 static constexpr const double DOME_AZ_THRESHOLD {0.01};
Class to provide general functionality of a Dome device.
ShutterOperation
Shutter operation command.
virtual IPState ControlShutter(ShutterOperation operation) override
Open or Close shutter.
virtual bool Handshake() override
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 UnPark() override
UnPark dome. The action of the Unpark command is dome specific, but it may include opening the shutte...
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual IPState Park() override
Goto Park Position. The park position is an absolute azimuth value.
virtual IPState MoveRel(double azDiff) override
Move the Dome to an relative position.
virtual bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
virtual ~RTIDome() override=default
virtual bool SetDefaultPark() override
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
virtual const char * getDefaultName() override
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual void TimerHit() override
Callback function to be called once SetTimer duration elapses.
virtual bool Abort() override
Abort all dome motion.
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
virtual bool Sync(double az) override
Sync sets the dome current azimuth as the supplied azimuth position.
virtual IPState Move(DomeDirection dir, DomeMotionCommand operation) override
Move the Dome in a particular direction.
virtual IPState MoveAbs(double az) override
Move the Dome to an absolute azimuth.