module documentation

Internal use: common TCPROS libraries

Class TCPROSServer 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().
Class TCPROSTransport Generic implementation of TCPROS exchange routines for both topics and services
Class TCPROSTransportProtocol Abstraction of TCPROS connections. Implementations Services/Publishers/Subscribers must implement this protocol, which defines how messages are deserialized from an inbound connection (read_messages()) as well as which fields to send when creating a new connection (get_header_fields()).
Class TCPServer Simple server that accepts inbound TCP/IP connections and hands them off to a handler function. TCPServer obeys the ROS_IP/ROS_HOSTNAME environment variables
Function get_tcpros_server_address get the address of the tcpros server. @raise Exception: if tcpros server has not been started or created
Function init_tcpros_server starts the TCPROS server socket for inbound connections @param port: listen on the provided port. If the port number is 0, the port will
Function recv_buff Read data from socket into buffer. @param sock: socket to read from @type sock: socket.socket @param b: buffer to receive into @type b: StringIO @param buff_size: recv read size @type buff_size: int @return: number of bytes read @rtype: int...
Function start_tcpros_server start the TCPROS server if it has not started already
Constant DEFAULT_BUFF_SIZE Undocumented
Constant TCPROS Undocumented
Variable logger Undocumented
Variable python3 Undocumented
Function _error_connection_handler utility handler that does nothing more than provide a rejection header @param sock: socket connection @type sock: socket.socket @param client_addr: client address @type client_addr: str @param header: request header @type header: dict...
Function _is_use_tcp_keepalive Undocumented
Constant _PARAM_TCP_KEEPALIVE Undocumented
Variable _tcpros_server Undocumented
Variable _use_tcp_keepalive Undocumented
Variable _use_tcp_keepalive_lock Undocumented
def get_tcpros_server_address():

get the address of the tcpros server. @raise Exception: if tcpros server has not been started or created

def init_tcpros_server(port=0):

starts the TCPROS server socket for inbound connections @param port: listen on the provided port. If the port number is 0, the port will

be chosen randomly

@type port: int

def recv_buff(sock, b, buff_size):

Read data from socket into buffer. @param sock: socket to read from @type sock: socket.socket @param b: buffer to receive into @type b: StringIO @param buff_size: recv read size @type buff_size: int @return: number of bytes read @rtype: int

def start_tcpros_server():

start the TCPROS server if it has not started already

DEFAULT_BUFF_SIZE: int =

Undocumented

Value
65536
TCPROS: str =

Undocumented

Value
'TCPROS'
logger =

Undocumented

python3: int =

Undocumented

def _error_connection_handler(sock, client_addr, header):

utility handler that does nothing more than provide a rejection header @param sock: socket connection @type sock: socket.socket @param client_addr: client address @type client_addr: str @param header: request header @type header: dict

def _is_use_tcp_keepalive():

Undocumented

_PARAM_TCP_KEEPALIVE: str =

Undocumented

Value
'/tcp_keepalive'
_tcpros_server =

Undocumented

_use_tcp_keepalive =

Undocumented

_use_tcp_keepalive_lock =

Undocumented