> This page is for version 3.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 3.0 (Latest) (default): https://docs.nvidia.com/holoscan/sensor-bridge/3-0/llms.txt
> - 2.7: https://docs.nvidia.com/holoscan/sensor-bridge/2-7/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sensor-bridge/archives/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sensor-bridge/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sensor-bridge/_mcp/server.

# hololink::module::EnumerationMetadata

> Encapsulates HSB device configuration.

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](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.

```cpp showLineNumbers={false}
#include <hololink/module/enumeration_metadata.hpp>
```

## Example

```cpp showLineNumbers={false}
adapter = hololink_module.Adapter.get_adapter()
# Find a data channel on an HSB device--
# this returns EnumerationMetadata configured with this channel.
hololink_ip = "192.168.0.2"   # as appropriate
discovery_timeout_s = 30
metadata = adapter.wait_for_channel(hololink_ip, discovery_timeout_s)
# That channel is the first data port on a typical
# HsbLite device, which would transfer data from
# sensor 0.  We can change this default and make it
# listen to sensor 1 instead:
sensor_number = 1
adapter.use_sensor(metadata, sensor_number)
# Now instantiate our device driver this way
camera = hololink_module.sensors.vb1940.Vb1940Cam(metadata)
# ...
```

**Inherits from:** `std::map< std::string, std::variant< int64_t, std::string, std::vector< uint8_t > > >` (public)

---

## Methods

### contains \[#contains]

```cpp showLineNumbers={false}
bool hololink::module::EnumerationMetadata::contains(
    const std::string &key
) const
```

Report whether a field is present, whatever type it holds.

**Returns:** True when the field is present.

**Parameters**

**`key`** `const std::string &`

Name of the field to test.

---

### get \[#get]

#### Const

```cpp showLineNumbers={false}
template <typename T>
T hololink::module::EnumerationMetadata::get(
    const std::string &key
) const
```

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**

**`T`** `typename`

The expected type for the data.

---

**Parameters**

**`key`** `const std::string &`

Name of the field to fetch.

---

#### Const (with default value)

```cpp showLineNumbers={false}
template <typename T>
T hololink::module::EnumerationMetadata::get(
    const std::string &key,
    const T &default_value
) const
```

---

## Types

### Typedefs

| Name    | Definition    | Description                                                |
| ------- | ------------- | ---------------------------------------------------------- |
| `Value` | `mapped_type` | A stored value: an int64_t, a std::string, or a byte blob. |

---

## Member variables

| Name       | Type | Description |
| ---------- | ---- | ----------- |
| `keys`     | `K`  | STL member. |
| `elements` | `T`  | STL member. |