18 #ifndef IGN_TRANSPORT_NODESHARED_HH_ 19 #define IGN_TRANSPORT_NODESHARED_HH_ 22 #pragma warning(push, 0) 24 #include <google/protobuf/message.h> 37 #include "ignition/transport/config.hh" 38 #include "ignition/transport/Export.hh" 54 inline namespace IGNITION_TRANSPORT_VERSION_NAMESPACE {
61 class NodeSharedPrivate;
74 public:
void RunReceptionTask();
89 const size_t _dataSize,
94 public:
void RecvMsgUpdate();
171 public:
void TriggerCallbacks(
179 public:
void RecvControlUpdate();
182 public:
void RecvSrvRequest();
185 public:
void RecvSrvResponse();
192 public:
void SendPendingRemoteReqs(
const std::string &_topic,
228 public:
bool TopicPublishers(
const std::string &_topic,
237 public:
bool DiscoverService(
const std::string &_topic)
const;
256 public:
int RcvHwm();
268 public:
int SndHwm();
276 public:
void EnableStats(
const std::string &_topic,
bool _enable,
285 public: std::optional<TopicStatistics> TopicStats(
297 private:
bool InitializeSockets();
312 #pragma warning(push) 313 #pragma warning(disable: 4251) 328 public:
static const int kDefaultMsgDiscPort = 10317;
331 public:
static const int kDefaultSrvDiscPort = 10318;
334 public:
int msgDiscPort = kDefaultMsgDiscPort;
337 public:
int srvDiscPort = kDefaultSrvDiscPort;
363 public:
bool HasSubscriber(
372 public:
bool HasSubscriber(
393 public:
bool RemoveHandlersForNode(
411 #pragma warning(push) 412 #pragma warning(disable: 4251) 443 private:
friend Node;
444 private:
friend NodePrivate;
bool haveRaw
True iff there are any raw local subscribers.
Definition: NodeShared.hh:116
std::map< std::string, ISubscriptionHandler_M > localHandlers
This is a map of the standard local callback handlers. The key is the topic name, and the value is an...
Definition: NodeShared.hh:105
bool haveLocal
True iff there are any standard local subscribers.
Definition: NodeShared.hh:113
bool haveRemote
True if this Publisher has any remote subscribers.
Definition: NodeShared.hh:145
TopicStorage< MessagePublisher > remoteSubscribers
Remote subscribers.
Definition: NodeShared.hh:346
HandlerStorage< RawSubscriptionHandler > raw
Raw local subscriptions. Keeping these separate from localSubscriptions allows us to avoid an unneces...
Definition: NodeShared.hh:403
std::string myControlAddress
My pub/sub control address.
Definition: NodeShared.hh:427
HandlerInfo contains information about callback handlers which is useful for local publishers and mes...
Definition: NodeShared.hh:100
Uuid replierId
Replier socket identity.
Definition: NodeShared.hh:307
HandlerWrapper localSubscribers
Definition: NodeShared.hh:406
HandlerStorage< ISubscriptionHandler > normal
Normal local subscriptions.
Definition: NodeShared.hh:398
Encapsulates statistics for a single topic. The set of statistics include:
Definition: TopicStatistics.hh:101
Class to store and manage service call handlers.
Definition: HandlerStorage.hh:39
std::string myReplierAddress
My replier service call address.
Definition: NodeShared.hh:433
Private data for the Node class. This class should not be directly used. You should use the Node clas...
Definition: NodeShared.hh:66
int verbose
Print activity to stdout.
Definition: NodeShared.hh:421
A portable class for representing a Universally Unique Identifier.
Definition: Uuid.hh:45
A class that provides information about the message received.
Definition: MessageInfo.hh:37
Uuid responseReceiverId
Response receiver socket identity.
Definition: NodeShared.hh:304
std::string hostAddr
IP address of this host.
Definition: NodeShared.hh:436
This struct wraps up the two different types of subscription handlers: normal (deserialized) and raw ...
Definition: NodeShared.hh:355
A class that allows a client to communicate with other peers. There are two main communication modes:...
Definition: Node.hh:95
void(void *_data, void *_hint) DeallocFunc
Definition: TransportTypes.hh:171
This class stores all the information about a message publisher.
Definition: Publisher.hh:190
This class stores all the information about a service publisher.
Definition: Publisher.hh:314
std::recursive_mutex mutex
Mutex to guarantee exclusive access between all threads.
Definition: NodeShared.hh:322
std::thread threadReception
thread in charge of receiving and handling incoming messages.
Definition: NodeShared.hh:319
std::string myRequesterAddress
My requester service call address.
Definition: NodeShared.hh:430
Definition: AdvertiseOptions.hh:28
Store address information about topics and provide convenient methods for adding new topics...
Definition: TopicStorage.hh:41
std::map< std::string, RawSubscriptionHandler_M > rawHandlers
This is a map of the raw local callback handlers. The key is the topic name, and the value is another...
Definition: NodeShared.hh:110
This struct provides information about the Subscribers of a Publisher. It should only be retrieved us...
Definition: NodeShared.hh:141
HandlerStorage< IReqHandler > requests
Pending service call requests.
Definition: NodeShared.hh:418
std::string myAddress
My pub/sub address.
Definition: NodeShared.hh:424