1 #ifndef B0__PUBLISHER_H__INCLUDED 2 #define B0__PUBLISHER_H__INCLUDED 29 Publisher(
Node *node, std::string topic,
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;
59 virtual void publish(
const std::string &msg);
78 #endif // B0__PUBLISHER_H__INCLUDED LogLevel
Definition: interface.h:23
virtual void publish(const std::string &msg)
Publish a message.
virtual void init() override
Perform initialization and optionally send graph notify.
virtual ~Publisher()
Publisher destructor.
virtual void cleanup() override
Perform cleanup and optionally send graph notify.
The abstraction for a node in the network.
Definition: node.h:40
virtual void disconnect()
Disconnect from the remote address.
The publisher class.
Definition: publisher.h:21
void log(LogLevel level, std::string message) const override
Log a message using node's logger, prepending this publisher informations.
std::string getTopicName()
Return the name of this publisher's topic.
The Socket class.
Definition: socket.h:31
virtual void log(LogLevel level, std::string message) const =0
Log a message to the remote logger, with a specified level.
virtual void connect()
Connect to the remote address.
Publisher(Node *node, std::string topic, bool managed=true, bool notify_graph=true)
Construct an Publisher child of the specified Node.
const bool notify_graph_
If false this socket will not send announcement to resolv (i.e. it will be "invisible") ...
Definition: publisher.h:73