Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | List of all members
rocon_gateway.master_api.LocalMaster Class Reference
Inheritance diagram for rocon_gateway.master_api.LocalMaster:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, connection_cache_timeout=None)
 
def generate_advertisement_connection_details (self, connection_type, name, node)
 
def generate_connection_details (self, connection_type, name, node)
 Master utility methods. More...
 
def get_connection_state (self)
 
def get_ros_ip (self)
 
def register (self, registration)
 Registration. More...
 
def unregister (self, registration)
 

Public Attributes

 connection_cache
 
 connections
 
 connections_lock
 
 get_system_state
 

Private Member Functions

def _connection_cache_proxy_cb (self, system_state, added_system_state, lost_system_state)
 
def _register_subscriber (self, node_master, name, type_info, xmlrpc_uri)
 

Static Private Member Functions

def _get_anonymous_node_name (topic)
 
def _is_topic_node_in_list (topic, node, topic_node_list)
 

Detailed Description

  Representing a ros master (local ros master). Just contains a
  few utility methods for retrieving master related information as well
  as handles for registering and unregistering rules that have
  been pulled or flipped in from another gateway.

Definition at line 39 of file master_api.py.

Constructor & Destructor Documentation

def rocon_gateway.master_api.LocalMaster.__init__ (   self,
  connection_cache_timeout = None 
)

Definition at line 48 of file master_api.py.

Member Function Documentation

def rocon_gateway.master_api.LocalMaster._connection_cache_proxy_cb (   self,
  system_state,
  added_system_state,
  lost_system_state 
)
private

Definition at line 565 of file master_api.py.

def rocon_gateway.master_api.LocalMaster._get_anonymous_node_name (   topic)
staticprivate

Definition at line 560 of file master_api.py.

def rocon_gateway.master_api.LocalMaster._is_topic_node_in_list (   topic,
  node,
  topic_node_list 
)
staticprivate

Definition at line 550 of file master_api.py.

def rocon_gateway.master_api.LocalMaster._register_subscriber (   self,
  node_master,
  name,
  type_info,
  xmlrpc_uri 
)
private
  This one is not necessary, since you can pretty much guarantee the
  existence of the subscriber here, but it pays to be safe - we've seen
  some errors come out here when the ROS_MASTER_URI was only set to
  localhost.

  @param node_master : node-master xmlrpc method handler
  @param type_info : type of the subscriber message
  @param xmlrpc_uri : the uri of the node (xmlrpc server)
  @type string
  @param name : fully resolved subscriber name

Definition at line 362 of file master_api.py.

def rocon_gateway.master_api.LocalMaster.generate_advertisement_connection_details (   self,
  connection_type,
  name,
  node 
)
Creates all the extra details to create a connection object from an
advertisement rule. This is a bit different to the previous one - we just need
the type and single node uri that everything originates from (don't need to generate all
the pub/sub connections themselves.

Probably flips could be merged into this sometime, but it'd be a bit gnarly.

@param connection_type : the connection type (one of gateway_msgs.msg.ConnectionType)
@type string
@param name : the name of the connection
@type string
@param node : the master node name it comes from
@param string

@return the utils.Connection object complete with type_info and xmlrpc_uri
@type utils.Connection

Definition at line 485 of file master_api.py.

def rocon_gateway.master_api.LocalMaster.generate_connection_details (   self,
  connection_type,
  name,
  node 
)

Master utility methods.

Creates all the extra details to create a connection object from a
rule.

@param connection_type : the connection type (one of gateway_msgs.msg.ConnectionType)
@type string
@param name : the name of the connection
@type string
@param node : the master node name it comes from
@param string

@return the utils.Connection object complete with type_info and xmlrpc_uri
@type utils.Connection

Definition at line 405 of file master_api.py.

def rocon_gateway.master_api.LocalMaster.get_connection_state (   self)

Definition at line 648 of file master_api.py.

def rocon_gateway.master_api.LocalMaster.get_ros_ip (   self)

Definition at line 531 of file master_api.py.

def rocon_gateway.master_api.LocalMaster.register (   self,
  registration 
)

Registration.

  Registers a rule with the local master.

  @param registration : registration details
  @type utils.Registration

  @return the updated registration object (only adds an anonymously generated local node name)
  @rtype utils.Registration

Definition at line 76 of file master_api.py.

def rocon_gateway.master_api.LocalMaster.unregister (   self,
  registration 
)
  Unregisters a rule with the local master.

  @param registration : registration details for an existing gateway registered rule
  @type utils.Registration

Definition at line 274 of file master_api.py.

Member Data Documentation

rocon_gateway.master_api.LocalMaster.connection_cache

Definition at line 61 of file master_api.py.

rocon_gateway.master_api.LocalMaster.connections

Definition at line 54 of file master_api.py.

rocon_gateway.master_api.LocalMaster.connections_lock

Definition at line 53 of file master_api.py.

rocon_gateway.master_api.LocalMaster.get_system_state

Definition at line 69 of file master_api.py.


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


rocon_gateway
Author(s): Daniel Stonier , Jihoon Lee , Piyush Khandelwal
autogenerated on Mon Jun 10 2019 14:40:10