79 if (connection_header)
81 ros::M_string::const_iterator it = connection_header->find(
"latching");
82 if((it != connection_header->end()) && (it->second ==
"1"))
84 ROS_DEBUG(
"input topic is latched; latching output topic to match");
104 int main(
int argc,
char **argv)
108 printf(
"\nusage: relay IN_TOPIC [OUT_TOPIC]\n\n");
111 std::string topic_name;
114 ros::init(argc, argv, topic_name +
string(
"_relay"),
125 bool unreliable =
false;
126 pnh.
getParam(
"unreliable", unreliable);
void in_cb(const ros::MessageEvent< ShapeShifter > &msg_event)
TransportHints & reliable()
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
const boost::shared_ptr< M_string > & getConnectionHeaderPtr() const
const boost::shared_ptr< ConstMessage > & getConstMessage() const
TransportHints & unreliable()
int main(int argc, char **argv)
void conn_cb(const ros::SingleSubscriberPublisher &)
uint32_t getNumSubscribers() const
bool getParam(const std::string &key, std::string &s) const