Gateway Configuration and Main Loop Class. More...
Public Member Functions | |
def | __init__ (self) |
Init & Shutdown. More... | |
def | ros_service_connect_hub (self, request) |
Ros Service Callbacks. More... | |
def | ros_service_remote_gateway_info (self, request) |
def | spin (self) |
Private Member Functions | |
def | _disengage_hub (self, hub) |
def | _hub_ensure_connection (self, ip, port) |
Hub Discovery & Connection. More... | |
def | _publish_gateway_info (self) |
def | _register_gateway (self, hub) |
def | _setup_ros_publishers (self) |
def | _setup_ros_services (self) |
Ros Pubs, Subs and Services. More... | |
def | _setup_ros_subscribers (self) |
def | _shutdown (self) |
Private Attributes | |
_disallowed_hubs | |
_disallowed_hubs_error_codes | |
_gateway | |
_gateway_publishers | |
_gateway_services | |
_gateway_subscribers | |
_hub_discovery_thread | |
_hub_manager | |
_param | |
_unique_name | |
Gateway Configuration and Main Loop Class.
Currently this just provides getup and go for the gateway.
Definition at line 28 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode.__init__ | ( | self | ) |
Init & Shutdown.
Definition at line 37 of file gateway_node.py.
|
private |
Called whenever gateway_hub detects the connection to the hub has been lost. This function informs the hub discovery thread that the hub was lost, which allows the hub_discovery thread to start looking for the hub. @param hub: hub to be disengaged @type GatewayHub
Definition at line 177 of file gateway_node.py.
|
private |
Hub Discovery & Connection.
Called when the hub discovery can ping a hub :param ip: :param port: :return:
Definition at line 102 of file gateway_node.py.
|
private |
Definition at line 255 of file gateway_node.py.
|
private |
Called when either the hub discovery module finds a hub or a request to connect via ros service is made. It starts the actual redis connection with the hub and also registers the appropriate information about the gateway on the hub. Note, the return type is only really used by the service callback (ros_service_connect_hub). @return error code and message @rtype gateway_msgs.ErrorCodes, string @sa hub_discovery.HubDiscovery
Definition at line 143 of file gateway_node.py.
|
private |
Definition at line 225 of file gateway_node.py.
|
private |
Ros Pubs, Subs and Services.
Definition at line 201 of file gateway_node.py.
|
private |
Definition at line 230 of file gateway_node.py.
|
private |
Clears this gateway's information from the redis server.
Definition at line 80 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode.ros_service_connect_hub | ( | self, | |
request | |||
) |
Ros Service Callbacks.
Handle incoming requests to connect directly to a gateway hub. Requests are of the form of a uri (hostname:port pair) pointing to the gateway hub.
Definition at line 240 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode.ros_service_remote_gateway_info | ( | self, | |
request | |||
) |
Sends out to the hubs to get the remote gateway information for either the specified, or the known list of remote gateways. :todo: can we optimise this so that hub requests go as a group?
Definition at line 280 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode.spin | ( | self | ) |
Definition at line 75 of file gateway_node.py.
|
private |
Definition at line 48 of file gateway_node.py.
|
private |
Definition at line 49 of file gateway_node.py.
|
private |
Definition at line 63 of file gateway_node.py.
|
private |
Definition at line 61 of file gateway_node.py.
|
private |
Definition at line 64 of file gateway_node.py.
|
private |
Definition at line 65 of file gateway_node.py.
|
private |
Definition at line 69 of file gateway_node.py.
|
private |
Definition at line 56 of file gateway_node.py.
|
private |
Definition at line 38 of file gateway_node.py.
|
private |
Definition at line 40 of file gateway_node.py.