|
def | __init__ (self, topics={}, _latch=False) |
|
def | createPublisher (self, topic, msg_type, _latch=False) |
|
def | is_available (self, topic) |
|
def | publish (self, topic, msg) |
|
def | wait_for_any (self, topic, timeout=5.0) |
|
A proxy for publishing topics.
Definition at line 11 of file proxy_publisher.py.
def flexbe_core.proxy.proxy_publisher.ProxyPublisher.__init__ |
( |
|
self, |
|
|
|
topics = {} , |
|
|
|
_latch = False |
|
) |
| |
Initializes the proxy with optionally a given set of topics.
Automatically creates a publisher for sending status messages.
@type topics: dictionary string - message class
@param topics: A dictionay containing a collection of topic - message type pairs.
@type _latch: bool
@param: _latch: Defines if messages on the given topics should be latched.
Definition at line 19 of file proxy_publisher.py.
def flexbe_core.proxy.proxy_publisher.ProxyPublisher.createPublisher |
( |
|
self, |
|
|
|
topic, |
|
|
|
msg_type, |
|
|
|
_latch = False |
|
) |
| |
Adds a new publisher to the proxy.
@type topic: string
@param topic: The topic to publish on.
@type msg_type: a message class
@param msg_type: The type of messages of this topic.
@type _latch: bool
@param: _latch: Defines if messages on the given topics should be latched.
Definition at line 34 of file proxy_publisher.py.
def flexbe_core.proxy.proxy_publisher.ProxyPublisher.is_available |
( |
|
self, |
|
|
|
topic |
|
) |
| |
Checks if the publisher on the given topic is available.
@type topic: string
@param topic: The topic of interest.
Definition at line 52 of file proxy_publisher.py.
def flexbe_core.proxy.proxy_publisher.ProxyPublisher.publish |
( |
|
self, |
|
|
|
topic, |
|
|
|
msg |
|
) |
| |
Publishes a message on the specified topic.
@type topic: string
@param topic: The topic to publish on.
@type msg: message class (defined when created publisher)
@param msg: The message to publish.
Definition at line 62 of file proxy_publisher.py.
def flexbe_core.proxy.proxy_publisher.ProxyPublisher.wait_for_any |
( |
|
self, |
|
|
|
topic, |
|
|
|
timeout = 5.0 |
|
) |
| |
Blocks until there are any subscribers to the given topic.
@type topic: string
@param topic: The topic to publish on.
@type timeout: float
@param timeout: How many seconds should be the maximum blocked time.
Definition at line 84 of file proxy_publisher.py.
bool flexbe_core.proxy.proxy_publisher.ProxyPublisher._simulate_delay = False |
|
staticprivate |
dictionary flexbe_core.proxy.proxy_publisher.ProxyPublisher._topics = {} |
|
staticprivate |
The documentation for this class was generated from the following file: