Instrument Neutral Distributed Interface INDI  1.9.2
Public Member Functions | Public Attributes | List of all members
INDI::BaseClientPrivate Class Reference

#include <baseclient_p.h>

Public Member Functions

 BaseClientPrivate (BaseClient *parent)
virtual ~BaseClientPrivate ()
bool connect ()
bool disconnect (int exit_code)
void setDriverConnection (bool status, const char *deviceName)
 Connect/Disconnect to INDI driver. More...
size_t sendData (const void *data, size_t size)
void sendString (const char *fmt,...)
void listenINDI ()
void clear ()
 clear Clear devices and blob modes More...
BLOBModefindBLOBMode (const std::string &device, const std::string &property)
int dispatchCommand (XMLEle *root, char *errmsg)
 Dispatch command received from INDI server to respective devices handled by the client. More...
int deleteDevice (const char *devName, char *errmsg)
 Remove device. More...
int delPropertyCmd (XMLEle *root, char *errmsg)
 Delete property command. More...
INDI::BaseDevicefindDev (const char *devName, char *errmsg)
 Find and return a particular device. More...
INDI::BaseDeviceaddDevice (XMLEle *dep, char *errmsg)
 Add a new device. More...
INDI::BaseDevicefindDev (XMLEle *root, int create, char *errmsg)
 Find a device, and if it doesn't exist, create it if create is set to 1. More...
int messageCmd (XMLEle *root, char *errmsg)

Public Attributes

int sockfd {-1}
int receiveFd {-1}
int sendFd {-1}
std::vector< INDI::BaseDevice * > cDevices
std::set< std::string > cDeviceNames
std::list< BLOBModeblobModes
std::map< std::string, std::set< std::string > > cWatchProperties
std::string cServer
uint32_t cPort
std::atomic_bool sConnected
std::atomic_bool sAboutToClose
std::mutex sSocketBusy
std::condition_variable sSocketChanged
int sExitCode
bool verbose
uint32_t timeout_sec
uint32_t timeout_us

Detailed Description

Definition at line 35 of file baseclient_p.h.

Constructor & Destructor Documentation

◆ BaseClientPrivate()

INDI::BaseClientPrivate::BaseClientPrivate ( BaseClient parent)

Definition at line 75 of file baseclient.cpp.

◆ ~BaseClientPrivate()

INDI::BaseClientPrivate::~BaseClientPrivate ( )

Definition at line 99 of file baseclient.cpp.

Member Function Documentation

◆ addDevice()

INDI::BaseDevice * INDI::BaseClientPrivate::addDevice ( XMLEle dep,
char *  errmsg 

Add a new device.

Definition at line 662 of file baseclient.cpp.

◆ clear()

void INDI::BaseClientPrivate::clear ( )

clear Clear devices and blob modes

Definition at line 123 of file baseclient.cpp.

◆ connect()

bool INDI::BaseClientPrivate::connect ( )

Definition at line 135 of file baseclient.cpp.

◆ deleteDevice()

int INDI::BaseClientPrivate::deleteDevice ( const char *  devName,
char *  errmsg 

Remove device.

Definition at line 583 of file baseclient.cpp.

◆ delPropertyCmd()

int INDI::BaseClientPrivate::delPropertyCmd ( XMLEle root,
char *  errmsg 

Delete property command.

Definition at line 608 of file baseclient.cpp.

◆ disconnect()

bool INDI::BaseClientPrivate::disconnect ( int  exit_code)

Definition at line 295 of file baseclient.cpp.

◆ dispatchCommand()

int INDI::BaseClientPrivate::dispatchCommand ( XMLEle root,
char *  errmsg 

Dispatch command received from INDI server to respective devices handled by the client.

Definition at line 520 of file baseclient.cpp.

◆ findBLOBMode()

BLOBMode * INDI::BaseClientPrivate::findBLOBMode ( const std::string &  device,
const std::string &  property 

Definition at line 771 of file baseclient.cpp.

◆ findDev() [1/2]

INDI::BaseDevice * INDI::BaseClientPrivate::findDev ( const char *  devName,
char *  errmsg 

Find and return a particular device.

Definition at line 647 of file baseclient.cpp.

◆ findDev() [2/2]

INDI::BaseDevice * INDI::BaseClientPrivate::findDev ( XMLEle root,
int  create,
char *  errmsg 

Find a device, and if it doesn't exist, create it if create is set to 1.

Definition at line 689 of file baseclient.cpp.

◆ listenINDI()

void INDI::BaseClientPrivate::listenINDI ( )

Definition at line 324 of file baseclient.cpp.

◆ messageCmd()

int INDI::BaseClientPrivate::messageCmd ( XMLEle root,
char *  errmsg 

Process messages

Definition at line 727 of file baseclient.cpp.

◆ sendData()

size_t INDI::BaseClientPrivate::sendData ( const void *  data,
size_t  size 

Definition at line 488 of file baseclient.cpp.

◆ sendString()

void INDI::BaseClientPrivate::sendString ( const char *  fmt,

Definition at line 509 of file baseclient.cpp.

◆ setDriverConnection()

void INDI::BaseClientPrivate::setDriverConnection ( bool  status,
const char *  deviceName 

Connect/Disconnect to INDI driver.

statusIf true, the client will attempt to turn on CONNECTION property within the driver (i.e. turn on the device). Otherwise, CONNECTION will be turned off.
deviceNameName of the device to connect to.

Definition at line 782 of file baseclient.cpp.

Member Data Documentation

◆ blobModes

std::list<BLOBMode> INDI::BaseClientPrivate::blobModes

Definition at line 96 of file baseclient_p.h.

◆ cDeviceNames

std::set<std::string> INDI::BaseClientPrivate::cDeviceNames

Definition at line 95 of file baseclient_p.h.

◆ cDevices

std::vector<INDI::BaseDevice *> INDI::BaseClientPrivate::cDevices

Definition at line 94 of file baseclient_p.h.

◆ cPort

uint32_t INDI::BaseClientPrivate::cPort

Definition at line 100 of file baseclient_p.h.

◆ cServer

std::string INDI::BaseClientPrivate::cServer

Definition at line 99 of file baseclient_p.h.

◆ cWatchProperties

std::map<std::string, std::set<std::string> > INDI::BaseClientPrivate::cWatchProperties

Definition at line 97 of file baseclient_p.h.

◆ parent

BaseClient* INDI::BaseClientPrivate::parent

Definition at line 84 of file baseclient_p.h.

◆ receiveFd

int INDI::BaseClientPrivate::receiveFd {-1}

Definition at line 90 of file baseclient_p.h.

◆ sAboutToClose

std::atomic_bool INDI::BaseClientPrivate::sAboutToClose

Definition at line 102 of file baseclient_p.h.

◆ sConnected

std::atomic_bool INDI::BaseClientPrivate::sConnected

Definition at line 101 of file baseclient_p.h.

◆ sendFd

int INDI::BaseClientPrivate::sendFd {-1}

Definition at line 91 of file baseclient_p.h.

◆ sExitCode

int INDI::BaseClientPrivate::sExitCode

Definition at line 105 of file baseclient_p.h.

◆ sockfd

int INDI::BaseClientPrivate::sockfd {-1}

Definition at line 89 of file baseclient_p.h.

◆ sSocketBusy

std::mutex INDI::BaseClientPrivate::sSocketBusy

Definition at line 103 of file baseclient_p.h.

◆ sSocketChanged

std::condition_variable INDI::BaseClientPrivate::sSocketChanged

Definition at line 104 of file baseclient_p.h.

◆ timeout_sec

uint32_t INDI::BaseClientPrivate::timeout_sec

Definition at line 110 of file baseclient_p.h.

◆ timeout_us

uint32_t INDI::BaseClientPrivate::timeout_us

Definition at line 110 of file baseclient_p.h.

◆ verbose

bool INDI::BaseClientPrivate::verbose

Definition at line 106 of file baseclient_p.h.

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