Function fuse_variables::loadDeviceId
Defined in File stamped.hpp
Function Documentation
-
fuse_core::UUID fuse_variables::loadDeviceId(fuse_core::node_interfaces::NodeInterfaces<fuse_core::node_interfaces::Parameters, fuse_core::node_interfaces::Logging> interfaces, const std::string &uuid_parameter = "device_id", const std::string &name_parameter = "device_name", bool silent = true)
Load a device id from the parameter server.
This function first checks if the ‘device_id’ parameter is available. If so, it attempts to load the device_id using that parameter. There are a few supported formats:
”01234567-89AB-CDEF-0123-456789ABCDEF”
”01234567-89ab-cdef-0123-456789abcdef”
”0123456789abcdef0123456789abcdef”
”{01234567-89ab-cdef-0123-456789abcdef}”
If the ‘device_id’ parameter doesn’t exist, this function checks for the ‘device_name’ parameter. If found, a device_id is generated by computing a hash on the provided string. See fuse_core::uuid::generate(const std::string&) for details.
If neither parameter exits, the device_id is populated by all zeros, the so-called NIL UUID.
Will throw if the device_id parameter is not in an expected format.
- Parameters:
interfaces – [in] The node interfaces used to load parameters and write log messages
uuid_parameter – [in] The parameter name that holds the device uuid to be loaded
name_parameter – [in] The parameter name that holds the device name. The uuid will be generated from the name.
silent – [in] If true, no ROS log warnings are generated
- Returns:
A device UUID