gz/transport/Node.hh
std::optional< TopicStatistics > TopicStats(const std::string &_topic) const
Get the current statistics for a topic. Statistics must have been enabled using the EnableStatistics ...
bool Request(const std::string &_topic, const RequestT &_request, void(*_callback)(const ReplyT &_reply, const bool _result))
Request a new service using a non-blocking call. In this version the callback is a free function.
void TopicList(std::vector< std::string > &_topics) const
Get the list of topics currently advertised in the network. Note that this function can block for som...
int sndHwm()
Get the capacity of the buffer (High Water Mark) that stores outgoing Ignition Transport messages....
std::vector< std::string > SubscribedTopics() const
Get the list of topics subscribed by this node. Note that we might be interested in one topic but we ...
Definition: gz/transport/AdvertiseOptions.hh:28
STL class.
google::protobuf::Message ProtoMsg
Definition: gz/transport/TransportTypes.hh:70
STL class.
void waitForShutdown()
Block the current thread until a SIGINT or SIGTERM is received. Note that this function registers a s...
std::vector< std::string > AdvertisedServices() const
Get the list of services advertised by this node.
bool Valid() const
Return true if valid information, such as a non-empty topic name, is present.
bool ThrottledUpdateReady() const
Check if message publication is throttled. If so, verify whether the next message should be published...
bool UnadvertiseSrv(const std::string &_topic)
Unadvertise a service.
This class stores all the information about a message publisher.
Definition: gz/transport/Publisher.hh:222
bool PublishRaw(const std::string &_msgData, const std::string &_msgType)
Publish a raw pre-serialized message.
bool TopicInfo(const std::string &_topic, std::vector< MessagePublisher > &_publishers) const
Get the information about a topic.
A class to provide different options for a subscription.
Definition: gz/transport/SubscribeOptions.hh:39
A class for customizing the publication options for a topic advertised. E.g.: Set the rate of message...
Definition: gz/transport/AdvertiseOptions.hh:150
bool Unsubscribe(const std::string &_topic)
Unsubscribe from a topic.
void ServiceList(std::vector< std::string > &_services) const
Get the list of topics currently advertised in the network. Note that this function can block for som...
A class that allows a client to communicate with other peers. There are two main communication modes:...
Definition: gz/transport/Node.hh:95
A class that provides information about the message received.
Definition: gz/transport/MessageInfo.hh:37
int rcvHwm()
Get the capacity of the buffer (High Water Mark) that stores incoming Ignition Transport messages....
A class for customizing the behavior of the Node. E.g.: Set a custom namespace or a partition name.
Definition: gz/transport/NodeOptions.hh:40
bool Subscribe(const std::string &_topic, void(*_callback)(const MessageT &_msg), const SubscribeOptions &_opts=SubscribeOptions())
Subscribe to a topic registering a callback. Note that this callback does not include any message inf...
const NodeOptions & Options() const
Get the reference to the current node options.
bool ServiceInfo(const std::string &_service, std::vector< ServicePublisher > &_publishers) const
Get the information about a service.
bool EnableStats(const std::string &_topic, bool _enable, const std::string &_publicationTopic="/statistics", uint64_t _publicationRate=1)
Turn topic statistics on or off.
bool SubscribeRaw(const std::string &_topic, const RawCallback &_callback, const std::string &_msgType=kGenericMessageType, const SubscribeOptions &_opts=SubscribeOptions())
Subscribe to a topic registering a callback. The callback must accept a std::string to represent the ...
A class that is used to store information about an advertised publisher. An instance of this class is...
Definition: gz/transport/Node.hh:115
bool HasConnections() const
Return true if this publisher has subscribers.
Node::Publisher Advertise(const std::string &_topic, const AdvertiseMessageOptions &_options=AdvertiseMessageOptions())
Advertise a new topic. If a topic is currently advertised, you cannot advertise it a second time (reg...
const std::string kGenericMessageType
The string type used for generic messages.
Definition: gz/transport/TransportTypes.hh:174
A class for customizing the publication options for a service advertised.
Definition: gz/transport/AdvertiseOptions.hh:247
bool Publish(const ProtoMsg &_msg)
Publish a message. This function will copy the message when publishing to interprocess subscribers....
std::vector< std::string > AdvertisedTopics() const
Get the list of topics advertised by this node.