41 virtual bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
42 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
88 bool readReport(uint8_t index);
89 bool readTemperature();
90 bool initializeHeaters();
95 bool setHeaterEnabled(uint8_t index,
bool enabled);
96 bool setHeaterParam(uint8_t index,
double period,
double duty);
103 bool sendCommand(
const char *
cmd,
char * res, uint32_t cmd_len, uint32_t res_len);
104 void hexDump(
char * buf,
const char * data, uint32_t size);
105 std::vector<std::string> split(
const std::string &input,
const std::string ®ex);
110 double calculateTemperature(uint8_t lsb, uint8_t msb);
111 uint8_t calculateCheckSum(
const char *
cmd, uint32_t len);
112 const char *getHeaterName(
int index);
113 template <
typename T> std::string to_string(
const T a_value,
const int n = 2);
138 std::vector<std::unique_ptr<ISwitchVectorProperty>> HeaterControlSP;
139 std::vector<std::unique_ptr<ISwitch[]>> HeaterControlS;
149 std::vector<std::unique_ptr<INumberVectorProperty>> HeaterParamNP;
150 std::vector<std::unique_ptr<INumber[]>> HeaterParamN;
160 std::vector<std::unique_ptr<INumberVectorProperty>> HeaterMonitorNP;
161 std::vector<std::unique_ptr<INumber[]>> HeaterMonitorN;
177 TEMPERATURE_SECONDARY,
179 TEMPERATURE_BACKPLATE,
186 double m_LastTemperature[3];
188 std::vector<std::unique_ptr<PID>> m_Controllers;
194 static const char DRIVER_SOM { 0x3B };
196 static constexpr
double TEMPERATURE_REPORT_THRESHOLD { 0.05 };
198 static constexpr
double TEMPERATURE_CONTROL_THRESHOLD { 0.1 };
199 static constexpr
const uint8_t DRIVER_LEN {32};
201 static constexpr
const uint8_t DRIVER_TIMEOUT {3};
204 static constexpr
const char *PRIMARY_TAB =
"Primary Backplate Heater";
206 static constexpr
const char *SECONDARY_TAB =
"Secondary Mirror Heater";
The Serial class manages connection with serial devices including Bluetooth. Serial communication is ...
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
virtual void TimerHit() override
Callback function to be called once SetTimer duration elapses.
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 updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
Number vector property descriptor.
Switch vector property descriptor.
Text vector property descriptor.