17 #ifndef GZ_TRANSPORT_NODE_HH_
18 #define GZ_TRANSPORT_NODE_HH_
26 #include <unordered_set>
30 #include "gz/transport/config.hh"
31 #include "gz/transport/Export.hh"
48 inline namespace GZ_TRANSPORT_VERSION_NAMESPACE {
63 int GZ_TRANSPORT_VISIBLE
rcvHwm();
75 int GZ_TRANSPORT_VISIBLE
sndHwm();
86 class GZ_TRANSPORT_VISIBLE
Node
88 class PublisherPrivate;
121 public:
operator bool();
126 public:
operator bool()
const;
131 public:
bool Valid()
const;
138 public:
bool Publish(
const ProtoMsg &_msg);
161 public:
bool PublishRaw(
173 public:
bool ThrottledUpdateReady()
const;
178 private:
bool UpdateThrottling();
182 public:
bool HasConnections()
const;
192 #pragma warning(push)
193 #pragma warning(disable: 4251)
206 public:
virtual ~
Node();
216 public:
template<
typename MessageT>
250 public:
template<
typename MessageT>
253 void(*_callback)(
const MessageT &_msg),
264 public:
template<
typename MessageT>
280 public:
template<
typename ClassT,
typename MessageT>
283 void(ClassT::*_callback)(
const MessageT &_msg),
297 public:
template<
typename MessageT>
300 void(*_callback)(
const MessageT &_msg,
const MessageInfo &_info),
312 public:
template<
typename MessageT>
330 public:
template<
typename ClassT,
typename MessageT>
333 void(ClassT::*_callback)(
const MessageT &_msg,
348 public:
bool Unsubscribe(
const std::string &_topic);
362 public:
template<
typename RequestT,
typename ReplyT>
365 bool(*_callback)(
const RequestT &_request, ReplyT &_reply),
379 public:
template<
typename ReplyT>
382 bool(*_callback)(ReplyT &_reply),
395 public:
template<
typename RequestT>
398 void(*_callback)(
const RequestT &_request),
413 public:
template<
typename RequestT,
typename ReplyT>
417 ReplyT &_reply)> _callback,
431 public:
template<
typename ReplyT>
447 public:
template<
typename RequestT>
466 public:
template<
typename ClassT,
typename RequestT,
typename ReplyT>
469 bool(ClassT::*_callback)(
const RequestT &_request, ReplyT &_reply),
485 public:
template<
typename ClassT,
typename ReplyT>
488 bool(ClassT::*_callback)(ReplyT &_reply),
503 public:
template<
typename ClassT,
typename RequestT>
506 void(ClassT::*_callback)(
const RequestT &_request),
525 public:
template<
typename RequestT,
typename ReplyT>
528 const RequestT &_request,
529 void(*_callback)(
const ReplyT &_reply,
const bool _result));
541 public:
template<
typename ReplyT>
544 void(*_callback)(
const ReplyT &_reply,
const bool _result));
557 public:
template<
typename RequestT,
typename ReplyT>
560 const RequestT &_request,
562 const bool _result)> &_callback);
574 public:
template<
typename ReplyT>
578 const bool _result)> &_callback);
592 public:
template<
typename ClassT,
typename RequestT,
typename ReplyT>
595 const RequestT &_request,
596 void(ClassT::*_callback)(
const ReplyT &_reply,
const bool _result),
610 public:
template<
typename ClassT,
typename ReplyT>
613 void(ClassT::*_callback)(
const ReplyT &_reply,
const bool _result),
625 public:
template<
typename RequestT,
typename ReplyT>
628 const RequestT &_request,
629 const unsigned int &_timeout,
641 public:
template<
typename ReplyT>
644 const unsigned int &_timeout,
653 public:
template<
typename RequestT>
654 bool Request(
const std::string &_topic,
const RequestT &_request);
672 const std::string &_responseType,
unsigned int _timeout,
679 public:
bool UnadvertiseSrv(
const std::string &_topic);
708 public:
bool ServiceInfo(
725 public:
bool SubscribeRaw(
741 public:
bool EnableStats(
const std::string &_topic,
bool _enable,
742 const std::string &_publicationTopic =
"/statistics",
743 uint64_t _publicationRate = 1);
751 public: std::optional<TopicStatistics> TopicStats(
774 private:
bool SubscribeHelper(
const std::string &_fullyQualifiedTopic);
779 #pragma warning(push)
780 #pragma warning(disable: 4251)
793 #include "gz/transport/detail/Node.hh"