64 void setServer(
const char *hostname,
unsigned int port);
108 const std::vector<INDI::BaseDevice *> &
getDevices()
const {
return cDevices; }
125 bool getDevices(std::vector<INDI::BaseDevice *> &deviceList, uint16_t driverInterface);
156 const char *
getHost() {
return cServer.c_str(); }
162 void sendNewText(
const char *deviceName,
const char *propertyName,
const char *elementName,
const char *text);
166 void sendNewNumber(
const char *deviceName,
const char *propertyName,
const char *elementName,
double value);
170 void sendNewSwitch(
const char *deviceName,
const char *propertyName,
const char *elementName);
177 void sendOneBlob(
const char *blobName,
unsigned int blobSize,
const char *blobFormat,
void *blobBuffer);
201 timeout_sec = seconds;
202 timeout_us = microseconds;
236 std::string property;
240 BLOBMode *findBLOBMode(
const std::string& device,
const std::string& property);
247 void setDriverConnection(
bool status,
const char *deviceName);
254 std::thread *listen_thread=
nullptr;
267 void sendString(
const char *fmt, ...);
269 std::vector<INDI::BaseDevice *> cDevices;
270 std::vector<std::string> cDeviceNames;
271 std::vector<BLOBMode *> blobModes;
281 uint32_t timeout_sec, timeout_us;
void setVerbose(bool enable)
setVerbose Set verbose mode
const char * timestamp()
Create an ISO 8601 formatted time stamp. The format is YYYY-MM-DDTHH:MM:SS.
void setBLOBMode(BLOBHandling blobH, const char *dev, const char *prop=NULL)
Set Binary Large Object policy mode.
static void * listenHelper(void *context)
void disconnectDevice(const char *deviceName)
Disconnect INDI driver.
INDI::BaseDevice * findDev(const char *devName, char *errmsg)
Find and return a particular device.
One Blob (Binary Large Object) descriptor.
void sendOneBlob(IBLOB *bp)
Send ONE blob content to server. The BLOB data in raw binary format and will be converted to base64 a...
int deleteDevice(const char *devName, char *errmsg)
Remove device.
bool isVerbose() const
isVerbose Is client in verbose mode?
Class to provide basic INDI device functionality.
Switch vector property descriptor.
void sendNewSwitch(ISwitchVectorProperty *pp)
Send new Switch command to server.
int dispatchCommand(XMLEle *root, char *errmsg)
Dispatch command received from INDI server to respective devices handled by the client.
BLOBHandling getBLOBMode(const char *dev, const char *prop=NULL)
getBLOBMode Get Binary Large Object policy mode IF set previously by setBLOBMode
bool isServerConnected() const
void sendNewText(ITextVectorProperty *pp)
Send new Text command to server.
void startBlob(const char *devName, const char *propName, const char *timestamp)
Send opening tag for BLOB command to server.
BLOBHandling
How drivers handle BLOBs incoming from snooping drivers.
Constants and Data structure definitions for the interface to the reference INDI C API implementation...
void setConnectionTimeout(uint32_t seconds, uint32_t microseconds)
setConnectionTimeout Set connection timeout. By default it is 3 seconds.
Number vector property descriptor.
INDI::BaseDevice * getDevice(const char *deviceName)
void sendNewNumber(INumberVectorProperty *pp)
Send new Number command to server.
const std::vector< INDI::BaseDevice * > & getDevices() const
bool connectServer()
Connect to INDI server.
void watchDevice(const char *deviceName)
Add a device to the watch list.
void setServer(const char *hostname, unsigned int port)
Set the server host name and port.
bool disconnectServer()
Disconnect from INDI server.
virtual void newUniversalMessage(std::string message)
newUniversalMessage Universal messages are sent from INDI server without a specific device...
void connectDevice(const char *deviceName)
Connect to INDI driver.
int delPropertyCmd(XMLEle *root, char *errmsg)
Delete property command.
int messageCmd(XMLEle *root, char *errmsg)
Text vector property descriptor.
Class to provide basic client functionality.
INDI::BaseDevice * addDevice(XMLEle *dep, char *errmsg)
Add a new device.
void finishBlob()
Send closing tag for BLOB command to server.