40 virtual bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
41 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
90 bool isGOTOComplete();
92 bool readTemperature();
94 bool readCalibrationState();
95 bool readMaxSlewLimit();
100 bool setFanEnabled(
bool enabled);
101 bool setCalibrationEnabled(
bool enabled);
107 int readByte(
int fd, uint8_t *buf,
int timeout,
int *nbytes_read);
108 int readBytes(
int fd, uint8_t *buf,
int nbytes,
int timeout,
int *nbytes_read);
109 int writeBytes(
int fd,
const uint8_t *buf,
int nbytes,
int *nbytes_written);
110 int readPacket(
int fd, uint8_t *buf,
int nbytes,
int timeout,
int *nbytes_read);
111 bool sendCommand(
const uint8_t *
cmd, uint8_t * res, uint32_t cmd_len, uint32_t res_len);
112 char * efaDump(
char * buf,
int buflen,
const uint8_t * data, uint32_t size);
113 std::vector<std::string> split(
const std::string &input,
const std::string ®ex);
118 void getStartupValues();
119 double calculateTemperature(uint8_t byte2, uint8_t byte3);
120 bool validateLengths(
const uint8_t *
cmd, uint32_t len);
121 uint8_t calculateCheckSum(
const uint8_t *
cmd, uint32_t len);
122 template <
typename T> std::string to_string(
const T a_value,
const int n = 2);
152 FAN_AUTOMATIC_ABSOLUTE,
153 FAN_AUTOMATIC_RELATIVE,
171 FAN_OFF_ON_DISCONNECT
195 double m_LastTemperature[2];
196 double m_LastPosition {0};
198 bool IN_TIMER =
false;
204 static const uint8_t DRIVER_SOM { 0x3B };
206 static constexpr
double TEMPERATURE_THRESHOLD { 0.05 };
208 static constexpr
const uint8_t DRIVER_LEN {9};
210 static constexpr
const uint8_t DRIVER_TIMEOUT {3};
212 static constexpr
const char *FAN_TAB =
"Fan";
virtual bool SyncFocuser(uint32_t ticks) override
Sync focuser.
virtual IPState MoveRelFocuser(FocusDirection dir, unsigned int ticks) override
Move Focuser relatively.
@ MTR_GET_APPROACH_DIRECTION
@ MTR_SET_CALIBRATION_STATE
@ MTR_GET_CALIBRATION_STATE
virtual bool ReverseFocuser(bool enabled) override
Reverse Focuser Motion.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Saves the Device Port and Focuser Presets in the configuration file
virtual bool Handshake() override
perform handshake with device to check communication
virtual bool SetFocuserMaxPosition(uint32_t ticks) override
Set Maximum Position.
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 void TimerHit() override
Callback function to be called once SetTimer duration elapses.
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual IPState MoveAbsFocuser(uint32_t targetTicks) override
Move Absolute Focuser.
virtual bool AbortFocuser() override
AbortFocuser all focus motion.
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool Disconnect() override
Disconnect from device.
Number vector property descriptor.
Switch vector property descriptor.
Text vector property descriptor.