ros::TransportHints Class Reference

Provides a way of specifying network transport hints to ros::NodeHandle::subscribe() and someday ros::NodeHandle::advertise(). More...

#include <transport_hints.h>

List of all members.

Public Member Functions

int getMaxDatagramSize ()
 Returns the maximum datagram size specified on this TransportHints, or 0 if no size was specified.
const M_stringgetOptions ()
 Returns the map of options created by other methods inside TransportHints.
bool getTCPNoDelay ()
 Returns whether or not this TransportHints has specified TCP_NODELAY.
const V_stringgetTransports ()
 Returns a vector of transports, ordered by preference.
TransportHintsmaxDatagramSize (int size)
 If a UDP transport is used, specifies the maximum datagram size.
TransportHintsreliable ()
 Specifies a reliable transport. Currently this means TCP.
TransportHintstcp ()
 Explicitly specifies the TCP transport.
TransportHintstcpNoDelay (bool nodelay=true)
 If a TCP transport is used, specifies whether or not to use TCP_NODELAY to provide a potentially lower-latency connection.
TransportHintsudp ()
 Explicitly specifies a UDP transport.
TransportHintsunreliable ()
 Specifies an unreliable transport. Currently this means UDP.

Private Attributes

M_string options_
V_string transports_

Detailed Description

Provides a way of specifying network transport hints to ros::NodeHandle::subscribe() and someday ros::NodeHandle::advertise().

Uses the named parameter idiom, allowing you to do things like:

ros::TransportHints()
        .unreliable()
        .maxDatagramSize(1000)
        .tcpNoDelay();

Hints for the transport type are used in the order they are specified, i.e. TransportHints().unreliable().reliable() specifies that you would prefer an unreliable transport, followed by a reliable one.

Definition at line 53 of file transport_hints.h.


Member Function Documentation

int ros::TransportHints::getMaxDatagramSize (  )  [inline]

Returns the maximum datagram size specified on this TransportHints, or 0 if no size was specified.

Definition at line 122 of file transport_hints.h.

const M_string& ros::TransportHints::getOptions (  )  [inline]

Returns the map of options created by other methods inside TransportHints.

Definition at line 159 of file transport_hints.h.

bool ros::TransportHints::getTCPNoDelay (  )  [inline]

Returns whether or not this TransportHints has specified TCP_NODELAY.

Definition at line 90 of file transport_hints.h.

const V_string& ros::TransportHints::getTransports (  )  [inline]

Returns a vector of transports, ordered by preference.

Definition at line 155 of file transport_hints.h.

TransportHints& ros::TransportHints::maxDatagramSize ( int  size  )  [inline]

If a UDP transport is used, specifies the maximum datagram size.

Parameters:
size The size, in bytes

Definition at line 112 of file transport_hints.h.

TransportHints& ros::TransportHints::reliable (  )  [inline]

Specifies a reliable transport. Currently this means TCP.

Definition at line 59 of file transport_hints.h.

TransportHints& ros::TransportHints::tcp (  )  [inline]

Explicitly specifies the TCP transport.

Definition at line 69 of file transport_hints.h.

TransportHints& ros::TransportHints::tcpNoDelay ( bool  nodelay = true  )  [inline]

If a TCP transport is used, specifies whether or not to use TCP_NODELAY to provide a potentially lower-latency connection.

Parameters:
nodelay [optional] Whether or not to use TCP_NODELAY. Defaults to true.

Definition at line 81 of file transport_hints.h.

TransportHints& ros::TransportHints::udp (  )  [inline]

Explicitly specifies a UDP transport.

Definition at line 146 of file transport_hints.h.

TransportHints& ros::TransportHints::unreliable (  )  [inline]

Specifies an unreliable transport. Currently this means UDP.

Definition at line 136 of file transport_hints.h.


Member Data Documentation

Definition at line 163 of file transport_hints.h.

Definition at line 162 of file transport_hints.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


roscpp
Author(s): Morgan Quigley mquigley@cs.stanford.edu, Josh Faust jfaust@willowgarage.com, Brian Gerkey gerkey@willowgarage.com
autogenerated on Fri Jan 11 10:08:41 2013