Package master_discovery_fkie :: Module interface_finder
[frames] | no frames]

Module interface_finder

source code

Functions
str or None
hostFromUri(uri)
Extracts the hostname from given uri.
source code
[str]
get_changes_topic(masteruri, wait=True)
Search in publishers of ROS master for a topic with type MasterState and returns his name, if it runs on the local host.
source code
[str]
get_stats_topic(masteruri, wait=True)
Search in publishers of ROS master for a topic with type LinkStatesStamped and returns his name, if it runs on the local host.
source code
[str]
get_listmaster_service(masteruri, wait=True)
Search in services of ROS master for a service with name ending by list_masters and returns his name, if it runs on the local host.
source code
Variables
  __package__ = 'master_discovery_fkie'
Function Details

hostFromUri(uri)

source code 

Extracts the hostname from given uri.

Parameters:
  • uri (str) - the uri to parse
Returns: str or None
the hostname or None, if the uri is None or invalid

get_changes_topic(masteruri, wait=True)

source code 

Search in publishers of ROS master for a topic with type MasterState and returns his name, if it runs on the local host. Returns empty list if no topic was found and wait is False.

Parameters:
  • masteruri (str) - the URI of the ROS master
  • wait (boolean) - check every second for the topic
Returns: [str]
the list with names of the topic with type MasterState

get_stats_topic(masteruri, wait=True)

source code 

Search in publishers of ROS master for a topic with type LinkStatesStamped and returns his name, if it runs on the local host. Returns empty list if no topic was found and wait is False.

Parameters:
  • masteruri (str) - the URI of the ROS master
  • wait (boolean) - check every second for the topic
Returns: [str]
the list of names of the topic with type LinkStatesStamped

get_listmaster_service(masteruri, wait=True)

source code 

Search in services of ROS master for a service with name ending by list_masters and returns his name, if it runs on the local host. Returns empty list if no service was found and wait is False.

Parameters:
  • masteruri (str) - the URI of the ROS master
  • wait (boolean) - check every second for the service
Returns: [str]
the list with names of the services ending with list_masters