Public Member Functions | Private Attributes
micros_rtt::NodeHandle Class Reference

#include <node_handle.hpp>

List of all members.

Public Member Functions

template<class M >
Publisher advertise (const std::string &topic, uint32_t queue_size, bool latch=false)
 Advertise a topic, simple version, compatible with ros.
ros::CallbackQueueInterfacegetCallbackQueue () const
const std::string & getNamespace () const
const std::string & getUnresolvedNamespace ()
 NodeHandle (const std::string &ns=std::string(), const ros::M_string &remappings=ros::M_string())
std::string resolveName (const std::string &name, bool remap=true) const
void setCallbackQueue (ros::CallbackQueueInterface *queue)
template<class M >
Subscriber subscribe (const std::string &topic, uint32_t queue_size, void(*fp)(M), const ros::TransportHints &transport_hints=ros::TransportHints())
 Subscribe to a topic, version for bare function, compatible with ros.
 ~NodeHandle ()

Private Attributes

ros::NodeHandle ros_nh_

Detailed Description

Definition at line 32 of file node_handle.hpp.


Constructor & Destructor Documentation

micros_rtt::NodeHandle::NodeHandle ( const std::string &  ns = std::string(),
const ros::M_string remappings = ros::M_string() 
) [inline]

Definition at line 35 of file node_handle.hpp.

Definition at line 42 of file node_handle.hpp.


Member Function Documentation

template<class M >
Publisher micros_rtt::NodeHandle::advertise ( const std::string &  topic,
uint32_t  queue_size,
bool  latch = false 
) [inline]

Advertise a topic, simple version, compatible with ros.

The detail of this method will coming soon.

Parameters:
topicTopic to advertise on
queue_sizeMaximum number of outgoing messages to be queued for delivery to subscribers
latch(optional) If true, the last message published on this topic will be saved and sent to new subscribers when they connect
Returns:
On success, a Publisher that, when it goes out of scope, will automatically release a reference on this advertisement. On failure, an empty Publisher.
Exceptions:
InvalidNameExceptionIf the topic name begins with a tilde, or is an otherwise invalid graph resource name, or is an otherwise invalid graph resource name

Definition at line 80 of file node_handle.hpp.

Definition at line 29 of file node_handle.cpp.

const std::string & micros_rtt::NodeHandle::getNamespace ( ) const

Definition at line 34 of file node_handle.cpp.

Definition at line 39 of file node_handle.cpp.

std::string micros_rtt::NodeHandle::resolveName ( const std::string &  name,
bool  remap = true 
) const

Definition at line 44 of file node_handle.cpp.

Definition at line 24 of file node_handle.cpp.

template<class M >
Subscriber micros_rtt::NodeHandle::subscribe ( const std::string &  topic,
uint32_t  queue_size,
void(*)(M)  fp,
const ros::TransportHints transport_hints = ros::TransportHints() 
) [inline]

Subscribe to a topic, version for bare function, compatible with ros.

The detail of this method will coming soon.

This version of subscribe is a convenience function for using bare functions, and can be used like so:

void callback(const std_msgs::Empty::ConstPtr& message)
{
}

ros::Subscriber sub = handle.subscribe("my_topic", 1, callback);
Parameters:
M[template] M here is the callback parameter type (e.g. const boost::shared_ptr<M const>& or const M&), not the message type, and should almost always be deduced
topicTopic to subscribe to
queue_sizeNumber of incoming messages to queue up for processing (messages in excess of this queue capacity will be discarded).
fpFunction pointer to call when a message has arrived
transport_hintsa TransportHints structure which defines various transport-related options
Returns:
On success, a Subscriber that, when all copies of it go out of scope, will unsubscribe from this topic. On failure, an empty Subscriber which can be checked with:
if (handle)
{
...
}
Exceptions:
InvalidNameExceptionIf the topic name begins with a tilde, or is an otherwise invalid graph resource name
ConflictingSubscriptionExceptionIf this node is already subscribed to the same topic with a different datatype

Definition at line 154 of file node_handle.hpp.


Member Data Documentation

Definition at line 193 of file node_handle.hpp.


The documentation for this class was generated from the following files:


micros_rtt
Author(s): Zaile Jiang , Xiaodong Yi , Minglong Li
autogenerated on Sat Jun 8 2019 19:02:21