1 #ifndef B0__SERVICE_CLIENT_H__INCLUDED 2 #define B0__SERVICE_CLIENT_H__INCLUDED 29 ServiceClient(
Node *node, std::string service_name,
bool managed =
true,
bool notify_graph =
true);
39 void log(
LogLevel level, std::string message)
const override;
44 virtual void init()
override;
49 virtual void cleanup()
override;
60 virtual void call(
const std::string &req, std::string &rep);
84 #endif // B0__SERVICE_CLIENT_H__INCLUDED LogLevel
Definition: interface.h:23
const bool notify_graph_
If false this socket will not send announcement to resolv (i.e. it will be "invisible") ...
Definition: service_client.h:79
virtual void init() override
Perform initialization and optionally send graph notify.
virtual void cleanup() override
Perform cleanup and optionally send graph notify.
The abstraction for a node in the network.
Definition: node.h:40
std::string getServiceName()
Return the name of this client's service.
virtual ~ServiceClient()
ServiceClient destructor.
ServiceClient(Node *node, std::string service_name, bool managed=true, bool notify_graph=true)
Construct an ServiceClient child of the specified Node.
virtual void call(const std::string &req, std::string &rep)
Write a request and read a reply from the underlying ZeroMQ REQ socket.
The Socket class.
Definition: socket.h:31
virtual void resolve()
Perform service address resolution.
virtual void log(LogLevel level, std::string message) const =0
Log a message to the remote logger, with a specified level.
virtual void disconnect()
Disconnect from service server endpoint.
void log(LogLevel level, std::string message) const override
Log a message using node's logger, prepending this service client informations.
virtual void connect()
Connect to service server endpoint.
The service client class.
Definition: service_client.h:21