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 |
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 |
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 |
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 |
Enable publish() latch. The latch contains the last published message and is sent to any new subscribers. |
Method | get |
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 |
Remove existing connection from this topic. @param c: connection instance to remove @type c: L{Transport} |
Method | set |
Undocumented |
Instance Variable | buff |
Undocumented |
Instance Variable | headers |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | latch |
Undocumented |
Instance Variable | message |
Undocumented |
Instance Variable | publock |
Undocumented |
Instance Variable | queue |
Undocumented |
Instance Variable | subscriber |
Undocumented |
Inherited from _TopicImpl
:
Method | __del__ |
Undocumented |
Method | check |
Undocumented |
Method | get |
Undocumented |
Method | get |
Get the stats for this topic @return: stats for topic in getBusInfo() format: |
Method | has |
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 |
Check to see if this topic is connected to other publishers/subscribers @return: True if topic is connected @rtype: bool |
Instance Variable | c |
Undocumented |
Instance Variable | closed |
Undocumented |
Instance Variable | connection |
Undocumented |
Instance Variable | connections |
Undocumented |
Instance Variable | data |
Undocumented |
Instance Variable | handler |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | ref |
Undocumented |
Instance Variable | resolved |
Undocumented |
Instance Variable | seq |
Undocumented |
Instance Variable | type |
Undocumented |
Method | _remove |
Undocumented |
@param name: name of topic, e.g. 'laser'. @type name: str @param data_class: Message data class @type data_class: L{Message} class
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
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
Add a L{SubscribeListener} for subscribe events. @param l: listener instance @type l: L{SubscribeListener}
Enable publish() latch. The latch contains the last published message and is sent to any new subscribers.
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
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()