27#define HTTPLIB_NO_EXCEPTIONS
30#ifdef _USE_SYSTEM_JSONLIB
31#include <nlohmann/json.hpp>
47 virtual bool Connect()
override;
50 virtual bool ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n)
override;
62 enum { HOST_INDEX, PORT_INDEX };
66 enum { DESCRIPTION, DRIVER_INFO, DRIVER_VERSION, INTERFACE_VERSION };
72 std::unique_ptr<httplib::Client> m_AlpacaClient;
73 std::string m_Host =
"alpaca.local";
75 int m_DeviceNumber = 0;
76 uint32_t m_ClientID = 1;
77 uint32_t m_TransactionID = 0;
80 bool setupFilterWheel();
81 bool sendAlpacaGET(
const std::string &endpoint,
nlohmann::json &response);
82 bool sendAlpacaPUT(
const std::string &endpoint,
const std::string &data,
nlohmann::json &response);
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
virtual bool Disconnect() override
Disconnect from device.
virtual ~AlpacaFilterWheel()=default
virtual bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
virtual const char * getDefaultName() override
virtual void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
virtual bool SelectFilter(int position) override
Select a new filter position.
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual bool initProperties() override
Initialize 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 int QueryFilter() override
Return current filter position.
a class to store JSON values