17 #ifndef IGN_TRANSPORT_NODE_HH_ 18 #define IGN_TRANSPORT_NODE_HH_ 26 #include <unordered_set> 31 #pragma warning(push, 0) 33 #include <ignition/msgs.hh> 39 #include "ignition/transport/config.hh" 40 #include "ignition/transport/Export.hh" 57 inline namespace IGNITION_TRANSPORT_VERSION_NAMESPACE {
72 int IGNITION_TRANSPORT_VISIBLE
rcvHwm();
84 int IGNITION_TRANSPORT_VISIBLE
sndHwm();
95 class IGNITION_TRANSPORT_VISIBLE
Node 97 class PublisherPrivate;
130 public:
operator bool();
135 public:
operator bool()
const;
140 public:
bool Valid()
const;
147 public:
bool Publish(
const ProtoMsg &_msg);
170 public:
bool PublishRaw(
182 public:
bool ThrottledUpdateReady()
const;
187 private:
bool UpdateThrottling();
191 public:
bool HasConnections()
const;
201 #pragma warning(push) 202 #pragma warning(disable: 4251) 215 public:
virtual ~
Node();
225 public:
template<
typename MessageT>
259 public:
template<
typename MessageT>
262 void(*_callback)(
const MessageT &_msg),
273 public:
template<
typename MessageT>
289 public:
template<
typename ClassT,
typename MessageT>
292 void(ClassT::*_callback)(
const MessageT &_msg),
306 public:
template<
typename MessageT>
309 void(*_callback)(
const MessageT &_msg,
const MessageInfo &_info),
321 public:
template<
typename MessageT>
339 public:
template<
typename ClassT,
typename MessageT>
342 void(ClassT::*_callback)(
const MessageT &_msg,
357 public:
bool Unsubscribe(
const std::string &_topic);
371 public:
template<
typename RequestT,
typename ReplyT>
374 bool(*_callback)(
const RequestT &_request, ReplyT &_reply),
388 public:
template<
typename ReplyT>
391 bool(*_callback)(ReplyT &_reply),
404 public:
template<
typename RequestT>
407 void(*_callback)(
const RequestT &_request),
422 public:
template<
typename RequestT,
typename ReplyT>
426 ReplyT &_reply)> _callback,
440 public:
template<
typename ReplyT>
456 public:
template<
typename RequestT>
475 public:
template<
typename ClassT,
typename RequestT,
typename ReplyT>
478 bool(ClassT::*_callback)(
const RequestT &_request, ReplyT &_reply),
494 public:
template<
typename ClassT,
typename ReplyT>
497 bool(ClassT::*_callback)(ReplyT &_reply),
512 public:
template<
typename ClassT,
typename RequestT>
515 void(ClassT::*_callback)(
const RequestT &_request),
534 public:
template<
typename RequestT,
typename ReplyT>
537 const RequestT &_request,
538 void(*_callback)(
const ReplyT &_reply,
const bool _result));
550 public:
template<
typename ReplyT>
553 void(*_callback)(
const ReplyT &_reply,
const bool _result));
566 public:
template<
typename RequestT,
typename ReplyT>
569 const RequestT &_request,
571 const bool _result)> &_callback);
583 public:
template<
typename ReplyT>
587 const bool _result)> &_callback);
601 public:
template<
typename ClassT,
typename RequestT,
typename ReplyT>
604 const RequestT &_request,
605 void(ClassT::*_callback)(
const ReplyT &_reply,
const bool _result),
619 public:
template<
typename ClassT,
typename ReplyT>
622 void(ClassT::*_callback)(
const ReplyT &_reply,
const bool _result),
634 public:
template<
typename RequestT,
typename ReplyT>
637 const RequestT &_request,
638 const unsigned int &_timeout,
650 public:
template<
typename ReplyT>
653 const unsigned int &_timeout,
662 public:
template<
typename RequestT>
663 bool Request(
const std::string &_topic,
const RequestT &_request);
668 public:
bool UnadvertiseSrv(
const std::string &_topic);
697 public:
bool ServiceInfo(
714 public:
bool SubscribeRaw(
730 public:
bool EnableStats(
const std::string &_topic,
bool _enable,
731 const std::string &_publicationTopic =
"/statistics",
732 uint64_t _publicationRate = 1);
740 public: std::optional<TopicStatistics> TopicStats(
763 private:
bool SubscribeHelper(
const std::string &_fullyQualifiedTopic);
768 #pragma warning(push) 769 #pragma warning(disable: 4251) 782 #include "ignition/transport/detail/Node.hh"
A class for customizing the publication options for a topic advertised. E.g.: Set the rate of message...
Definition: AdvertiseOptions.hh:150
A class for customizing the behavior of the Node. E.g.: Set a custom namespace or a partition name...
Definition: NodeOptions.hh:40
A class that is used to store information about an advertised publisher. An instance of this class is...
Definition: Node.hh:115
A class to provide different options for a subscription.
Definition: SubscribeOptions.hh:39
int rcvHwm()
Get the capacity of the buffer (High Water Mark) that stores incoming Ignition Transport messages...
void waitForShutdown()
Block the current thread until a SIGINT or SIGTERM is received. Note that this function registers a s...
const std::string kGenericMessageType
The string type used for generic messages.
Definition: TransportTypes.hh:174
Private data for the Node class. This class should not be directly used. You should use the Node clas...
Definition: NodeShared.hh:66
A class that provides information about the message received.
Definition: MessageInfo.hh:37
A class for customizing the publication options for a service advertised.
Definition: AdvertiseOptions.hh:247
A class that allows a client to communicate with other peers. There are two main communication modes:...
Definition: Node.hh:95
This class stores all the information about a message publisher.
Definition: Publisher.hh:222
google::protobuf::Message ProtoMsg
Definition: TransportTypes.hh:70
int sndHwm()
Get the capacity of the buffer (High Water Mark) that stores outgoing Ignition Transport messages...
Definition: AdvertiseOptions.hh:28