Public Member Functions | Static Private Attributes | List of all members
flexbe_core.proxy.proxy_publisher.ProxyPublisher Class Reference
Inheritance diagram for flexbe_core.proxy.proxy_publisher.ProxyPublisher:
Inheritance graph
[legend]

Public Member Functions

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)
 

Static Private Attributes

bool _simulate_delay = False
 
dictionary _topics = {}
 

Detailed Description

A proxy for publishing topics.

Definition at line 11 of file proxy_publisher.py.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

Member Data Documentation

bool flexbe_core.proxy.proxy_publisher.ProxyPublisher._simulate_delay = False
staticprivate

Definition at line 15 of file proxy_publisher.py.

dictionary flexbe_core.proxy.proxy_publisher.ProxyPublisher._topics = {}
staticprivate

Definition at line 17 of file proxy_publisher.py.


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


flexbe_core
Author(s): Philipp Schillinger
autogenerated on Wed Jun 5 2019 21:51:59