37 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
38 virtual bool ISNewNumber(
const char * dev,
const char * name,
double values[],
char * names[],
int n)
override;
52 virtual bool Abort()
override;
53 virtual bool Sync(
double az)
override;
66 double targetAz { 0 };
69 double previousAngle { -1 };
70 int stuckAngleCounter { 0 };
71 static constexpr const int STUCK_THRESHOLD = 3;
72 static constexpr const double ANGLE_TOLERANCE = 1.0;
77 bool setShutterConnected(
bool enabled);
78 bool isShutterConnected();
79 bool readShutterStatus();
88 bool readHomePosition();
89 bool getStartupValues();
91 bool readBatteryLevels();
92 bool readStepsPerRevolution();
97 bool setParkAz(
double az);
100 bool setHome(
double az);
105 bool sendCommand(
const char *
cmd,
char * res =
nullptr,
int cmd_len = -1,
int res_len = -1);
106 void hexDump(
char * buf,
const char * data,
int size);
107 std::vector<std::string> split(
const std::string &input,
const std::string ®ex);
135 static constexpr const char * INFO_TAB =
"Info";
137 static const char DRIVER_STOP_CHAR { 0x0D };
139 static constexpr const uint8_t DRIVER_TIMEOUT {3};
141 static constexpr const uint8_t DRIVER_LEN {64};
Class to provide general functionality of a Dome device.
ShutterOperation
Shutter operation command.
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
virtual bool SetDefaultPark() override
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
virtual IPState ControlShutter(ShutterOperation operation) override
Open or Close shutter.
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 void TimerHit() override
Callback function to be called once SetTimer duration elapses.
virtual bool Sync(double az) override
Sync sets the dome current azimuth as the supplied azimuth position.
virtual bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
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.
virtual bool Abort() override
Abort all dome motion.
virtual IPState Park() override
Goto Park Position. The park position is an absolute azimuth value.
virtual ~RigelDome() override=default
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual const char * getDefaultName() override
virtual IPState MoveRel(double azDiff) override
Move the Dome to an relative position.
virtual bool Handshake() override
perform handshake with device to check communication