Public Member Functions | Private Member Functions | Private Attributes | List of all members
rocon_gateway.gateway_node.GatewayNode Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

def rocon_gateway.gateway_node.GatewayNode.__init__ (   self)

Init & Shutdown.

Definition at line 37 of file gateway_node.py.

Member Function Documentation

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 177 of file gateway_node.py.

def rocon_gateway.gateway_node.GatewayNode._hub_ensure_connection (   self,
  ip,
  port 
)
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.

def rocon_gateway.gateway_node.GatewayNode._publish_gateway_info (   self)
private

Definition at line 255 of file gateway_node.py.

def rocon_gateway.gateway_node.GatewayNode._register_gateway (   self,
  hub 
)
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.

def rocon_gateway.gateway_node.GatewayNode._setup_ros_publishers (   self)
private

Definition at line 225 of file gateway_node.py.

def rocon_gateway.gateway_node.GatewayNode._setup_ros_services (   self)
private

Ros Pubs, Subs and Services.

Definition at line 201 of file gateway_node.py.

def rocon_gateway.gateway_node.GatewayNode._setup_ros_subscribers (   self)
private

Definition at line 230 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 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.

Member Data Documentation

rocon_gateway.gateway_node.GatewayNode._disallowed_hubs
private

Definition at line 48 of file gateway_node.py.

rocon_gateway.gateway_node.GatewayNode._disallowed_hubs_error_codes
private

Definition at line 49 of file gateway_node.py.

rocon_gateway.gateway_node.GatewayNode._gateway
private

Definition at line 63 of file gateway_node.py.

rocon_gateway.gateway_node.GatewayNode._gateway_publishers
private

Definition at line 61 of file gateway_node.py.

rocon_gateway.gateway_node.GatewayNode._gateway_services
private

Definition at line 64 of file gateway_node.py.

rocon_gateway.gateway_node.GatewayNode._gateway_subscribers
private

Definition at line 65 of file gateway_node.py.

rocon_gateway.gateway_node.GatewayNode._hub_discovery_thread
private

Definition at line 69 of file gateway_node.py.

rocon_gateway.gateway_node.GatewayNode._hub_manager
private

Definition at line 56 of file gateway_node.py.

rocon_gateway.gateway_node.GatewayNode._param
private

Definition at line 38 of file gateway_node.py.

rocon_gateway.gateway_node.GatewayNode._unique_name
private

Definition at line 40 of file gateway_node.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