Gateway Configuration and Main Loop Class. More...
Public Member Functions | |
def | __init__ |
Init & Shutdown. | |
def | ros_service_connect_hub |
def | ros_service_remote_gateway_info |
def | ros_service_shutdown |
Ros Service Callbacks. | |
def | spin |
Private Member Functions | |
def | _disengage_hub |
def | _publish_gateway_info |
def | _register_gateway |
Hub Discovery & Connection. | |
def | _setup_ros_publishers |
def | _setup_ros_services |
Ros Pubs, Subs and Services. | |
def | _setup_ros_subscribers |
def | _shutdown |
def | _wait_for_shutdown |
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.
def rocon_gateway.gateway_node.GatewayNode._disengage_hub | ( | self, | |
hub | |||
) | [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 175 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode._publish_gateway_info | ( | self | ) | [private] |
Definition at line 257 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode._register_gateway | ( | self, | |
ip, | |||
port | |||
) | [private] |
Hub Discovery & Connection.
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 121 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode._setup_ros_publishers | ( | self | ) | [private] |
Definition at line 223 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode._setup_ros_services | ( | self | ) | [private] |
Ros Pubs, Subs and Services.
Definition at line 199 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode._setup_ros_subscribers | ( | self | ) | [private] |
Definition at line 228 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode._shutdown | ( | self | ) | [private] |
Clears this gateway's information from the redis server.
Definition at line 103 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode._wait_for_shutdown | ( | self | ) | [private] |
Shutdown hook - we wait here for an external shutdown via ros service timing out after a reasonable time if we need to.
Definition at line 86 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode.ros_service_connect_hub | ( | self, | |
request | |||
) |
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 242 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 282 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode.ros_service_shutdown | ( | self, | |
unused_request | |||
) |
Ros Service Callbacks.
Definition at line 238 of file gateway_node.py.
def rocon_gateway.gateway_node.GatewayNode.spin | ( | self | ) |
Definition at line 80 of file gateway_node.py.
Definition at line 37 of file gateway_node.py.
Definition at line 37 of file gateway_node.py.
Definition at line 37 of file gateway_node.py.
Definition at line 37 of file gateway_node.py.
Definition at line 37 of file gateway_node.py.
Definition at line 37 of file gateway_node.py.
Definition at line 37 of file gateway_node.py.
Definition at line 37 of file gateway_node.py.
Definition at line 37 of file gateway_node.py.
Definition at line 37 of file gateway_node.py.