Underlying L{_TopicImpl} implementation for subscriptions.
Method | __init__ |
ctor. @param name: graph resource name of topic, e.g. 'laser'. @type name: str @param data_class: Message data class @type data_class: L{Message} class |
Method | add |
Register a callback to be invoked whenever a new message is received @param cb: callback function to invoke with message data |
Method | close |
close I/O and release resources |
Method | get |
Get the stats for this topic subscriber @return: stats for topic in getBusStats() publisher format: |
Method | receive |
Called by underlying connection transport for each new message received @param msgs: message data @type msgs: [L{Message}] |
Method | remove |
Unregister a message callback. @param cb: callback function @type cb: fn(msg, cb_args) @param cb_cargs: additional arguments associated with callback @type cb_cargs: Any @raise KeyError: if no matching callback... |
Method | set |
Set the receive buffer size. The exact meaning of this is transport dependent. @param buff_size: receive buffer size @type buff_size: int |
Method | set |
Set the receive queue size. If more than queue_size messages are waiting to be deserialized, they are discarded. |
Method | set |
Set the value of TCP_NODELAY, which causes the Nagle algorithm to be disabled for future topic connections, if the publisher supports it. |
Instance Variable | buff |
Undocumented |
Instance Variable | callbacks |
Undocumented |
Instance Variable | queue |
Undocumented |
Instance Variable | statistics |
Undocumented |
Instance Variable | tcp |
Undocumented |
Method | _invoke |
Invoke callback on msg. Traps and logs any exceptions raise by callback @param msg: message data @type msg: L{Message} @param cb: callback @type cb: fn(msg, cb_args) @param cb_args: callback args or None @type cb_args: Any... |
Inherited from _TopicImpl
:
Method | __del__ |
Undocumented |
Method | add |
Add a connection to this topic. If any previous connections to same endpoint exist, drop them. |
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 |
Method | remove |
Remove connection from topic. @param c: connection instance to remove @type c: Transport |
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 |
ctor. @param name: graph resource name of topic, e.g. 'laser'. @type name: str @param data_class: Message data class @type data_class: L{Message} class
Register a callback to be invoked whenever a new message is received @param cb: callback function to invoke with message data
instance, i.e. fn(data). If callback args is set, they will be passed in as the second argument.
@type cb: fn(msg, cb_args) @param cb_cargs: additional arguments to pass to callback @type cb_cargs: Any
Get the stats for this topic subscriber @return: stats for topic in getBusStats() publisher format:
(topicName, connStats)
- where connStats is::
- [connectionId, bytesReceived, numSent, dropEstimate, connected]*
@rtype: list
Called by underlying connection transport for each new message received @param msgs: message data @type msgs: [L{Message}]
Unregister a message callback. @param cb: callback function @type cb: fn(msg, cb_args) @param cb_cargs: additional arguments associated with callback @type cb_cargs: Any @raise KeyError: if no matching callback
Set the receive buffer size. The exact meaning of this is transport dependent. @param buff_size: receive buffer size @type buff_size: int
Set the receive queue size. If more than queue_size messages are waiting to be deserialized, they are discarded.
@param queue_size int: incoming queue size. Must be positive integer or None. @type queue_size: int
Set the value of TCP_NODELAY, which causes the Nagle algorithm to be disabled for future topic connections, if the publisher supports it.