9 #ifndef app_indiDriver_hpp 10 #define app_indiDriver_hpp 12 #include "../../INDI/libcommon/IndiDriver.hpp" 13 #include "../../INDI/libcommon/IndiElement.hpp" 15 #include "../../INDI/libcommon/IndiClient.hpp" 24 template<
class _parentT>
59 const std::string &szName,
60 const std::string &szDriverVersion,
61 const std::string &szProtocolVersion
98 template<
class parentT>
100 const std::string &szName,
101 const std::string &szDriverVersion,
102 const std::string &szProtocolVersion
103 ) : pcf::IndiDriver(szName, szDriverVersion, szProtocolVersion)
142 template<
class parentT>
145 if(m_outGoing)
delete m_outGoing;
148 template<
class parentT>
154 template<
class parentT>
160 template<
class parentT>
166 template<
class parentT>
172 template<
class parentT>
175 processIndiRequests(
false);
178 template<
class parentT>
184 template<
class parentT>
187 if( m_outGoing ==
nullptr)
191 m_outGoing =
new pcf::IndiClient(m_serverIPAddress, m_serverPort);
195 parentT::template log<logger::software_error>({__FILE__, __LINE__,
"Exception thrown while creating IndiClient connection"});
199 if(m_outGoing ==
nullptr)
201 parentT::template log<logger::software_error>({__FILE__, __LINE__,
"Failed to allocate IndiClient connection"});
208 m_outGoing->sendNewProperty(ipRecv);
212 parentT::template log<logger::software_error>({__FILE__, __LINE__,
"Exception from IndiClient::sendNewProperty"});
222 #endif //app_magAOXIndiDriver_hpp std::string driverInName()
Get the INDI input FIFO file name.
bool m_good
Flag to hold the status of this connection.
indiDriver(parentT *parent, const std::string &szName, const std::string &szDriverVersion, const std::string &szProtocolVersion)
Public c'tor.
virtual void handleDefProperty(const pcf::IndiProperty &ipRecv)
std::string driverOutName()
Get the INDI output FIFO file name.
virtual void update()
Define the update virt. func. here so the uptime message isn't sent.
virtual void handleGetProperties(const pcf::IndiProperty &ipRecv)
virtual void handleNewProperty(const pcf::IndiProperty &ipRecv)
virtual void handleSetProperty(const pcf::IndiProperty &ipRecv)
std::string m_serverIPAddress
The IP address of the server for the INDI Client connection.
virtual int sendNewProperty(const pcf::IndiProperty &ipRecv)
Send a newProperty command to another INDI driver.
int m_serverPort
The port of the server for the INDI Client connection.
The base-class for MagAO-X applications.
bool good()
Get the value of the good flag.
~indiDriver()
D'tor, deletes the IndiClient pointer.
std::string driverCtrlName()
Get the INDI control FIFO file name.
_parentT parentT
The parent MagAOX app.
parentT * m_parent
This objects parent class.
virtual void execute(void)
Define the execute virtual function. This runs the processIndiRequests function in this thread...
pcf::IndiClient * m_outGoing
An INDI Client is used to send commands to other drivers.