|
virtual | ~Node () |
| Destructor.
|
|
*brief Old method for advertising a service This signature is *considered deprecated Please migrate to the callback signature std::function< void(ReplyT &_rep, bool &_result)> const AdvertiseServiceOptions ReplyT const std::string void(ClassT::*) | _cb (const RequestT &_req, ReplyT &_rep, bool &_result) |
|
class ignition::transport::Node | Advertise (const std::string &_topic, bool(*_cb)(ReplyT &_rep), const AdvertiseServiceOptions &_options=AdvertiseServiceOptions()) |
|
*brief Old method for advertising a service This signature is *considered deprecated Please migrate to the callback signature std::function< void(ReplyT &_rep, bool &_result)> const AdvertiseServiceOptions ReplyT const std::string void(ClassT::ClassT const AdvertiseServiceOptions ReplyT bool | Advertise (const std::string &_topic, bool(ClassT::*_cb)(const RequestT &_req, ReplyT &_rep), ClassT *_obj, const AdvertiseServiceOptions &_options=AdvertiseServiceOptions()) |
|
*brief Old method for advertising a service This signature is *considered deprecated Please migrate to the callback signature void(ClassT::ClassT const AdvertiseServiceOptions ReplyT bool | Advertise (const std::string &_topic, bool(ClassT::*_cb)(ReplyT &_rep), ClassT *_obj, const AdvertiseServiceOptions &_options=AdvertiseServiceOptions()) |
|
template<typename MessageT > |
Node::Publisher | Advertise (const std::string &_topic, const AdvertiseMessageOptions &_options=AdvertiseMessageOptions()) |
| Advertise a new topic. If a topic is currently advertised, you cannot advertise it a second time (regardless of its type).
|
|
Node::Publisher | Advertise (const std::string &_topic, const std::string &_msgTypeName, const AdvertiseMessageOptions &_options=AdvertiseMessageOptions()) |
| Advertise a new topic. If a topic is currently advertised, you cannot advertise it a second time (regardless of its type).
|
|
*brief Advertise a new service without any output parameter *In this version the callback is a member function *param[in] _topic Topic name associated to the service *param[in] _cb Callback to handle the service request with the *following RequestT bool | Advertise (const std::string &_topic, void(ClassT::*_cb)(const RequestT &_req), ClassT *_obj, const AdvertiseServiceOptions &_options=AdvertiseServiceOptions()) |
|
std::vector< std::string > | AdvertisedServices () const |
|
std::vector< std::string > | AdvertisedTopics () const |
| Get the list of topics advertised by this node.
|
|
| if (!_rep.ParseFromString(reqHandlerPtr->Response())) |
|
| if (!executed) return false |
|
| if (!reqHandlerPtr->Result()) |
|
| if (!TopicUtils::FullyQualifiedName(this->Options().Partition(), this->Options().NameSpace(), _topic, fullyQualifiedTopic)) |
|
| if (localResponserFound) |
|
| if (this->Shared() ->repliers.FirstHandler(fullyQualifiedTopic, _req.GetTypeName(), _rep.GetTypeName(), repHandler)) |
|
| if (this->Shared() ->TopicPublishers(fullyQualifiedTopic, addresses)) |
|
std::unique_lock< std::recursive_mutex > | lk (this->Shared() ->mutex) |
|
| Node (const NodeOptions &_options=NodeOptions()) |
| Constructor.
|
|
return this | Request (_topic, req, _cb) |
|
return this | Request (_topic, req, _cb, _obj) |
|
return this | Request (_topic, req, _timeout, _rep, _result) |
|
template<typename RequestT > |
bool | Request (const std::string &_topic, const RequestT &_req) |
|
return this | Request< RequestT, ReplyT > (_topic, _req, f) |
|
bool | ServiceInfo (const std::string &_service, std::vector< ServicePublisher > &_publishers) const |
|
void | ServiceList (std::vector< std::string > &_services) const |
|
reqHandlerPtr | SetCallback (_cb) |
|
this | Shared () -> requests.AddHandler(fullyQualifiedTopic, this->NodeUuid(), reqHandlerPtr) |
|
template<typename MessageT > |
bool | Subscribe (const std::string &_topic, std::function< void(const MessageT &_msg)> &_cb, const SubscribeOptions &_opts=SubscribeOptions()) |
| Subscribe to a topic registering a callback. Note that this callback does not include any message information. In this version the callback is a lamda function.
|
|
template<typename MessageT > |
bool | Subscribe (const std::string &_topic, std::function< void(const MessageT &_msg, const MessageInfo &_info)> &_cb, const SubscribeOptions &_opts=SubscribeOptions()) |
| Subscribe to a topic registering a callback. Note that this callback includes message information. In this version the callback is a lamda function.
|
|
template<typename MessageT > |
bool | Subscribe (const std::string &_topic, void(*_cb)(const MessageT &_msg), const SubscribeOptions &_opts=SubscribeOptions()) |
| Subscribe to a topic registering a callback. Note that this callback does not include any message information. In this version the callback is a free function.
|
|
template<typename MessageT > |
bool | Subscribe (const std::string &_topic, void(*_cb)(const MessageT &_msg, const MessageInfo &_info), const SubscribeOptions &_opts=SubscribeOptions()) |
| Subscribe to a topic registering a callback. Note that this callback includes message information. In this version the callback is a free function.
|
|
template<typename ClassT , typename MessageT > |
bool | Subscribe (const std::string &_topic, void(ClassT::*_cb)(const MessageT &_msg), ClassT *_obj, const SubscribeOptions &_opts=SubscribeOptions()) |
| Subscribe to a topic registering a callback. Note that this callback does not include any message information. In this version the callback is a member function.
|
|
template<typename ClassT , typename MessageT > |
bool | Subscribe (const std::string &_topic, void(ClassT::*_cb)(const MessageT &_msg, const MessageInfo &_info), ClassT *_obj, const SubscribeOptions &_opts=SubscribeOptions()) |
| Subscribe to a topic registering a callback. Note that this callback includes message information. In this version the callback is a member function.
|
|
std::vector< std::string > | SubscribedTopics () const |
| Get the list of topics subscribed by this node. Note that we might be interested in one topic but we still don't know the address of a publisher.
|
|
bool | TopicInfo (const std::string &_topic, std::vector< MessagePublisher > &_publishers) const |
|
void | TopicList (std::vector< std::string > &_topics) const |
|
bool | UnadvertiseSrv (const std::string &_topic) |
|
bool | Unsubscribe (const std::string &_topic) |
| Unsubscribe from a topic.
|
|
void | waitForShutdown () |
| Block the current thread until a SIGINT or SIGTERM is received. Note that this function registers a signal handler. Do not use this function if you want to manage yourself SIGINT/SIGTERM.
|
|
|
*brief Advertise a new service without any output parameter *In this version the callback is a free function *param[in] _topic Topic name associated to the service *param[in] _cb Callback to handle the service request with the *following void(* | _cb )(const RequestT &_req) |
|
*brief Old method for advertising a service This signature is *considered deprecated Please migrate to the callback signature std::function< void(ReplyT &_rep, bool &_result)> const AdvertiseServiceOptions ReplyT const std::string void(ClassT::ClassT | _obj ) |
|
*brief Advertise a new service without any output parameter *In this version the callback is a free function *param[in] _topic Topic name associated to the service *param[in] _cb Callback to handle the service request with the *following void const AdvertiseServiceOptions & | _options |
|
reqHandlerPtr SetResponse & | _rep |
|
reqHandlerPtr SetMessage & | _req |
|
| _result = true |
|
*brief Advertise a new service without any output parameter *In this version the callback is a free function *param[in] _topic Topic name associated to the service *param[in] _cb Callback to handle the service request with the *following void const AdvertiseServiceOptions ReplyT const std::string & | _topic |
|
SrvAddresses_M | addresses |
|
*brief Advertise a new service without any output parameter *In this version the callback is a free function *param[in] _topic Topic name associated to the service *param[in] _cb Callback to handle the service request with the *following void const AdvertiseServiceOptions ReplyT const std::string std::function< void(const RequestT &_req, ReplyT &_rep, bool &_result)> const AdvertiseServiceOptions ReplyT boo | Advertise )(const std::string &_topic, std::function< bool(const RequestT &_req, ReplyT &_rep)> &_cb, const AdvertiseServiceOptions &_options=AdvertiseServiceOptions()) |
|
*brief Subscribe to a topic registering a callback The callback must *accept a std::string to represent the message and a MessageInfo *which provides metadata about the message *param[in] _topic Name of the topic to subscribe to *param[in] _callback A function pointer or std::function object that *has a void return value and accepts two | arguments |
|
*brief Old method for advertising a service This signature is *considered deprecated Please migrate to the callback signature * | code |
|
*brief Get the list of topics currently advertised in the network *Note that this function can block for some time if the *discovery is in its initialization phase *The value of the heartbeatInterval | constant |
|
*brief Subscribe to a topic registering a callback The callback must *accept a std::string to represent the message | data |
|
| else |
|
bool | localResponserFound |
|
*brief Get the list of topics currently advertised in the network *Note that this function can block for some time if the *discovery is in its initialization phase *The value of the heartbeatInterval with a default *value of | ms |
|
*brief Get the list of topics currently advertised in the network *Note that this function can block for some time if the *discovery is in its initialization phase *The value of the heartbeatInterval with a default *value | of |
|
*brief Advertise a new service without any output parameter *In this version the callback is a free function *param[in] _topic Topic name associated to the service *param[in] _cb Callback to handle the service request with the *following | parameters |
|
IRepHandlerPtr | repHandler |
|
std::shared_ptr< ReqHandler< RequestT, ReplyT > > | reqHandlerPtr (new ReqHandler< RequestT, ReplyT >(this->NodeUuid())) |
|
*brief Old method for advertising a service This signature is *considered deprecated Please migrate to the callback signature std::function< void(ReplyT &_rep, bool &_result)> const AdvertiseServiceOption | RequestT ) |
|
return | true |
|