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

Public Member Functions

def __init__ (self, topics={}, persistent=False, wait_duration=10)
 
def call (self, topic, request)
 
def is_available (self, topic)
 
def setupService (self, topic, msg_type, persistent=False, wait_duration=10)
 

Private Member Functions

def _check_service_available (self, topic, wait_duration=1)
 
def _print_wait_warning (self, topic)
 

Static Private Attributes

dictionary _services = {}
 

Detailed Description

A proxy for calling services.

Definition at line 8 of file proxy_service_caller.py.

Constructor & Destructor Documentation

def flexbe_core.proxy.proxy_service_caller.ProxyServiceCaller.__init__ (   self,
  topics = {},
  persistent = False,
  wait_duration = 10 
)
Initializes the proxy with optionally a given set of clients.

@type topics: dictionary string - message class
@param topics: A dictionay containing a collection of topic - message type pairs.

@type persistent: bool
@param persistent: Defines if the service callers are persistent.

@type wait_duration: int
@param wait_duration: Defines how long to wait for the given services if not available right now.

Definition at line 14 of file proxy_service_caller.py.

Member Function Documentation

def flexbe_core.proxy.proxy_service_caller.ProxyServiceCaller._check_service_available (   self,
  topic,
  wait_duration = 1 
)
private
Checks whether a service is available.

@type topic: string
@param topic: The topic of the service.

@type wait_duration: int
@param wait_duration: Defines how long to wait for the given service if it is not available right now.

Definition at line 74 of file proxy_service_caller.py.

def flexbe_core.proxy.proxy_service_caller.ProxyServiceCaller._print_wait_warning (   self,
  topic 
)
private

Definition at line 112 of file proxy_service_caller.py.

def flexbe_core.proxy.proxy_service_caller.ProxyServiceCaller.call (   self,
  topic,
  request 
)
Performs a service call on the given topic.

@type topic: string
@param topic: The topic to call.

@type request: service
@param request: The request to send to this service.

Definition at line 59 of file proxy_service_caller.py.

def flexbe_core.proxy.proxy_service_caller.ProxyServiceCaller.is_available (   self,
  topic 
)
Checks if the service on the given topic is available.

@type topic: string
@param topic: The topic of interest.

Definition at line 50 of file proxy_service_caller.py.

def flexbe_core.proxy.proxy_service_caller.ProxyServiceCaller.setupService (   self,
  topic,
  msg_type,
  persistent = False,
  wait_duration = 10 
)
Tries to set up a service caller for calling it later.

@type topic: string
@param topic: The topic of the service to call.

@type msg_type: service class
@param msg_type: The type of messages of this service.

@type persistent: bool
@param persistent: Defines if this service caller is persistent.

@type wait_duration: int
@param wait_duration: Defines how long to wait for the given service if it is not available right now.

Definition at line 30 of file proxy_service_caller.py.

Member Data Documentation

dictionary flexbe_core.proxy.proxy_service_caller.ProxyServiceCaller._services = {}
staticprivate

Definition at line 12 of file proxy_service_caller.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