class documentation

class TCPROSHandler(rospy.impl.transport.ProtocolHandler):

Constructor: TCPROSHandler()

View In Hierarchy

ROS Protocol handler for TCPROS. Accepts both TCPROS topic connections as well as ROS service connections over TCP. TCP server socket is run once start_server() is called -- this is implicitly called during init_publisher().

Method __init__ ctor
Method create_transport Connect to topic resolved_name on Publisher pub_uri using TCPROS. @param resolved_name str: resolved topic name @type resolved_name: str @param pub_uri: XML-RPC URI of publisher @type pub_uri: str @param protocol_params: protocol parameters to use for connecting @type protocol_params: [XmlRpcLegal] @return: code, message, debug @rtype: (int, str, int)...
Method get_supported Get supported protocols
Method init_publisher Initialize this node to receive an inbound TCP connection, i.e. startup a TCP server if one is not already running.
Method set_tcp_nodelay @param resolved_name: resolved topic name @type resolved_name: str
Method shutdown stops the TCP/IP server responsible for receiving inbound connections
Method supports @param protocol: name of protocol @type protocol: str @return: True if protocol is supported @rtype: bool
Method topic_connection_handler Process incoming topic connection. Reads in topic name from handshake and creates the appropriate L{TCPROSPub} handler for the connection. @param sock: socket connection @type sock: socket.socket @param client_addr: client address @type client_addr: (str, int) @param header: key/value pairs from handshake header @type header: dict @return: error string or None @rtype: str...
Instance Variable tcp_nodelay_map Undocumented
def __init__(self):

ctor

def create_transport(self, resolved_name, pub_uri, protocol_params):

Connect to topic resolved_name on Publisher pub_uri using TCPROS. @param resolved_name str: resolved topic name @type resolved_name: str @param pub_uri: XML-RPC URI of publisher @type pub_uri: str @param protocol_params: protocol parameters to use for connecting @type protocol_params: [XmlRpcLegal] @return: code, message, debug @rtype: (int, str, int)

def get_supported(self):

Get supported protocols

def init_publisher(self, resolved_name, protocol):

Initialize this node to receive an inbound TCP connection, i.e. startup a TCP server if one is not already running.

@param resolved_name: topic name @type resolved__name: str

@param protocol: negotiated protocol
parameters. protocol[0] must be the string 'TCPROS'

@type protocol: [str, value*] @return: (code, msg, [TCPROS, addr, port]) @rtype: (int, str, list)

def set_tcp_nodelay(self, resolved_name, tcp_nodelay):

@param resolved_name: resolved topic name @type resolved_name: str

@param tcp_nodelay: If True, sets TCP_NODELAY on publisher's socket (disables Nagle algorithm). This results in lower latency publishing at the cost of efficiency. @type tcp_nodelay: bool

def shutdown(self):

stops the TCP/IP server responsible for receiving inbound connections

def supports(self, protocol):

@param protocol: name of protocol @type protocol: str @return: True if protocol is supported @rtype: bool

def topic_connection_handler(self, sock, client_addr, header):

Process incoming topic connection. Reads in topic name from handshake and creates the appropriate L{TCPROSPub} handler for the connection. @param sock: socket connection @type sock: socket.socket @param client_addr: client address @type client_addr: (str, int) @param header: key/value pairs from handshake header @type header: dict @return: error string or None @rtype: str

tcp_nodelay_map: dict =

Undocumented