18 #ifndef _IGN_TRANSPORT_NODESHARED_HH_INCLUDED__ 19 #define _IGN_TRANSPORT_NODESHARED_HH_INCLUDED__ 22 #pragma warning(push, 0) 24 #include <google/protobuf/message.h> 61 public:
void RunReceptionTask();
68 public:
bool Publish(
const std::string &_topic,
69 const std::string &_data,
70 const std::string &_msgType);
73 public:
void RecvMsgUpdate();
77 public:
void RecvControlUpdate();
80 public:
void RecvSrvRequest();
83 public:
void RecvSrvResponse();
90 public:
void SendPendingRemoteReqs(
const std::string &_topic,
91 const std::string &_reqType,
92 const std::string &_repType);
117 public:
static const int Timeout = 250;
150 public: std::unique_ptr<zmq::socket_t>
control;
165 public: std::unique_ptr<zmq::socket_t>
replier;
183 public:
bool threadReceptionExiting;
188 private: std::mutex exitMutex;
194 private: std::vector<std::string> srvConnections;
std::thread threadReception
thread in charge of receiving and handling incoming messages.
Definition: NodeShared.hh:174
Uuid replierId
Replier socket identity.
Definition: NodeShared.hh:162
std::unique_ptr< zmq::socket_t > control
ZMQ socket to receive control updates (new connections, ...).
Definition: NodeShared.hh:150
zmq::context_t * context
0MQ context.
Definition: NodeShared.hh:141
#define IGNITION_VISIBLE
Use to represent "symbol visible" if supported.
Definition: Helpers.hh:56
std::string hostAddr
IP address of this host.
Definition: NodeShared.hh:135
std::unique_ptr< zmq::socket_t > responseReceiver
ZMQ socket for receiving service call responses.
Definition: NodeShared.hh:156
Uuid responseReceiverId
Response receiver socket identity.
Definition: NodeShared.hh:159
int timeout
Timeout used for receiving requests.
Definition: NodeShared.hh:171
std::string myControlAddress
My pub/sub control address.
Definition: NodeShared.hh:126
HandlerStorage< IReqHandler > requests
Pending service call requests.
Definition: NodeShared.hh:206
std::string myReplierAddress
My replier service call address.
Definition: NodeShared.hh:132
bool exit
When true, the reception thread will finish.
Definition: NodeShared.hh:180
TopicStorage< MessagePublisher > remoteSubscribers
Remote subscribers.
Definition: NodeShared.hh:197
std::unique_ptr< zmq::socket_t > replier
ZMQ socket to receive service call requests.
Definition: NodeShared.hh:165
ignition/transport/HandlerStorage.hh
Definition: HandlerStorage.hh:33
Private data for the Node class.
Definition: NodeShared.hh:53
A portable class for representing a Universally Unique Identifier.
Definition: Uuid.hh:41
std::unique_ptr< zmq::socket_t > subscriber
ZMQ socket to receive topic updates.
Definition: NodeShared.hh:147
std::unique_ptr< zmq::socket_t > requester
ZMQ socket for sending service call requests.
Definition: NodeShared.hh:153
std::string myAddress
My pub/sub address.
Definition: NodeShared.hh:123
std::unique_ptr< zmq::socket_t > publisher
ZMQ socket to send topic updates.
Definition: NodeShared.hh:144
std::unique_ptr< Discovery > discovery
Discovery service.
Definition: NodeShared.hh:138
ignition/transport/Publisher.hh
Definition: Publisher.hh:175
ignition/transport/Publisher.hh
Definition: Publisher.hh:264
HandlerStorage< ISubscriptionHandler > localSubscriptions
Subscriptions.
Definition: NodeShared.hh:200
std::string myRequesterAddress
My requester service call address.
Definition: NodeShared.hh:129
Definition: AdvertiseOptions.hh:25
Store address information about topics and provide convenient methods for adding new topics...
Definition: TopicStorage.hh:37
std::string pUuid
Process UUID.
Definition: NodeShared.hh:168
int verbose
Print activity to stdout.
Definition: NodeShared.hh:120
HandlerStorage< IRepHandler > repliers
Service call repliers.
Definition: NodeShared.hh:203
std::recursive_mutex mutex
Mutex to guarantee exclusive access between all threads.
Definition: NodeShared.hh:177