40 bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
41 bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
62 bool isFocuserMoving =
false;
65 bool isGetTemperature =
false;
68 bool isCoverMoving =
false;
73 typedef enum { AUTO, MANUAL } ClimateControlMode;
75 typedef enum { ON, OFF } DewHeaterMode;
81 typedef enum { MICRO = 1, SPEED = 0 } SteppingMode;
82 SteppingMode steppingMode = MICRO;
87 bool getTemperature();
91 bool getClimateControl();
92 bool getPrimaryDewHeater();
93 bool getSecondaryDewHeater();
99 bool setStepping(SteppingMode mode);
100 bool setDustCover(
void);
101 bool setClimateControl(ClimateControlMode mode);
102 bool setPrimaryDewHeater(DewHeaterMode mode);
103 bool setSecondaryDewHeater(DewHeaterMode mode);
104 bool setFanPower(
int);
120 bool sendCommand(
const char *
cmd,
char * res =
nullptr,
int cmd_len = -1,
int res_len = -1);
121 bool sendCommandNoLock(
const char *
cmd,
char * res =
nullptr,
int cmd_len = -1,
int res_len = -1);
122 bool sendCommandOnly(
const char *
cmd,
int cmd_len = -1);
123 bool receiveNext(
char * res,
int res_len = -1);
133 void hexDump(
char * buf,
const char * data,
int size);
143 int32_t m_TargetDiff { 0 };
148 static constexpr const char * FOCUSER_TAB =
"Focus";
149 static constexpr const char * ROTATOR_TAB =
"Rotate";
150 static constexpr const char * CLIMATE_TAB =
"Climate";
151 static constexpr const char * DUSTCOVER_TAB =
"Dust Cover";
153 static const char DRIVER_STOP_CHAR { 0x0A };
156 static constexpr const uint8_t DRIVER_TEMPERATURE_FREQ {10};
158 static constexpr const uint8_t DRIVER_TIMEOUT {5};
160 static constexpr const uint8_t DRIVER_LEN {64};
virtual IPState UnParkCap() override
unPark dust cap (open cover). Must be implemented by child.
bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Processes incoming new switch states from the client for this device. Handles updates to FocuserInter...
const char * getDefaultName() override
bool updateProperties() override
Updates the state and definition of properties based on the current connection status....
virtual bool Handshake() override
Performs a device-specific handshake after a connection is established. This method should be overrid...
virtual IPState ParkCap() override
Park dust cap (close cover). Must be implemented by child.
bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Processes incoming new number values from the client for this device. Handles updates to FocuserInter...
void TimerHit() override
Callback function to be called once SetTimer duration elapses.
IPState MoveAbsFocuser(uint32_t targetTicks) override
MoveFocuser the focuser to an absolute position.
bool AbortFocuser() override
AbortFocuser all focus motion.
bool saveConfigItems(FILE *fp) override
bool initProperties() override
Initializes the default properties for the focuser device. Sets up standard INDI properties,...
IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks) override
MoveFocuser the focuser to an relative position.