class TCPROSTransportProtocol(object):
Constructor: TCPROSTransportProtocol(resolved_name, recv_data_class, queue_size, buff_size)
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()).
Method | __init__ |
ctor @param resolved_name: resolved service or topic name @type resolved_name: str @param recv_data_class: message class for deserializing inbound messages @type recv_data_class: Class @param queue_size: maximum number of inbound messages to maintain @type queue_size: int @param buff_size: receive buffer size (in bytes) for reading from the connection... |
Method | get |
Header fields that should be sent over the connection. The header fields are protocol specific (i.e. service vs. topic, publisher vs. subscriber). @return: {str : str}: header fields to send over connection @rtype: dict... |
Method | read |
@param b StringIO: read buffer @param msg_queue [Message]: queue of deserialized messages @type msg_queue: [Message] @param sock socket: protocol can optionally read more data from the socket, but in most cases the required data will already be in b... |
Instance Variable | buff |
Undocumented |
Instance Variable | direction |
Undocumented |
Instance Variable | queue |
Undocumented |
Instance Variable | recv |
Undocumented |
Instance Variable | resolved |
Undocumented |
ctor @param resolved_name: resolved service or topic name @type resolved_name: str @param recv_data_class: message class for deserializing inbound messages @type recv_data_class: Class @param queue_size: maximum number of inbound messages to maintain @type queue_size: int @param buff_size: receive buffer size (in bytes) for reading from the connection. @type buff_size: int
Header fields that should be sent over the connection. The header fields are protocol specific (i.e. service vs. topic, publisher vs. subscriber). @return: {str : str}: header fields to send over connection @rtype: dict