Public Member Functions | |
def | __init__ |
def | generate_advertisement_connection_details |
def | generate_connection_details |
Master utility methods. | |
def | get_connection_state |
def | get_ros_ip |
def | register |
Registration. | |
def | unregister |
Public Attributes | |
get_system_state | |
Private Member Functions | |
def | _get_anonymous_node_name |
def | _register_subscriber |
def | _unregister_subscriber |
Private Attributes | |
_connection_cache |
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 307 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.__init__ | ( | self | ) |
Definition at line 316 of file master_api.py.
def rocon_gateway.master_api.LocalMaster._get_anonymous_node_name | ( | self, | |
topic | |||
) | [private] |
Definition at line 719 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 504 of file master_api.py.
def rocon_gateway.master_api.LocalMaster._unregister_subscriber | ( | self, | |
node_master, | |||
xmlrpc_uri, | |||
name | |||
) | [private] |
It is a special case as it requires xmlrpc handling to inform the subscriber of the disappearance of publishers it was connected to. It also needs to handle the case when that information doesn't get to the subscriber because it is down. @param node_master : node-master xmlrpc method handler @param xmlrpc_uri : the uri of the node (xmlrpc server) @type string @param name : fully resolved subscriber name
Definition at line 534 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 650 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 571 of file master_api.py.
Definition at line 713 of file master_api.py.
def rocon_gateway.master_api.LocalMaster.get_ros_ip | ( | self | ) |
Definition at line 695 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 326 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 465 of file master_api.py.
Definition at line 316 of file master_api.py.
Definition at line 316 of file master_api.py.