Function fuse_variables::loadDeviceId

Function Documentation

fuse_core::UUID fuse_variables::loadDeviceId(fuse_core::node_interfaces::NodeInterfaces<fuse_core::node_interfaces::Parameters> interfaces)

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

Returns:

A device UUID