Class DaemonClient¶
Defined in File common.h
Class Documentation¶
-
class DaemonClient¶
defines a daemon-object for communicating with a daemon
This instantiates a Network::TcpSocket object for performing the actual socket communication.
Public Functions
-
inline DaemonClient()¶
-
inline DaemonClient(std::string name_in)¶
-
inline DaemonClient(std::string name_in, char write_in, char read_in)¶
preferred constructor with name to identify daemon
-
inline DaemonClient(std::string name_in, const std::string &write_in, const std::string &read_in)¶
preferred constructor with name to identify daemon
-
inline ~DaemonClient()¶
construct with terminating strings
-
long async(std::string args)¶
async (non-blocking) commands to daemon that don’t need a reply
-
long async(std::string args, std::string &retstring)¶
async (non-blocking) commands to daemon that need a reply
-
long command_timeout(std::string args, const long to)¶
commands to daemon with timeout override
-
long command_timeout(std::string args, std::string &retstring, const long to)¶
commands to daemon with timeout override
-
long command(std::string args)¶
commands to daemon
-
long command(std::string args, std::string &retstring)¶
commands to daemon that need a reply
-
long send(std::string command, std::string &reply, const std::string &term_str_write_override = "", const std::string &term_str_read_override = "", bool term_with_string_override = false)¶
-
long send(std::string command, std::string &reply, int timeout_in, const std::string &term_str_write_override = "", const std::string &term_str_read_override = "", bool term_with_string_override = false)¶
-
long connect()¶
initialize socket connection to daemon
-
void disconnect()¶
close socket connection to daemon
-
inline void set_name(const std::string &name_in)¶
name this daemon
-
inline void set_port(const int &_port)¶
set the port number
-
long is_connected(std::string &reply)¶
-
bool poll_open()¶
is device open?
-
bool is_open()¶
is device open?
-
bool is_open(bool silent)¶
is device open?
Public Members
-
std::string name¶
name of the daemon
-
std::string host¶
host where the daemon is running
-
int port¶
blocking port that the daemon is listening on
-
int nbport¶
non-blocking port that the daemon is listening on
Public Static Functions
-
static void dothread_command(Common::DaemonClient &daemon, std::string args)¶
-
inline DaemonClient()¶