Gateway Configuration and Main Loop Class. More...
Public Member Functions | |
def | __init__ |
def | ros_service_connect_hub |
Ros Service Callbacks. | |
def | ros_service_gateway_info |
def | ros_service_remote_gateway_info |
def | spin |
Main Loop. | |
Public Attributes | |
gateway_sync | |
param | |
Private Member Functions | |
def | _attempt_direct_connection |
Hub Connection Methods. | |
def | _connect |
def | _scan_for_zeroconf_hubs |
def | _setup_ros_services |
Ros Pubs, Subs and Services. | |
def | _shutdown |
Private Attributes | |
_gateway_services | |
_zeroconf_services |
Gateway Configuration and Main Loop Class.
Currently this just provides getup and go for the gateway. 1. configure ros params 2. setup ros pubsubs, services 3. optionally setup zeroconf if necessary and available 4. loop until a hub connection is made, then spin 5. shutdown
Definition at line 25 of file src/rocon_gateway/gateway.py.
def rocon_gateway.gateway.Gateway.__init__ | ( | self | ) |
Definition at line 35 of file src/rocon_gateway/gateway.py.
def rocon_gateway.gateway.Gateway._attempt_direct_connection | ( | self | ) | [private] |
Hub Connection Methods.
If configured with a static hub_uri, attempt a direct connection. @return success of the connection @rtype bool
Definition at line 154 of file src/rocon_gateway/gateway.py.
def rocon_gateway.gateway.Gateway._connect | ( | self, | |
ip, | |||
port | |||
) | [private] |
Definition at line 194 of file src/rocon_gateway/gateway.py.
def rocon_gateway.gateway.Gateway._scan_for_zeroconf_hubs | ( | self, | |
previously_found_hubs | |||
) | [private] |
Does a quick scan on zeroconf for gateway hubs. If new ones are found, and it is not on the blacklist, it attempts a connection. This gets run in the pre-spin part of the spin loop. @param previously_found_hubs: zeroconf names of previously scanned hubs @type previously_found_hubs: list of str
Definition at line 170 of file src/rocon_gateway/gateway.py.
def rocon_gateway.gateway.Gateway._setup_ros_services | ( | self | ) | [private] |
Ros Pubs, Subs and Services.
Definition at line 78 of file src/rocon_gateway/gateway.py.
def rocon_gateway.gateway.Gateway._shutdown | ( | self | ) | [private] |
Clears this gateway's information from the redis server.
Definition at line 64 of file src/rocon_gateway/gateway.py.
def rocon_gateway.gateway.Gateway.ros_service_connect_hub | ( | self, | |
request | |||
) |
Ros Service Callbacks.
Incoming requests are used to then try and connect to the gateway hub if not already connected. Requests are of the form of a uri (hostname:port pair) pointing to the gateway hub.
Definition at line 95 of file src/rocon_gateway/gateway.py.
def rocon_gateway.gateway.Gateway.ros_service_gateway_info | ( | self, | |
msg | |||
) |
Definition at line 116 of file src/rocon_gateway/gateway.py.
def rocon_gateway.gateway.Gateway.ros_service_remote_gateway_info | ( | self, | |
request | |||
) |
Definition at line 139 of file src/rocon_gateway/gateway.py.
def rocon_gateway.gateway.Gateway.spin | ( | self | ) |
Main Loop.
Definition at line 50 of file src/rocon_gateway/gateway.py.
Definition at line 35 of file src/rocon_gateway/gateway.py.
Definition at line 35 of file src/rocon_gateway/gateway.py.
Definition at line 35 of file src/rocon_gateway/gateway.py.
Definition at line 35 of file src/rocon_gateway/gateway.py.