Package rospy :: Package impl :: Module tcpros_base

Module tcpros_base

source code

Internal use: common TCPROS libraries

Classes
  TCPServer
Simple server that accepts inbound TCP/IP connections and hands them off to a handler function.
  TCPROSServer
ROS Protocol handler for TCPROS.
  TCPROSTransportProtocol
Abstraction of TCPROS connections.
  TCPROSTransport
Generic implementation of TCPROS exchange routines for both topics and services
Functions
int
recv_buff(sock, b, buff_size)
Read data from socket into buffer.
source code
 
init_tcpros_server()
starts the TCPROS server socket for inbound connections
source code
 
start_tcpros_server()
start the TCPROS server if it has not started already
source code
 
get_tcpros_server_address()
get the address of the tcpros server.
source code
Variables
  logger = logging.getLogger('rospy.tcpros')
  DEFAULT_BUFF_SIZE = 65536
  TCPROS = 'TCPROS'
  __package__ = 'rospy.impl'
Function Details

recv_buff(sock, b, buff_size)

source code 

Read data from socket into buffer.

Parameters:
  • sock (socket.socket) - socket to read from
  • b (StringIO) - buffer to receive into
  • buff_size (int) - recv read size
Returns: int
number of bytes read

get_tcpros_server_address()

source code 

get the address of the tcpros server.

Raises:
  • Exception - if tcpros server has not been started or created