Public Member Functions | Public Attributes | Private Attributes
rocon_gateway.hub_manager.HubManager Class Reference

Hub Manager. More...

List of all members.

Public Member Functions

def __init__
 Init & Shutdown.
def advertise
def connect_to_hub
 Hub Connections.
def create_remote_gateway_hub_index
def disengage_hub
def get_flip_requests
def get_remote_gateway_firewall_flag
def is_connected
def list_remote_gateway_names
 Introspection.
def match_remote_gateway_name
def publish_network_statistics
def remote_gateway_info
def send_unflip_request
def shutdown
def unadvertise

Public Attributes

 hubs

Private Attributes

 _hub_lock
 _param

Detailed Description

Hub Manager.

Definition at line 25 of file hub_manager.py.


Constructor & Destructor Documentation

def rocon_gateway.hub_manager.HubManager.__init__ (   self,
  hub_whitelist,
  hub_blacklist 
)

Init & Shutdown.

Definition at line 31 of file hub_manager.py.


Member Function Documentation

def rocon_gateway.hub_manager.HubManager.advertise (   self,
  connection 
)

Definition at line 248 of file hub_manager.py.

def rocon_gateway.hub_manager.HubManager.connect_to_hub (   self,
  ip,
  port,
  firewall_flag,
  gateway_unique_name,
  gateway_disengage_hub,
  gateway_ip,
  existing_advertisements 
)

Hub Connections.

  Attempts to make a connection and register the gateway with a hub.
  This is called from the gateway node's _register_gateway method.

  @param ip
  @param port
  @param firewall_flag
  @param gateway_unique_name
  @param remote_gateway_request_callbacks
  @type method : Gateway.remote_gateway_request_callbacks()
  @param gateway_disengage_hub : this is the hub connection lost hook
  @type method : Gateway.disengage_hub()
  @param gateway_ip
  @param existing advertisements
  @type { utils.ConnectionTypes : utils.Connection[] }

  @return an integer indicating error (important for the service call)
  @rtype gateway_msgs.ErrorCodes

  @raise

Definition at line 174 of file hub_manager.py.

  Utility function to parse all hubs for the remote gateways and
  create a dictionary of the type:

    dic['remote_gateway_name'] = ['hub1', 'hub2']

  where the hub list is a list of actual hub object references.

Definition at line 66 of file hub_manager.py.

def rocon_gateway.hub_manager.HubManager.disengage_hub (   self,
  hub_to_be_disengaged 
)
  Disengages a hub. Make sure all necessary connections
  are cleaned up before calling this (Gateway.disengage_hub).

  @param hub_to_be_disengaged

Definition at line 231 of file hub_manager.py.

  Returns all unblocked flip requests received by this hub

  @return list of flip registration requests
  @rtype list of utils.Registration

Definition at line 86 of file hub_manager.py.

  Return information that a remote gateway has posted on the hub(s).

  @param remote_gateway_name : the hash name for the remote gateway
  @type string

  @return True, false if the flag is set or not, None if remote
  gateway information cannot found
  @rtype Bool

Definition at line 121 of file hub_manager.py.

Definition at line 42 of file hub_manager.py.

Introspection.

  Parse all the hubs and retrieve the list of remote gateway names.

  Note: not sure where is most convenient, here or in gateway class.

  @return list of remote gateway names (with hashes), e.g. gateway345ae2c...
  @rtype list of str

Definition at line 49 of file hub_manager.py.

def rocon_gateway.hub_manager.HubManager.match_remote_gateway_name (   self,
  remote_gateway_name 
)
  Parses the hub lists looking for strong (identical) and
  weak (matches the name without the uuid hash) matches.

Definition at line 260 of file hub_manager.py.

  Publish network statistics to every hub this gateway is connected to.

  @param statistics
  @type gateway_msgs.ConnectionStatistics

Definition at line 277 of file hub_manager.py.

def rocon_gateway.hub_manager.HubManager.remote_gateway_info (   self,
  remote_gateway_name 
)
  Return information that a remote gateway has posted on the hub(s).

  @param remote_gateway_name : the hash name for the remote gateway
  @type str

  @return remote gateway information
  @rtype gateway_msgs.RemotGateway or None

Definition at line 100 of file hub_manager.py.

def rocon_gateway.hub_manager.HubManager.send_unflip_request (   self,
  remote_gateway_name,
  remote_rule 
)
  Send an unflip request to the specified gateway through all available
  hubs.

  Doesn't raise GatewayUnavailableError if nothing got sent as the higher level
  doesn't need any logic there yet (only called from gateway.shutdown).

  @param remote_gateway_name : the hash name for the remote gateway
  @type string

  @param remote_rule : the remote rule to unflip
  @type gateway_msgs.RemoteRule

Definition at line 145 of file hub_manager.py.

Definition at line 38 of file hub_manager.py.

def rocon_gateway.hub_manager.HubManager.unadvertise (   self,
  connection 
)

Definition at line 254 of file hub_manager.py.


Member Data Documentation

Definition at line 31 of file hub_manager.py.

Definition at line 31 of file hub_manager.py.

Definition at line 31 of file hub_manager.py.


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


rocon_gateway
Author(s): Daniel Stonier , Jihoon Lee , Piyush Khandelwal
autogenerated on Sat Jun 8 2019 18:48:44