Public Member Functions | Public Attributes | Private Member Functions
rosbridge_library.capabilities.subscribe.Subscription Class Reference

List of all members.

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

Detailed Description

Keeps track of the clients multiple calls to subscribe.

Chooses the most appropriate settings to send messages 

Definition at line 51 of file subscribe.py.


Constructor & Destructor Documentation

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 56 of file subscribe.py.


Member Function Documentation

def rosbridge_library.capabilities.subscribe.Subscription._publish (   self,
  message 
) [private]
Internal method to propagate published messages to the registered
publish callback 

Definition at line 138 of file subscribe.py.

Return true if there are no subscriptions currently 

Definition at line 134 of file subscribe.py.

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 143 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 83 of file subscribe.py.

Unsubscribes this subscription and cleans up resources 

Definition at line 76 of file subscribe.py.

Unsubscribe this particular client's subscription

Keyword arguments:
sid -- the individual subscription id.  If None, all are unsubscribed

Definition at line 119 of file subscribe.py.

Determine the 'lowest common denominator' params to satisfy all
subscribed clients. 

Definition at line 154 of file subscribe.py.


Member Data Documentation

Definition at line 64 of file subscribe.py.

Definition at line 64 of file subscribe.py.

Definition at line 155 of file subscribe.py.

Definition at line 155 of file subscribe.py.

Definition at line 64 of file subscribe.py.

Definition at line 64 of file subscribe.py.

Definition at line 64 of file subscribe.py.

Definition at line 155 of file subscribe.py.

Definition at line 155 of file subscribe.py.

Definition at line 64 of file subscribe.py.


The documentation for this class was generated from the following file:


rosbridge_library
Author(s): Jonathan Mace
autogenerated on Wed Sep 13 2017 03:18:07