18 #ifndef IGN_TRANSPORT_NODESHARED_HH_ 19 #define IGN_TRANSPORT_NODESHARED_HH_ 22 #pragma warning(push, 0) 24 #include <google/protobuf/message.h> 36 #include "ignition/transport/config.hh" 37 #include "ignition/transport/Export.hh" 52 inline namespace IGNITION_TRANSPORT_VERSION_NAMESPACE {
59 class NodeSharedPrivate;
72 public:
void RunReceptionTask();
87 const size_t _dataSize,
92 public:
void RecvMsgUpdate();
170 public:
void IGN_DEPRECATED(8.0) TriggerSubscriberCallbacks(
171 const
std::
string &_topic,
172 const
std::
string &_msgData,
173 const
std::
string &_msgType,
182 public:
void TriggerCallbacks(
184 const
std::
string &_msgData,
190 public:
void RecvControlUpdate();
193 public:
void RecvSrvRequest();
196 public:
void RecvSrvResponse();
203 public:
void SendPendingRemoteReqs(const
std::
string &_topic,
204 const
std::
string &_reqType,
205 const
std::
string &_repType);
239 public:
bool TopicPublishers(const
std::
string &_topic,
248 public:
bool DiscoverService(const
std::
string &_topic) const;
267 public:
int RcvHwm();
279 public:
int SndHwm();
285 protected: virtual ~NodeShared();
290 private:
bool InitializeSockets();
297 public:
Uuid responseReceiverId;
305 #pragma warning(push) 306 #pragma warning(disable: 4251) 318 public:
static const int kMsgDiscPort = 10317;
321 public:
static const int kSrvDiscPort = 10318;
347 public:
bool HasSubscriber(
356 public:
bool HasSubscriber(
377 public:
bool RemoveHandlersForNode(
395 #pragma warning(push) 396 #pragma warning(disable: 4251) 427 private:
friend Node;
428 private:
friend NodePrivate;
bool haveRaw
True iff there are any raw local subscribers.
Definition: NodeShared.hh:114
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:103
bool haveLocal
True iff there are any standard local subscribers.
Definition: NodeShared.hh:111
bool haveRemote
True if this Publisher has any remote subscribers.
Definition: NodeShared.hh:143
TopicStorage< MessagePublisher > remoteSubscribers
Remote subscribers.
Definition: NodeShared.hh:330
HandlerStorage< RawSubscriptionHandler > raw
Raw local subscriptions. Keeping these separate from localSubscriptions allows us to avoid an unneces...
Definition: NodeShared.hh:387
std::string myControlAddress
My pub/sub control address.
Definition: NodeShared.hh:411
HandlerInfo contains information about callback handlers which is useful for local publishers and mes...
Definition: NodeShared.hh:98
HandlerWrapper localSubscribers
Definition: NodeShared.hh:390
HandlerStorage< ISubscriptionHandler > normal
Normal local subscriptions.
Definition: NodeShared.hh:382
Class to store and manage service call handlers.
Definition: HandlerStorage.hh:39
std::string myReplierAddress
My replier service call address.
Definition: NodeShared.hh:417
Private data for the Node class. This class should not be directly used. You should use the Node clas...
Definition: NodeShared.hh:64
int verbose
Print activity to stdout.
Definition: NodeShared.hh:405
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
std::string hostAddr
IP address of this host.
Definition: NodeShared.hh:420
This struct wraps up the two different types of subscription handlers: normal (deserialized) and raw ...
Definition: NodeShared.hh:339
A class that allows a client to communicate with other peers. There are two main communication modes:...
Definition: Node.hh:93
void(void *_data, void *_hint) DeallocFunc
Definition: TransportTypes.hh:171
This class stores all the information about a message publisher.
Definition: Publisher.hh:222
This class stores all the information about a service publisher.
Definition: Publisher.hh:355
std::recursive_mutex mutex
Mutex to guarantee exclusive access between all threads.
Definition: NodeShared.hh:315
std::thread threadReception
thread in charge of receiving and handling incoming messages.
Definition: NodeShared.hh:312
std::string myRequesterAddress
My requester service call address.
Definition: NodeShared.hh:414
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:108
This struct provides information about the Subscribers of a Publisher. It should only be retrieved us...
Definition: NodeShared.hh:139
HandlerStorage< IReqHandler > requests
Pending service call requests.
Definition: NodeShared.hh:402
std::string myAddress
My pub/sub address.
Definition: NodeShared.hh:408