Public Member Functions | Private Attributes
rosbridge_library.internal.publishers.PublisherManager Class Reference

List of all members.

Public Member Functions

def __init__
def publish
def register
def unregister
def unregister_all

Private Attributes

 _publishers

Detailed Description

The PublisherManager keeps track of ROS publishers

It maintains a MultiPublisher instance for each registered topic

When unregistering a client, if there are no more clients for a publisher,
then that publisher is unregistered from the ROS Master

Definition at line 241 of file publishers.py.


Constructor & Destructor Documentation

Definition at line 250 of file publishers.py.


Member Function Documentation

def rosbridge_library.internal.publishers.PublisherManager.publish (   self,
  client_id,
  topic,
  msg 
)
Publish a message on the given topic.

Tries to create a publisher on the topic if one does not already exist.

Keyword arguments:
client_id -- the ID of the client making this request
topic     -- the topic to publish the message on
msg       -- a JSON-like dict of fields and values

Throws:
Exception -- a variety of exceptions are propagated.  They can be
thrown if there is a problem setting up or getting the publisher,
or if the provided msg does not map to the msg class of the publisher.

Definition at line 307 of file publishers.py.

def rosbridge_library.internal.publishers.PublisherManager.register (   self,
  client_id,
  topic,
  msg_type = None 
)
Register a publisher on the specified topic.

Publishers are shared between clients, so a single MultiPublisher
instance is created per topic, even if multiple clients register.

Keyword arguments:
client_id -- the ID of the client making this request
topic     -- the name of the topic to publish on
msg_type  -- (optional) the type to publish

Throws:
Exception -- exceptions are propagated from the MultiPublisher if
there is a problem loading the specified msg class or establishing
the publisher

Definition at line 253 of file publishers.py.

def rosbridge_library.internal.publishers.PublisherManager.unregister (   self,
  client_id,
  topic 
)
Unregister a client from the publisher for the given topic.

If there are no clients remaining for that publisher, then the
publisher is unregistered from the ROS Master

Keyword arguments:
client_id -- the ID of the client making this request
topic     -- the topic to unregister the publisher for

Definition at line 278 of file publishers.py.

Unregisters a client from all publishers that they are registered
to.

Keyword arguments:
client_id -- the ID of the client making this request 

Definition at line 298 of file publishers.py.


Member Data Documentation

Definition at line 250 of file publishers.py.


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


rosbridge_library
Author(s): Jonathan Mace
autogenerated on Thu Jan 2 2014 11:53:35