hololink::module::EnumerationMetadata
hololink::module::EnumerationMetadata
Encapsulates HSB device configuration.
Typical EnumerationMetadata lifecycle:
- constructed from received network messages (e.g. BOOTP)
- updated by a loadable module that is specific to that device
- updated by the application layer for specific configuration changes (e.g. changing some default behavior)
- used to initialize service objects that configure and interface to HSB functions
The framework puts no restrictions on the pairs stored here; a Module and its services are free to coordinate through fields of their own. Values are integers, strings or byte blobs, and every std::map operation is available for working with them.
Example
Inherits from: std::map< std::string, std::variant< int64_t, std::string, std::vector< uint8_t > > > (public)
Methods
contains
Report whether a field is present, whatever type it holds.
Returns: True when the field is present.
Parameters
Name of the field to test.
get
Const
Const (with default value)
Fetch the value of a field, which must be present.
Returns: The field’s value.
Throws: std::runtime_error if the field is absent or holds another type. Use the overload taking a default value for a field that is genuinely optional.
Template parameters
The expected type for the data.
Parameters
Name of the field to fetch.