17#ifndef __ROGUE_ZMQ_CLIENT_H__
18#define __ROGUE_ZMQ_CLIENT_H__
28 #include <boost/python.hpp>
59 std::shared_ptr<rogue::Logging> log_;
93 static std::shared_ptr<rogue::interfaces::ZmqClient>
create(
const std::string& addr, uint16_t port,
bool doString);
109 ZmqClient(
const std::string& addr, uint16_t port,
bool doString);
119 void setTimeout(uint32_t msecs,
bool waitRetry);
128 std::string
sendString(
const std::string& path,
const std::string& attr,
const std::string& arg);
135 std::string
getDisp(
const std::string& path);
142 void setDisp(
const std::string& path,
const std::string& value);
150 std::string
exec(
const std::string& path,
const std::string& arg =
"");
157 std::string
valueDisp(
const std::string& path);
165 boost::python::object
send(boost::python::object data);
171 virtual void doUpdate(boost::python::object data);
192 ZmqClientWrap(
const std::string& addr, uint16_t port,
bool doString);
201 void doUpdate(boost::python::object data);
Python-overridable wrapper for ZmqClient.
void defDoUpdate(boost::python::object data)
Calls base-class doUpdate() implementation.
void doUpdate(boost::python::object data)
Handles an update message from the subscription path.
ZeroMQ client for Rogue control and update messaging.
std::string sendString(const std::string &path, const std::string &attr, const std::string &arg)
Sends a string-mode request.
void stop()
Stops client sockets and background thread.
std::string getDisp(const std::string &path)
Reads display-formatted value at a path (string mode).
virtual void doUpdate(boost::python::object data)
Handles async update payloads received on subscriber socket.
std::string exec(const std::string &path, const std::string &arg="")
Executes callable node at path (string mode).
boost::python::object send(boost::python::object data)
Sends binary request payload and receives binary response.
static void setup_python()
Registers Python bindings for this class.
std::string valueDisp(const std::string &path)
Reads compact value display at a path (string mode).
static std::shared_ptr< rogue::interfaces::ZmqClient > create(const std::string &addr, uint16_t port, bool doString)
Creates a ZeroMQ client.
void setTimeout(uint32_t msecs, bool waitRetry)
Sets request timeout behavior.
virtual ~ZmqClient()
Destroys client and stops background activity.
void setDisp(const std::string &path, const std::string &value)
Writes display-formatted value at a path (string mode).
std::shared_ptr< rogue::interfaces::ZmqClient > ZmqClientPtr
std::shared_ptr< rogue::interfaces::ZmqClientWrap > ZmqClientWrapPtr