Go to the documentation of this file.
28 #ifndef ROSCPP_TRANSPORT_HINTS_H
29 #define ROSCPP_TRANSPORT_HINTS_H
34 #include <boost/lexical_cast.hpp>
72 transports_.push_back(
"TCP");
84 options_[
"tcp_nodelay"] = nodelay ?
"true" :
"false";
93 M_string::iterator it = options_.find(
"tcp_nodelay");
94 if (it == options_.end())
99 const std::string& val = it->second;
115 options_[
"max_datagram_size"] = boost::lexical_cast<std::string>(size);
125 M_string::iterator it = options_.find(
"max_datagram_size");
126 if (it == options_.end())
131 return boost::lexical_cast<int>(it->second);
149 transports_.push_back(
"UDP");
TransportHints & unreliable()
Specifies an unreliable transport. Currently this means UDP.
Provides a way of specifying network transport hints to ros::NodeHandle::subscribe() and someday ros:...
const V_string & getTransports()
Returns a vector of transports, ordered by preference.
TransportHints & tcpNoDelay(bool nodelay=true)
If a TCP transport is used, specifies whether or not to use TCP_NODELAY to provide a potentially lowe...
TransportHints & reliable()
Specifies a reliable transport. Currently this means TCP.
TransportHints & tcp()
Explicitly specifies the TCP transport.
int getMaxDatagramSize()
Returns the maximum datagram size specified on this TransportHints, or 0 if no size was specified.
const M_string & getOptions()
Returns the map of options created by other methods inside TransportHints.
TransportHints & maxDatagramSize(int size)
If a UDP transport is used, specifies the maximum datagram size.
std::vector< std::string > V_string
TransportHints & udp()
Explicitly specifies a UDP transport.
bool getTCPNoDelay()
Returns whether or not this TransportHints has specified TCP_NODELAY.
std::map< std::string, std::string > M_string
roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas
, Jacob Perron
autogenerated on Sat Sep 14 2024 02:59:36