Instrument Neutral Distributed Interface INDI  1.9.2
Public Member Functions | Protected Member Functions | List of all members
MyClient Class Reference

#include <tutorial_client.h>

Inheritance diagram for MyClient:
INDI::BaseClient INDI::BaseMediator

Public Member Functions

 MyClient ()
 
 ~MyClient ()=default
 
void setTemperature ()
 
void takeExposure ()
 
- Public Member Functions inherited from INDI::BaseClient
 BaseClient ()
 
virtual ~BaseClient ()
 
void setServer (const char *hostname, unsigned int port)
 Set the server host name and port. More...
 
const char * getHost () const
 Get the server host name. More...
 
int getPort () const
 Get the port number. More...
 
bool connectServer ()
 Connect to INDI server. More...
 
bool disconnectServer (int exit_code=0)
 Disconnect from INDI server. More...
 
bool isServerConnected () const
 Get status of the connection. More...
 
void setConnectionTimeout (uint32_t seconds, uint32_t microseconds)
 setConnectionTimeout Set connection timeout. By default it is 3 seconds. More...
 
void serverDisconnected (int exit_code) override
 Emmited when the server gets disconnected. More...
 
void setVerbose (bool enable)
 setVerbose Set verbose mode More...
 
bool isVerbose () const
 isVerbose Is client in verbose mode? More...
 
void watchProperty (const char *deviceName, const char *propertyName)
 watchProperties Add a property to the watch list. When communicating with INDI server. More...
 
void watchDevice (const char *deviceName)
 Add a device to the watch list. More...
 
void connectDevice (const char *deviceName)
 Connect to INDI driver. More...
 
void disconnectDevice (const char *deviceName)
 Disconnect INDI driver. More...
 
INDI::BaseDevicegetDevice (const char *deviceName)
 
const std::vector< INDI::BaseDevice * > & getDevices () const
 
bool getDevices (std::vector< INDI::BaseDevice * > &deviceList, uint16_t driverInterface)
 getDevices Returns list of devices that belong to a particular DRIVER_INTERFACE class. More...
 
void setBLOBMode (BLOBHandling blobH, const char *dev, const char *prop=nullptr)
 Set Binary Large Object policy mode. More...
 
BLOBHandling getBLOBMode (const char *dev, const char *prop=nullptr)
 getBLOBMode Get Binary Large Object policy mode IF set previously by setBLOBMode More...
 
void sendNewText (ITextVectorProperty *pp)
 Send new Text command to server. More...
 
void sendNewText (const char *deviceName, const char *propertyName, const char *elementName, const char *text)
 Send new Text command to server. More...
 
void sendNewNumber (INumberVectorProperty *pp)
 Send new Number command to server. More...
 
void sendNewNumber (const char *deviceName, const char *propertyName, const char *elementName, double value)
 Send new Number command to server. More...
 
void sendNewSwitch (ISwitchVectorProperty *pp)
 Send new Switch command to server. More...
 
void sendNewSwitch (const char *deviceName, const char *propertyName, const char *elementName)
 Send new Switch command to server. More...
 
void startBlob (const char *devName, const char *propName, const char *timestamp)
 Send opening tag for BLOB command to server. More...
 
void sendOneBlob (IBLOB *bp)
 Send ONE blob content to server. The BLOB data in raw binary format and will be converted to base64 and sent to server. More...
 
void sendOneBlob (const char *blobName, unsigned int blobSize, const char *blobFormat, void *blobBuffer)
 Send ONE blob content to server. The BLOB data in raw binary format and will be converted to base64 and sent to server. More...
 
void finishBlob ()
 Send closing tag for BLOB command to server. More...
 
- Public Member Functions inherited from INDI::BaseMediator
virtual ~BaseMediator ()=default
 

Protected Member Functions

void newDevice (INDI::BaseDevice *dp) override
 Emmited when a new device is created from INDI server. More...
 
void removeDevice (INDI::BaseDevice *) override
 Emmited when a device is deleted from INDI server. More...
 
void newProperty (INDI::Property *property) override
 Emmited when a new property is created for an INDI driver. More...
 
void removeProperty (INDI::Property *) override
 Emmited when a property is deleted for an INDI driver. More...
 
void newBLOB (IBLOB *bp) override
 Emmited when a new BLOB value arrives from INDI server. More...
 
void newSwitch (ISwitchVectorProperty *) override
 Emmited when a new switch value arrives from INDI server. More...
 
void newNumber (INumberVectorProperty *nvp) override
 Emmited when a new number value arrives from INDI server. More...
 
void newMessage (INDI::BaseDevice *dp, int messageID) override
 Emmited when a new message arrives from INDI server. More...
 
void newText (ITextVectorProperty *) override
 Emmited when a new text value arrives from INDI server. More...
 
void newLight (ILightVectorProperty *) override
 Emmited when a new light value arrives from INDI server. More...
 
void serverConnected () override
 Emmited when the server is connected. More...
 
void serverDisconnected (int) override
 Emmited when the server gets disconnected. More...
 
- Protected Member Functions inherited from INDI::BaseClient
virtual void newUniversalMessage (std::string message)
 newUniversalMessage Universal messages are sent from INDI server without a specific device. It is addressed to the client overall. More...
 

Additional Inherited Members

- Protected Attributes inherited from INDI::BaseClient
std::unique_ptr< INDI::BaseClientPrivated_ptr
 

Detailed Description

Examples
tutorial_client.cpp, and tutorial_client.h.

Definition at line 39 of file tutorial_client.h.

Constructor & Destructor Documentation

◆ MyClient()

MyClient::MyClient ( )
Examples
tutorial_client.cpp, and tutorial_client.h.

Definition at line 71 of file tutorial_client.cpp.

◆ ~MyClient()

MyClient::~MyClient ( )
default

Member Function Documentation

◆ newBLOB()

void MyClient::newBLOB ( IBLOB bp)
overrideprotectedvirtual

Emmited when a new BLOB value arrives from INDI server.

Parameters
bpPointer to filled and process BLOB.

Implements INDI::BaseMediator.

Examples
tutorial_client.cpp, and tutorial_client.h.

Definition at line 182 of file tutorial_client.cpp.

◆ newDevice()

void MyClient::newDevice ( INDI::BaseDevice dp)
overrideprotectedvirtual

Emmited when a new device is created from INDI server.

Parameters
dpPointer to the base device instance

Implements INDI::BaseMediator.

Examples
tutorial_client.cpp, and tutorial_client.h.

Definition at line 119 of file tutorial_client.cpp.

◆ newLight()

void MyClient::newLight ( ILightVectorProperty lvp)
inlineoverrideprotectedvirtual

Emmited when a new light value arrives from INDI server.

Parameters
lvpPointer to a light vector property.

Implements INDI::BaseMediator.

Examples
tutorial_client.h.

Definition at line 58 of file tutorial_client.h.

◆ newMessage()

void MyClient::newMessage ( INDI::BaseDevice dp,
int  messageID 
)
overrideprotectedvirtual

Emmited when a new message arrives from INDI server.

Parameters
dppointer to the INDI device the message is sent to.
messageIDID of the message that can be used to retrieve the message from the device's messageQueue() function.

Implements INDI::BaseMediator.

Examples
tutorial_client.cpp, and tutorial_client.h.

Definition at line 170 of file tutorial_client.cpp.

◆ newNumber()

void MyClient::newNumber ( INumberVectorProperty nvp)
overrideprotectedvirtual

Emmited when a new number value arrives from INDI server.

Parameters
nvpPointer to a number vector property.

Implements INDI::BaseMediator.

Examples
tutorial_client.cpp, and tutorial_client.h.

Definition at line 152 of file tutorial_client.cpp.

◆ newProperty()

void MyClient::newProperty ( INDI::Property property)
overrideprotectedvirtual

Emmited when a new property is created for an INDI driver.

Parameters
propertyPointer to the Property Container

Implements INDI::BaseMediator.

Examples
tutorial_client.cpp, and tutorial_client.h.

Definition at line 130 of file tutorial_client.cpp.

◆ newSwitch()

void MyClient::newSwitch ( ISwitchVectorProperty svp)
inlineoverrideprotectedvirtual

Emmited when a new switch value arrives from INDI server.

Parameters
svpPointer to a switch vector property.

Implements INDI::BaseMediator.

Examples
tutorial_client.h.

Definition at line 54 of file tutorial_client.h.

◆ newText()

void MyClient::newText ( ITextVectorProperty tvp)
inlineoverrideprotectedvirtual

Emmited when a new text value arrives from INDI server.

Parameters
tvpPointer to a text vector property.

Implements INDI::BaseMediator.

Examples
tutorial_client.h.

Definition at line 57 of file tutorial_client.h.

◆ removeDevice()

void MyClient::removeDevice ( INDI::BaseDevice dp)
inlineoverrideprotectedvirtual

Emmited when a device is deleted from INDI server.

Parameters
dpPointer to the base device instance.

Implements INDI::BaseMediator.

Examples
tutorial_client.h.

Definition at line 50 of file tutorial_client.h.

◆ removeProperty()

void MyClient::removeProperty ( INDI::Property property)
inlineoverrideprotectedvirtual

Emmited when a property is deleted for an INDI driver.

Parameters
propertyPointer to the Property Container to remove.

Implements INDI::BaseMediator.

Examples
tutorial_client.h.

Definition at line 52 of file tutorial_client.h.

◆ serverConnected()

void MyClient::serverConnected ( )
inlineoverrideprotectedvirtual

Emmited when the server is connected.

Implements INDI::BaseMediator.

Examples
tutorial_client.h.

Definition at line 59 of file tutorial_client.h.

◆ serverDisconnected()

void MyClient::serverDisconnected ( int  exit_code)
inlineoverrideprotectedvirtual

Emmited when the server gets disconnected.

Parameters
exit_code0 if client was requested to disconnect from server. -1 if connection to server is terminated due to remote server disconnection.

Implements INDI::BaseMediator.

Examples
tutorial_client.h.

Definition at line 60 of file tutorial_client.h.

◆ setTemperature()

void MyClient::setTemperature ( )
Examples
tutorial_client.cpp, and tutorial_client.h.

Definition at line 79 of file tutorial_client.cpp.

◆ takeExposure()

void MyClient::takeExposure ( )
Examples
tutorial_client.cpp, and tutorial_client.h.

Definition at line 98 of file tutorial_client.cpp.


The documentation for this class was generated from the following files: