Public Member Functions | |
def | __init__ |
def | is_empty |
def | on_msg |
def | subscribe |
def | unregister |
def | unsubscribe |
def | update_params |
Public Attributes | |
client_id | |
clients | |
compression | |
fragment_size | |
handler | |
handler_lock | |
publish | |
queue_length | |
throttle_rate | |
topic | |
Private Member Functions | |
def | _publish |
Keeps track of the clients multiple calls to subscribe. Chooses the most appropriate settings to send messages
Definition at line 53 of file subscribe.py.
def rosbridge_library.capabilities.subscribe.Subscription.__init__ | ( | self, | |
client_id, | |||
topic, | |||
publish | |||
) |
Create a subscription for the specified client on the specified topic, with callback publish Keyword arguments: client_id -- the ID of the client making this subscription topic -- the name of the topic to subscribe to publish -- the callback function for incoming messages
Definition at line 58 of file subscribe.py.
def rosbridge_library.capabilities.subscribe.Subscription._publish | ( | self, | |
message | |||
) | [private] |
Internal method to propagate published messages to the registered publish callback
Definition at line 140 of file subscribe.py.
Return true if there are no subscriptions currently
Definition at line 136 of file subscribe.py.
def rosbridge_library.capabilities.subscribe.Subscription.on_msg | ( | self, | |
msg | |||
) |
Raw callback called by subscription manager for all incoming messages. Incoming messages are passed to the message handler which may drop, buffer, or propagate the message
Definition at line 145 of file subscribe.py.
def rosbridge_library.capabilities.subscribe.Subscription.subscribe | ( | self, | |
sid = None , |
|||
msg_type = None , |
|||
throttle_rate = 0 , |
|||
queue_length = 0 , |
|||
fragment_size = None , |
|||
compression = "none" |
|||
) |
Add another client's subscription request If there are multiple calls to subscribe, the values actually used for queue_length, fragment_size, compression and throttle_rate are chosen to encompass all subscriptions' requirements Keyword arguments: sid -- the subscription id from the client msg_type -- the type of the message to subscribe to throttle_rate -- the minimum time (in ms) allowed between messages being sent. If multiple subscriptions, the lower of these is used queue_length -- the number of messages that can be buffered. If multiple subscriptions, the lower of these is used fragment_size -- None if no fragmentation, or the maximum length of allowed outgoing messages compression -- "none" if no compression, or some other value if compression is to be used (current valid values are 'png')
Definition at line 85 of file subscribe.py.
Unsubscribes this subscription and cleans up resources
Definition at line 78 of file subscribe.py.
def rosbridge_library.capabilities.subscribe.Subscription.unsubscribe | ( | self, | |
sid = None |
|||
) |
Unsubscribe this particular client's subscription Keyword arguments: sid -- the individual subscription id. If None, all are unsubscribed
Definition at line 121 of file subscribe.py.
Determine the 'lowest common denominator' params to satisfy all subscribed clients.
Definition at line 156 of file subscribe.py.
Definition at line 66 of file subscribe.py.
Definition at line 66 of file subscribe.py.
Definition at line 157 of file subscribe.py.
Definition at line 157 of file subscribe.py.
Definition at line 66 of file subscribe.py.
Definition at line 66 of file subscribe.py.
Definition at line 66 of file subscribe.py.
Definition at line 157 of file subscribe.py.
Definition at line 157 of file subscribe.py.
Definition at line 66 of file subscribe.py.