Function rcl_get_automatic_discovery_range
Defined in File discovery_options.h
Function Documentation
-
rcl_ret_t rcl_get_automatic_discovery_range(rmw_discovery_options_t *discovery_options)
Determine how the user wishes to discover other ROS nodes automatically.
Use the ROS_AUTOMATIC_DISCOVERY_RANGE environment variable to determine how far automatic discovery should be allowed to propagate:
not at all (no automatic discovery),
the local machine only,
or the subnet (or as far beyond the local system as the middleware can)
When the subnet is specified the automatic discovery mechanism used by the rmw implementation dictates how far discovery can propagate on the network, e.g. for multicast-based discovery this will be the local subnet, hence the name.
The option indicated by the environment variable will be stored in the automatic_discovery_range field of the given discovery_options struct.
If the environment variable isn’t set, then the default discovery range will be the value of the preprocessor definition
RCL_DEFAULT_DISCOVERY_RANGE
. If the definition is undefined, then the default will be SUBNET. It is intended that the default will be LOCALHOST in future versions of ROS.- Parameters:
discovery_options – [out] Must not be NULL.
- Returns:
RCL_RET_INVALID_ARGUMENT if an argument is invalid, or
- Returns:
RCL_RET_ERROR if an unexpected error happened, or
- Returns: