Package rospy :: Package impl :: Module tcpros_service :: Class TCPROSServiceClient

Class TCPROSServiceClient

source code

                         object --+    
                                  |    
tcpros_base.TCPROSTransportProtocol --+
                                      |
                                     TCPROSServiceClient

Protocol Implementation for Service clients over TCPROS

Instance Methods
 
__init__(self, resolved_name, service_class, headers=None, buff_size=65536)
ctor.
source code
dict
get_header_fields(self)
TCPROSTransportProtocol API
source code
 
read_messages(self, b, msg_queue, sock)
In service implementation, reads in OK byte that precedes each response.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, resolved_name, service_class, headers=None, buff_size=65536)
(Constructor)

source code 

ctor.

Parameters:
  • resolved_name (str) - resolved service name
  • service_class (Service) - Service data type class
  • headers (dict) - identifier for Service session
  • buff_size (int) - size of buffer (bytes) for reading responses from Service.
Overrides: object.__init__

get_header_fields(self)

source code 

TCPROSTransportProtocol API

Returns: dict
{str : str}: header fields to send over connection
Overrides: tcpros_base.TCPROSTransportProtocol.get_header_fields

read_messages(self, b, msg_queue, sock)

source code 

In service implementation, reads in OK byte that precedes each response. The OK byte allows for the passing of error messages instead of a response message

Parameters:
  • b (StringIO) - buffer
  • msg_queue ([Message]) - Message queue to append to
  • sock (socket.socket) - socket to read from
Overrides: tcpros_base.TCPROSTransportProtocol.read_messages