class documentation

Underlying L{_TopicImpl} implementation for publishers.

Method __init__ @param name: name of topic, e.g. 'laser'. @type name: str @param data_class: Message data class @type data_class: L{Message} class
Method acquire lock for thread-safe publishing to this transport
Method add_connection Add a connection to this topic. This must be a PubTransport. If the latch is enabled, c will be sent a the value of the latch. @param c: connection instance @type c: L{Transport} @return: True if connection was added @rtype: bool...
Method add_headers Add connection headers to this Topic for future connections. @param headers: key/values will be added to current connection header set, overriding any existing keys if they conflict. @type headers: dict...
Method add_subscriber_listener Add a L{SubscribeListener} for subscribe events. @param l: listener instance @type l: L{SubscribeListener}
Method close close I/O and release resources
Method enable_latch Enable publish() latch. The latch contains the last published message and is sent to any new subscribers.
Method get_stats Get the stats for this topic publisher @return: stats for topic in getBusStats() publisher format:
Method publish Publish the data to the topic. If the topic has no subscribers, the method will return without any affect. Access to publish() should be locked using acquire() and release() in order to ensure proper message publish ordering.
Method release lock for thread-safe publishing to this transport
Method remove_connection Remove existing connection from this topic. @param c: connection instance to remove @type c: L{Transport}
Method set_queue_size Undocumented
Instance Variable buff Undocumented
Instance Variable headers Undocumented
Instance Variable is_latch Undocumented
Instance Variable latch Undocumented
Instance Variable message_data_sent Undocumented
Instance Variable publock Undocumented
Instance Variable queue_size Undocumented
Instance Variable subscriber_listeners Undocumented

Inherited from _TopicImpl:

Method __del__ Undocumented
Method check Undocumented
Method get_num_connections Undocumented
Method get_stats_info Get the stats for this topic @return: stats for topic in getBusInfo() format:
Method has_connection Query whether or not a connection with the associated \x07 endpoint has been added to this object. @param endpoint_id: endpoint ID associated with connection. @type endpoint_id: str
Method has_connections Check to see if this topic is connected to other publishers/subscribers @return: True if topic is connected @rtype: bool
Instance Variable c_lock Undocumented
Instance Variable closed Undocumented
Instance Variable connection_poll Undocumented
Instance Variable connections Undocumented
Instance Variable data_class Undocumented
Instance Variable handler Undocumented
Instance Variable name Undocumented
Instance Variable ref_count Undocumented
Instance Variable resolved_name Undocumented
Instance Variable seq Undocumented
Instance Variable type Undocumented
Method _remove_connection Undocumented
def __init__(self, name, data_class):

@param name: name of topic, e.g. 'laser'. @type name: str @param data_class: Message data class @type data_class: L{Message} class

def acquire(self):

lock for thread-safe publishing to this transport

def add_connection(self, c):

Add a connection to this topic. This must be a PubTransport. If the latch is enabled, c will be sent a the value of the latch. @param c: connection instance @type c: L{Transport} @return: True if connection was added @rtype: bool

def add_headers(self, headers):

Add connection headers to this Topic for future connections. @param headers: key/values will be added to current connection header set, overriding any existing keys if they conflict. @type headers: dict

def add_subscriber_listener(self, l):

Add a L{SubscribeListener} for subscribe events. @param l: listener instance @type l: L{SubscribeListener}

def close(self):

close I/O and release resources

def enable_latch(self):

Enable publish() latch. The latch contains the last published message and is sent to any new subscribers.

def get_stats(self):

Get the stats for this topic publisher @return: stats for topic in getBusStats() publisher format:

[topicName, messageDataBytes, connStats],
where connStats is::
[id, bytes, numMessages, connected]*

@rtype: list

def publish(self, message, connection_override=None):

Publish the data to the topic. If the topic has no subscribers, the method will return without any affect. Access to publish() should be locked using acquire() and release() in order to ensure proper message publish ordering.

@param message: message data instance to publish @type message: L{Message} @param connection_override: publish to this connection instead of all @type connection_override: L{Transport} @return: True if the data was published, False otherwise. @rtype: bool @raise genpy.SerializationError: if L{Message} instance is unable to serialize itself @raise rospy.ROSException: if topic has been closed or was closed during publish()

def release(self):

lock for thread-safe publishing to this transport

def remove_connection(self, c):

Remove existing connection from this topic. @param c: connection instance to remove @type c: L{Transport}

def set_queue_size(self, queue_size):

Undocumented

buff =

Undocumented

headers =

Undocumented

is_latch: bool =

Undocumented

latch =

Undocumented

message_data_sent: int =

Undocumented

publock =

Undocumented

queue_size =

Undocumented

subscriber_listeners =

Undocumented