Package rospy :: Package impl :: Module tcpros_pubsub :: Class TCPROSPub

Class TCPROSPub

source code

                         object --+    
                                  |    
tcpros_base.TCPROSTransportProtocol --+
                                      |
                                     TCPROSPub

Publisher transport implementation for publishing topic data via peer-to-peer TCP/IP sockets.

Instance Methods
 
__init__(self, resolved_name, pub_data_class, is_latch=False, headers=None)
ctor.
source code
dict
get_header_fields(self)
Header fields that should be sent over the connection.
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, pub_data_class, is_latch=False, headers=None)
(Constructor)

source code 

ctor.

Parameters:
  • resolved_name (str) - resolved topic name
  • pub_data_class (rospy.Message class) - class to instance to receive messages
  • is_latch (bool) - If True, Publisher is latching
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
{str : str}: header fields to send over connection
Overrides: tcpros_base.TCPROSTransportProtocol.get_header_fields
(inherited documentation)