18 #ifndef IGN_TRANSPORT_NODESHARED_HH_ 19 #define IGN_TRANSPORT_NODESHARED_HH_ 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);
119 private:
bool InitializeSockets();
122 public:
static const int Timeout = 250;
150 public:
bool threadReceptionExiting;
155 private:
const int kMsgDiscPort = 11317;
158 private:
const int kSrvDiscPort = 11318;
161 private: std::mutex exitMutex;
167 private: std::vector<std::string> srvConnections;
205 public: std::unique_ptr<zmq::context_t>
context;
218 public: std::unique_ptr<zmq::socket_t>
control;
227 public: std::unique_ptr<zmq::socket_t>
replier;
std::thread threadReception
thread in charge of receiving and handling incoming messages.
Definition: NodeShared.hh:141
Uuid replierId
Replier socket identity.
Definition: NodeShared.hh:132
std::unique_ptr< zmq::socket_t > control
ZMQ socket to receive control updates (new connections, ...).
Definition: NodeShared.hh:218
std::string hostAddr
IP address of this host.
Definition: NodeShared.hh:197
std::unique_ptr< zmq::socket_t > responseReceiver
ZMQ socket for receiving service call responses.
Definition: NodeShared.hh:224
Uuid responseReceiverId
Response receiver socket identity.
Definition: NodeShared.hh:129
int timeout
Timeout used for receiving requests.
Definition: NodeShared.hh:138
std::string myControlAddress
My pub/sub control address.
Definition: NodeShared.hh:188
HandlerStorage< IReqHandler > requests
Pending service call requests.
Definition: NodeShared.hh:179
std::string myReplierAddress
My replier service call address.
Definition: NodeShared.hh:194
bool exit
When true, the reception thread will finish.
Definition: NodeShared.hh:147
TopicStorage< MessagePublisher > remoteSubscribers
Remote subscribers.
Definition: NodeShared.hh:170
std::unique_ptr< SrvDiscovery > srvDiscovery
Discovery service (services).
Definition: NodeShared.hh:237
std::unique_ptr< zmq::socket_t > replier
ZMQ socket to receive service call requests.
Definition: NodeShared.hh:227
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:215
std::unique_ptr< zmq::socket_t > requester
ZMQ socket for sending service call requests.
Definition: NodeShared.hh:221
std::string myAddress
My pub/sub address.
Definition: NodeShared.hh:185
std::unique_ptr< zmq::socket_t > publisher
ZMQ socket to send topic updates.
Definition: NodeShared.hh:212
#define IGNITION_TRANSPORT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: Helpers.hh:55
ignition/transport/Publisher.hh
Definition: Publisher.hh:175
ignition/transport/Publisher.hh
Definition: Publisher.hh:264
HandlerStorage< ISubscriptionHandler > localSubscriptions
Subscriptions.
Definition: NodeShared.hh:173
std::unique_ptr< MsgDiscovery > msgDiscovery
Discovery service (messages).
Definition: NodeShared.hh:234
std::string myRequesterAddress
My requester service call address.
Definition: NodeShared.hh:191
std::unique_ptr< zmq::context_t > context
0MQ context.
Definition: NodeShared.hh:205
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:135
int verbose
Print activity to stdout.
Definition: NodeShared.hh:182
HandlerStorage< IRepHandler > repliers
Service call repliers.
Definition: NodeShared.hh:176
std::recursive_mutex mutex
Mutex to guarantee exclusive access between all threads.
Definition: NodeShared.hh:144