Go to the documentation of this file.
29 #ifndef ROSCPP_TRANSPORT_HINTS_H
30 #define ROSCPP_TRANSPORT_HINTS_H
33 #include "ros/forwards.h"
73 transports_.push_back(
"TCP");
85 options_[
"tcp_nodelay"] = nodelay ?
"true" :
"false";
94 M_string::iterator it = options_.find(
"tcp_nodelay");
95 if (it == options_.end())
100 const std::string& val = it->second;
116 options_[
"max_datagram_size"] = std::to_string(size);
126 M_string::iterator it = options_.find(
"max_datagram_size");
127 if (it == options_.end())
132 return std::stoi(it->second);
150 transports_.push_back(
"UDP");
TransportHints & tcpNoDelay(bool nodelay=true)
If a TCP transport is used, specifies whether or not to use TCP_NODELAY to provide a potentially lowe...
std::map< std::string, std::string > M_string
TransportHints & unreliable()
Specifies an unreliable transport. Currently this means UDP.
TransportHints & udp()
Explicitly specifies a UDP transport.
const M_string & getOptions()
Returns the map of options created by other methods inside TransportHints.
int getMaxDatagramSize()
Returns the maximum datagram size specified on this TransportHints, or 0 if no size was specified.
TransportHints & reliable()
Specifies a reliable transport. Currently this means TCP.
Provides a way of specifying network transport hints to ros::NodeHandle::subscribe() and someday ros:...
bool getTCPNoDelay()
Returns whether or not this TransportHints has specified TCP_NODELAY.
const V_string & getTransports()
Returns a vector of transports, ordered by preference.
TransportHints & maxDatagramSize(int size)
If a UDP transport is used, specifies the maximum datagram size.
std::vector< std::string > V_string
TransportHints & tcp()
Explicitly specifies the TCP transport.
sick_scan_xd
Author(s): Michael Lehning
, Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:12