51 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
67 bool setPowerLEDEnabled(
bool enabled);
68 bool setUSBHubEnabled(
bool enabled);
70 bool setUSBPortEnabled(uint8_t port,
bool enabled);
71 void setFirmwareVersion();
72 void setBootstrapUSB();
73 void updateUSBPower();
76 bool sendCommand(
const char *command,
char *res);
77 void cleanupResponse(
char *response);
78 std::vector<std::string> split(
const std::string &input,
const std::string ®ex);
82 bool initialized {
false };
106 enum { USB_OFF, USB_ON };
109 std::map<int, SwitchMap> usbPort =
111 { 0, { .S = USBPort1S, .SP = &USBPort1SP } },
112 { 1, { .S = USBPort2S, .SP = &USBPort2SP } },
113 { 2, { .S = USBPort3S, .SP = &USBPort3SP } },
114 { 3, { .S = USBPort4S, .SP = &USBPort4SP } },
115 { 4, { .S = USBPort5S, .SP = &USBPort5SP } },
116 { 5, { .S = USBPort6S, .SP = &USBPort6SP } }
155 static constexpr
const uint8_t PEGASUS_TIMEOUT {3};
156 static constexpr
const uint8_t PEGASUS_LEN {32};
157 static constexpr
const char *USB_TAB {
"USB"};
158 static constexpr
const char *INFO_TAB {
"INFO"};
The Serial class manages connection with serial devices including Bluetooth. Serial communication is ...
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
virtual void TimerHit() override
Callback function to be called once SetTimer duration elapses.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
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....
Combines all INDI Connection Plugins. Each INDI connection plugin is responsible of managing communic...
ISwitchVectorProperty * SP
Switch vector property descriptor.
Text vector property descriptor.