Package rospy :: Package impl :: Module tcpros_pubsub :: Class TCPROSSub

Class TCPROSSub

source code

                         object --+    
                                  |    
tcpros_base.TCPROSTransportProtocol --+
                                      |
                                     TCPROSSub

Subscription transport implementation for receiving topic data via peer-to-peer TCP/IP sockets

Instance Methods
 
__init__(self, resolved_name, recv_data_class, queue_size=None, buff_size=65536, tcp_nodelay=False)
ctor.
source code
dict
get_header_fields(self)
Returns: dictionary of subscriber fields
source code
 
read_messages(self, b, msg_queue, sock) (Inherited from rospy.impl.tcpros_base.TCPROSTransportProtocol) 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, recv_data_class, queue_size=None, buff_size=65536, tcp_nodelay=False)
(Constructor)

source code 

ctor.

Parameters:
  • resolved_name (str) - resolved subscription name
  • recv_data_class (rospy.Message) - class to instantiate to receive messages
  • queue_size (int) - maximum number of messages to deserialize from newly read data off socket
  • buff_size (int) - recv buffer size
  • tcp_nodelay (bool) - If True, request TCP_NODELAY from publisher
Overrides: object.__init__

get_header_fields(self)

source code 

Header fields that should be sent over the connection. The header fields are protocol specific (i.e. service vs. topic, publisher vs. subscriber).

Returns: dict
dictionary of subscriber fields
Overrides: tcpros_base.TCPROSTransportProtocol.get_header_fields