33 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
34 virtual bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
49 virtual bool Abort()
override;
50 virtual bool Sync(
double az)
override;
66 bool setupInitialParameters();
67 uint8_t processShutterStatus();
73 bool getFirmwareVersion();
74 bool getHardwareConfig();
76 bool getShutterStatus();
78 bool getDomeAzCoast();
82 bool getDomeAzStallCount();
88 bool setDomeAzCPR(uint32_t cpr);
89 bool gotoDomeAz(uint32_t az);
90 bool setDomeAzCoast(uint32_t coast);
91 bool killDomeAzMovement();
92 bool killDomeShutterMovement();
93 bool setDomeHomeAz(uint32_t az);
94 bool setDomeParkAz(uint32_t az);
95 bool setDomeAzStallCount(uint32_t steps);
96 bool calibrateDomeAz(
double az);
98 bool openDomeShutters();
99 bool closeDomeShutters();
100 bool gotoHomeDomeAz();
101 bool discoverHomeDomeAz();
102 bool setDomeLeftOn();
103 bool setDomeRightOn();
126 bool sendCommand(
const char *
cmd,
char * res =
nullptr,
int cmd_len = -1,
int res_len = -1);
127 void hexDump(
char * buf,
const char * data,
int size);
128 std::vector<std::string> split(
const std::string &input,
const std::string ®ex);
134 IText VersionT[2] {};
165 SETTINGS_AZ_STALL_COUNT
171 static constexpr
const char * INFO_TAB =
"Info";
172 static constexpr
const char * SETTINGS_TAB =
"Settings";
174 static const char DRIVER_STOP_CHAR { 0x3B };
176 static constexpr
const uint8_t DRIVER_TIMEOUT {3};
178 static constexpr
const uint8_t DRIVER_LEN {64};
180 static constexpr
const double DOME_AZ_THRESHOLD {0.01};
182 const std::map<uint8_t, std::string> DomeHardware =
184 {0x0D,
"DomePro2-d for classic domes"},
185 {0x0E,
"DomePro2-c for clamcshell domes"},
186 {0x0F,
"DomePro2-r for roll-off roof"}
189 const std::map<uint8_t, std::string> ShutterStatus =
195 {0x04,
"ShutterError"},
196 {0x05,
"shutter module is not communicating to the azimuth module"},
197 {0x06,
"shutter 1 opposite direction timeout error on open occurred"},
198 {0x07,
"shutter 1 opposite direction timeout error on close occurred"},
199 {0x08,
"shutter 2 opposite direction timeout error on open occurred"},
200 {0x09,
"shutter 2 opposite direction timeout error on close occurred"},
201 {0x0A,
"shutter 1 completion timeout error on open occurred"},
202 {0x0B,
"shutter 1 completion timeout error on close occurred"},
203 {0x0C,
"shutter 2 completion timeout error on open occurred"},
204 {0x0D,
"shutter 2 completion timeout error on close occurred"},
205 {0x0E,
"shutter 1 limit fault on open occurred"},
206 {0x0F,
"shutter 1 limit fault on close occurred"},
207 {0x10,
"shutter 2 limit fault on open occurred"},
208 {0x11,
"shutter 2 limit fault on close occurred"},
209 {0x12,
"Shutter disabled (Shutter Enable input is not asserted)"},
210 {0x13,
"Intermediate"},
212 {0x15,
"shutter 1 OCP trip on open occurred"},
213 {0x16,
"shutter 1 OCP trip on close occurred"},
214 {0x17,
"shutter 2 OCP trip on open occurred"},
215 {0x18,
"shutter 2 OCP trip on close occurred"}
218 const std::map<std::string, std::string> DomeStatus =
221 {
"Left",
"Moving Left"},
222 {
"Right",
"Moving Right"},
224 {
"Homing",
"Homing"},
225 {
"Parking",
"Parking"},
226 {
"Gauging",
"Gauging"},
227 {
"Timeout",
"Azimuth movement timeout"},
228 {
"Stall",
"Azimuth encoder registering insufficent counts… motor stalled"},
229 {
"OCP",
"Over Current Protection was tripped"}
virtual void TimerHit() override
Callback function to be called once SetTimer duration elapses.
virtual IPState UnPark() override
UnPark dome. The action of the Unpark command is dome specific, but it may include opening the shutte...
virtual IPState ControlShutter(ShutterOperation operation) override
Open or Close shutter.
virtual bool Sync(double az) override
Sync sets the dome current azimuth as the supplied azimuth position.
virtual const char * getDefaultName() override
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
virtual IPState MoveRel(double azDiff) override
Move the Dome to an relative position.
virtual IPState MoveAbs(double az) override
Move the Dome to an absolute azimuth.
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
virtual bool SetDefaultPark() override
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
virtual IPState Move(DomeDirection dir, DomeMotionCommand operation) override
Move the Dome in a particular direction.
virtual bool Handshake() override
perform handshake with device to check communication
virtual bool Abort() override
Abort all dome motion.
virtual ~DomePro2() override=default
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Saves the Device Port and Dome Presets in the configuration file
virtual IPState Park() override
Goto Park Position. The park position is an absolute azimuth value.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
Class to provide general functionality of a Dome device.
ShutterOperation
Shutter operation command.
Number vector property descriptor.
Switch vector property descriptor.
Text vector property descriptor.