Instrument Neutral Distributed Interface INDI
1.9.5
|
Go to the documentation of this file.
36 typedef SSIZE_T ssize_t;
69 void setServer(
const char *hostname,
unsigned int port);
88 void watchProperty(
const char *deviceName,
const char *propertyName);
143 bool getDevices(std::vector<INDI::BaseDevice *> &deviceList, uint16_t driverInterface);
176 return cServer.c_str();
186 void sendNewText(
const char *deviceName,
const char *propertyName,
const char *elementName,
const char *text);
190 void sendNewNumber(
const char *deviceName,
const char *propertyName,
const char *elementName,
double value);
194 void sendNewSwitch(
const char *deviceName,
const char *propertyName,
const char *elementName);
201 void sendOneBlob(
const char *blobName,
unsigned int blobSize,
const char *blobFormat,
void *blobBuffer);
231 timeout_sec = seconds;
232 timeout_us = microseconds;
266 std::string property;
270 BLOBMode *findBLOBMode(
const std::string &
device,
const std::string &property);
277 void setDriverConnection(
bool status,
const char *deviceName);
284 QTcpSocket client_socket;
286 std::vector<INDI::BaseDevice *> cDevices;
287 std::vector<std::string> cDeviceNames;
288 std::vector<BLOBMode *> blobModes;
289 std::map<std::string, std::set<std::string>> cWatchProperties;
299 uint32_t timeout_sec, timeout_us;
304 void processSocketError(QAbstractSocket::SocketError socketError);
bool connectServer()
Connect to INDI server.
void disconnectDevice(const char *deviceName)
Disconnect INDI driver.
INDI::BaseDevice * findDev(const char *devName, char *errmsg)
Find and return a particular device.
INDI::BaseDevice * getDevice(const char *deviceName)
Constants and Data structure definitions for the interface to the reference INDI C API implementation...
bool isServerConnected() const
void watchDevice(const char *deviceName)
Add a device to the watch list.
const char * timestamp()
Create an ISO 8601 formatted time stamp. The format is YYYY-MM-DDTHH:MM:SS.
BLOBHandling getBLOBMode(const char *dev, const char *prop=nullptr)
getBLOBMode Get Binary Large Object policy mode IF set previously by setBLOBMode
void watchProperty(const char *deviceName, const char *propertyName)
watchProperties Add a property to the watch list. When communicating with INDI server....
int messageCmd(XMLEle *root, char *errmsg)
Class to provide basic client functionality based on Qt5 toolkit and is therefore suitable for cross-...
const std::vector< INDI::BaseDevice * > & getDevices() const
Text vector property descriptor.
void setConnectionTimeout(uint32_t seconds, uint32_t microseconds)
setConnectionTimeout Set connection timeout. By default it is 3 seconds.
Number vector property descriptor.
BaseClientQt(QObject *parent=Q_NULLPTR)
void sendNewText(ITextVectorProperty *pp)
Send new Text command to server.
Interface to the reference INDI C API device implementation on the Device Driver side.
INDI::BaseDevice * addDevice(XMLEle *dep, char *errmsg)
Add a new device.
BLOBHandling
How drivers handle BLOBs incoming from snooping drivers.
void finishBlob()
Send closing tag for BLOB command to server.
int delPropertyCmd(XMLEle *root, char *errmsg)
Delete property command.
void sendNewSwitch(ISwitchVectorProperty *pp)
Send new Switch command to server.
virtual void newUniversalMessage(std::string message)
newUniversalMessage Universal messages are sent from INDI server without a specific device....
void sendOneBlob(IBLOB *bp)
Send ONE blob content to server. The BLOB data in raw binary format and will be converted to base64 a...
void setServer(const char *hostname, unsigned int port)
Set the server host name and port.
void connectDevice(const char *deviceName)
Connect to INDI driver.
bool disconnectServer()
Disconnect from INDI server.
void sendNewNumber(INumberVectorProperty *pp)
Send new Number command to server.
int deleteDevice(const char *devName, char *errmsg)
Remove device.
int dispatchCommand(XMLEle *root, char *errmsg)
Dispatch command received from INDI server to respective devices handled by the client.
void startBlob(const char *devName, const char *propName, const char *timestamp)
Send opening tag for BLOB command to server.
bool isVerbose() const
isVerbose Is client in verbose mode?
Class to provide basic INDI device functionality.
void setBLOBMode(BLOBHandling blobH, const char *dev, const char *prop=nullptr)
Set Binary Large Object policy mode.
One Blob (Binary Large Object) descriptor.
void setVerbose(bool enable)
setVerbose Set verbose mode
static void * listenHelper(void *context)
Switch vector property descriptor.