Public Member Functions | Private 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, _queue_size=100)
 
def createPublisher (self, topic, msg_type, _latch=False, _queue_size=100)
 
def is_available (self, topic)
 
def publish (self, topic, msg)
 
def wait_for_any (self, topic, timeout=5.0)
 

Private Member Functions

def _print_wait_warning (self, topic)
 
def _wait_for_subscribers (self, pub, timeout=5.0)
 

Static Private Attributes

dictionary _topics = {}
 

Detailed Description

A proxy for publishing topics.

Definition at line 8 of file proxy_publisher.py.

Constructor & Destructor Documentation

def flexbe_core.proxy.proxy_publisher.ProxyPublisher.__init__ (   self,
  topics = {},
  _latch = False,
  _queue_size = 100 
)
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.

@type _queue_size: int
@param: _queue_size: Defines the queue size of the new publishers.

Definition at line 14 of file proxy_publisher.py.

Member Function Documentation

def flexbe_core.proxy.proxy_publisher.ProxyPublisher._print_wait_warning (   self,
  topic 
)
private

Definition at line 109 of file proxy_publisher.py.

def flexbe_core.proxy.proxy_publisher.ProxyPublisher._wait_for_subscribers (   self,
  pub,
  timeout = 5.0 
)
private

Definition at line 112 of file proxy_publisher.py.

def flexbe_core.proxy.proxy_publisher.ProxyPublisher.createPublisher (   self,
  topic,
  msg_type,
  _latch = False,
  _queue_size = 100 
)
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.

@type _queue_size: int
@param: _queue_size: Defines the queue size of the publisher.

Definition at line 31 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 50 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 59 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 77 of file proxy_publisher.py.

Member Data Documentation

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

Definition at line 12 of file proxy_publisher.py.


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


flexbe_core
Author(s): Philipp Schillinger
autogenerated on Sun Dec 13 2020 04:01:39