API
MagAOX::app::indiDriver< _parentT > Class Template Reference

#include <indiDriver.hpp>

Inheritance diagram for MagAOX::app::indiDriver< _parentT >:
Inheritance graph
Collaboration diagram for MagAOX::app::indiDriver< _parentT >:
Collaboration graph

Public Types

typedef _parentT parentT
 The parent MagAOX app. More...
 

Public Member Functions

 indiDriver (parentT *parent, const std::string &szName, const std::string &szDriverVersion, const std::string &szProtocolVersion)
 Public c'tor. More...
 
 ~indiDriver ()
 D'tor, deletes the IndiClient pointer. More...
 
bool good ()
 Get the value of the good flag. More...
 
virtual void handleDefProperty (const pcf::IndiProperty &ipRecv)
 
virtual void handleGetProperties (const pcf::IndiProperty &ipRecv)
 
virtual void handleNewProperty (const pcf::IndiProperty &ipRecv)
 
virtual void handleSetProperty (const pcf::IndiProperty &ipRecv)
 
virtual void execute (void)
 Define the execute virtual function. This runs the processIndiRequests function in this thread, and does not return. More...
 
virtual void update ()
 Define the update virt. func. here so the uptime message isn't sent. More...
 
virtual int sendNewProperty (const pcf::IndiProperty &ipRecv)
 Send a newProperty command to another INDI driver. More...
 

Protected Attributes

parentTm_parent {nullptr}
 This objects parent class. More...
 
indiClientm_outGoing {nullptr}
 An INDI Client is used to send commands to other drivers. More...
 
std::string m_serverIPAddress {"127.0.01"}
 The IP address of the server for the INDI Client connection. More...
 
int m_serverPort {7624}
 The port of the server for the INDI Client connection. More...
 

Private Attributes

bool m_good {true}
 Flag to hold the status of this connection. More...
 

Detailed Description

template<class _parentT>
class MagAOX::app::indiDriver< _parentT >

Definition at line 52 of file indiDriver.hpp.

Member Typedef Documentation

◆ parentT

template<class _parentT >
typedef _parentT MagAOX::app::indiDriver< _parentT >::parentT

The parent MagAOX app.

Definition at line 57 of file indiDriver.hpp.

Constructor & Destructor Documentation

◆ indiDriver()

template<class parentT >
MagAOX::app::indiDriver< parentT >::indiDriver ( parentT parent,
const std::string &  szName,
const std::string &  szDriverVersion,
const std::string &  szProtocolVersion 
)

Public c'tor.

Call pcf::IndiDriver c'tor, and then opens the FIFOs specified by parent. If this fails, then m_good is set to false. test this with good().

Definition at line 126 of file indiDriver.hpp.

◆ ~indiDriver()

template<class parentT >
MagAOX::app::indiDriver< parentT >::~indiDriver

D'tor, deletes the IndiClient pointer.

Definition at line 180 of file indiDriver.hpp.

Member Function Documentation

◆ execute()

template<class parentT >
void MagAOX::app::indiDriver< parentT >::execute ( void  )
virtual

Define the execute virtual function. This runs the processIndiRequests function in this thread, and does not return.

Definition at line 210 of file indiDriver.hpp.

◆ good()

template<class _parentT >
bool MagAOX::app::indiDriver< _parentT >::good ( )
inline

Get the value of the good flag.

Returns
the value of m_good, true or false.

Definition at line 98 of file indiDriver.hpp.

◆ handleDefProperty()

template<class parentT >
void MagAOX::app::indiDriver< parentT >::handleDefProperty ( const pcf::IndiProperty &  ipRecv)
virtual

Definition at line 186 of file indiDriver.hpp.

◆ handleGetProperties()

template<class parentT >
void MagAOX::app::indiDriver< parentT >::handleGetProperties ( const pcf::IndiProperty &  ipRecv)
virtual

Definition at line 192 of file indiDriver.hpp.

◆ handleNewProperty()

template<class parentT >
void MagAOX::app::indiDriver< parentT >::handleNewProperty ( const pcf::IndiProperty &  ipRecv)
virtual

Definition at line 198 of file indiDriver.hpp.

◆ handleSetProperty()

template<class parentT >
void MagAOX::app::indiDriver< parentT >::handleSetProperty ( const pcf::IndiProperty &  ipRecv)
virtual

Definition at line 204 of file indiDriver.hpp.

◆ sendNewProperty()

template<class parentT >
int MagAOX::app::indiDriver< parentT >::sendNewProperty ( const pcf::IndiProperty &  ipRecv)
virtual

Send a newProperty command to another INDI driver.

Uses the IndiClient member of this class, which is initialized the first time if necessary.

Returns
0 on success
-1 on any errors (which are logged).

Definition at line 222 of file indiDriver.hpp.

◆ update()

template<class parentT >
void MagAOX::app::indiDriver< parentT >::update
virtual

Define the update virt. func. here so the uptime message isn't sent.

Definition at line 216 of file indiDriver.hpp.

Member Data Documentation

◆ m_good

template<class _parentT >
bool MagAOX::app::indiDriver< _parentT >::m_good {true}
private

Flag to hold the status of this connection.

Definition at line 76 of file indiDriver.hpp.

Referenced by MagAOX::app::indiDriver< _parentT >::indiDriver(), and MagAOX::app::indiDriver< _parentT >::good().

◆ m_outGoing

template<class _parentT >
indiClient* MagAOX::app::indiDriver< _parentT >::m_outGoing {nullptr}
protected

An INDI Client is used to send commands to other drivers.

Definition at line 65 of file indiDriver.hpp.

◆ m_parent

template<class _parentT >
parentT* MagAOX::app::indiDriver< _parentT >::m_parent {nullptr}
protected

This objects parent class.

Definition at line 62 of file indiDriver.hpp.

Referenced by MagAOX::app::indiDriver< _parentT >::indiDriver().

◆ m_serverIPAddress

template<class _parentT >
std::string MagAOX::app::indiDriver< _parentT >::m_serverIPAddress {"127.0.01"}
protected

The IP address of the server for the INDI Client connection.

Definition at line 68 of file indiDriver.hpp.

◆ m_serverPort

template<class _parentT >
int MagAOX::app::indiDriver< _parentT >::m_serverPort {7624}
protected

The port of the server for the INDI Client connection.

Definition at line 71 of file indiDriver.hpp.


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