Private data for the Node class.
More...
#include <ignition/transport/NodeShared.hh>
|
static const int | Timeout = 250 |
| Timeout used for receiving messages (ms.). More...
|
|
Private data for the Node class.
This class should not be directly used. You should use the Node class.
ignition::transport::NodeShared::NodeShared |
( |
| ) |
|
|
protected |
virtual ignition::transport::NodeShared::~NodeShared |
( |
| ) |
|
|
protectedvirtual |
static NodeShared* ignition::transport::NodeShared::Instance |
( |
| ) |
|
|
static |
void ignition::transport::NodeShared::OnNewConnection |
( |
const MessagePublisher & |
_pub | ) |
|
Callback executed when the discovery detects new topics.
- Parameters
-
[in] | _pub | Information of the publisher in charge of the topic. |
void ignition::transport::NodeShared::OnNewDisconnection |
( |
const MessagePublisher & |
_pub | ) |
|
Callback executed when the discovery detects disconnections.
- Parameters
-
[in] | _pub | Information of the publisher in charge of the topic. |
void ignition::transport::NodeShared::OnNewSrvConnection |
( |
const ServicePublisher & |
_pub | ) |
|
Callback executed when the discovery detects a new service call.
- Parameters
-
[in] | _pub | Information of the publisher in charge of the service. |
void ignition::transport::NodeShared::OnNewSrvDisconnection |
( |
const ServicePublisher & |
_pub | ) |
|
Callback executed when a service call is no longer available.
- Parameters
-
[in] | _pub | Information of the publisher in charge of the service. |
bool ignition::transport::NodeShared::Publish |
( |
const std::string & |
_topic, |
|
|
const std::string & |
_data, |
|
|
const std::string & |
_msgType |
|
) |
| |
Publish data.
- Parameters
-
[in] | _topic | Topic to be published. |
[in] | _data | Data to publish. |
[in] | _msgType | Message type in string format. |
- Returns
- true when success or false otherwise.
void ignition::transport::NodeShared::RecvControlUpdate |
( |
| ) |
|
Method in charge of receiving the control updates (when a new remote subscriber notifies its presence for example).
void ignition::transport::NodeShared::RecvMsgUpdate |
( |
| ) |
|
Method in charge of receiving the topic updates.
void ignition::transport::NodeShared::RecvSrvRequest |
( |
| ) |
|
Method in charge of receiving the service call requests.
void ignition::transport::NodeShared::RecvSrvResponse |
( |
| ) |
|
Method in charge of receiving the service call responses.
void ignition::transport::NodeShared::RunReceptionTask |
( |
| ) |
|
Receive data and control messages.
void ignition::transport::NodeShared::SendPendingRemoteReqs |
( |
const std::string & |
_topic, |
|
|
const std::string & |
_reqType, |
|
|
const std::string & |
_repType |
|
) |
| |
Try to send all the requests for a given service call and a pair of request/response types.
- Parameters
-
[in] | _topic | Topic name. |
[in] | _reqType | Type of the request in string format. |
[in] | _repType | Type of the response in string format. |
std::unique_ptr<zmq::context_t> ignition::transport::NodeShared::context |
0MQ context.
Always declare this object before any ZMQ socket to make sure that the context is destroyed after all sockets.
std::unique_ptr<zmq::socket_t> ignition::transport::NodeShared::control |
ZMQ socket to receive control updates (new connections, ...).
bool ignition::transport::NodeShared::exit |
When true, the reception thread will finish.
std::string ignition::transport::NodeShared::hostAddr |
std::unique_ptr<MsgDiscovery> ignition::transport::NodeShared::msgDiscovery |
std::recursive_mutex ignition::transport::NodeShared::mutex |
Mutex to guarantee exclusive access between all threads.
std::string ignition::transport::NodeShared::myAddress |
std::string ignition::transport::NodeShared::myControlAddress |
My pub/sub control address.
std::string ignition::transport::NodeShared::myReplierAddress |
My replier service call address.
std::string ignition::transport::NodeShared::myRequesterAddress |
My requester service call address.
std::unique_ptr<zmq::socket_t> ignition::transport::NodeShared::publisher |
ZMQ socket to send topic updates.
std::string ignition::transport::NodeShared::pUuid |
std::unique_ptr<zmq::socket_t> ignition::transport::NodeShared::replier |
ZMQ socket to receive service call requests.
Uuid ignition::transport::NodeShared::replierId |
std::unique_ptr<zmq::socket_t> ignition::transport::NodeShared::requester |
ZMQ socket for sending service call requests.
Pending service call requests.
std::unique_ptr<zmq::socket_t> ignition::transport::NodeShared::responseReceiver |
ZMQ socket for receiving service call responses.
Uuid ignition::transport::NodeShared::responseReceiverId |
Response receiver socket identity.
std::unique_ptr<SrvDiscovery> ignition::transport::NodeShared::srvDiscovery |
std::unique_ptr<zmq::socket_t> ignition::transport::NodeShared::subscriber |
ZMQ socket to receive topic updates.
std::thread ignition::transport::NodeShared::threadReception |
thread in charge of receiving and handling incoming messages.
const int ignition::transport::NodeShared::Timeout = 250 |
|
static |
Timeout used for receiving messages (ms.).
int ignition::transport::NodeShared::timeout |
Timeout used for receiving requests.
int ignition::transport::NodeShared::verbose |
Print activity to stdout.
The documentation for this class was generated from the following file: