> 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::EnumerationInterfaceV1

> A loadable Module supplements device EnumerationMetadata through this service.

A loadable [Module](module) supplements device [EnumerationMetadata](enumerationmetadata) through this service.

Devices typically announce themselves via BOOTP messages which carry a specific set of identification and configuration information, like device UUID and HSB-IP version ("compat_id"). That's usually not enough information for most applications to work– for example, the number of sensors and data channels on the system determine the addressing for the specific channels within the device. This service allows the device module, which is loaded via UUID and compat_id, to update [EnumerationMetadata](enumerationmetadata) with other appropriate configuration data for this device. This supplemented enumeration metadata is passed up to the application layer, and will be used to direct construction of services used on the device.

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

**Inherits from:** `hololink::module::Service< EnumerationInterfaceV1 >` (public)

---

## Methods

### update_metadata \[#updatemetadata]

```cpp showLineNumbers={false}
virtual hololink_module_status_t hololink::module::EnumerationInterfaceV1::update_metadata(
    EnumerationMetadata &metadata,
    const uint8_t *raw_packet,
    size_t raw_packet_len
)
```

Complete the metadata describing an announced device.

Called once per announcement, before the announcement reaches the application; announcements decoded from bootp messages arrive on the Reactor thread.

**Returns:** HOLOLINK_MODULE_OK once the metadata is complete; HOLOLINK_MODULE_ENUMERATION_SKIPPED to decline the device, which withholds the announcement from the application and lets enumeration of other devices continue; any other status reports a failure, which the [Adapter](adapter) raises as a std::runtime_error.

**Parameters**

**`metadata`** `EnumerationMetadata &`

Announcement to complete in place.

---

**`raw_packet`** `const uint8_t *`

The bootp packet `metadata` was decoded from; a module whose devices carry vendor-specific bytes needs it to complete the metadata. Null when the announcement did not come from a packet.

---

**`raw_packet_len`** `size_t`

Length of `raw_packet`, in bytes.

---

### module \[#module]

```cpp showLineNumbers={false}
std::shared_ptr<Module> hololink::module::ServiceBase::module() const
```

The [Module](module) that this service was published from.

The service holds no strong reference to its [Module](module), so this does not extend the [Module](module)'s lifetime.

**Returns:** The owning [Module](module), or an empty pointer if the service has not been published or its [Module](module) no longer exists.

---

## Static methods

### get_service \[#getservice]

#### Fetch a module's \`EnumerationInterfaceV1\` instance

```cpp showLineNumbers={false}
static std::shared_ptr<EnumerationInterfaceV1> hololink::module::EnumerationInterfaceV1::get_service(
    std::shared_ptr<Module> module,
    bool allow_null = false
)
```

Fetch a module's `EnumerationInterfaceV1` instance.

**Returns:** The module's enumeration service.

**Throws:** `std::runtime_error` if the module publishes no enumeration service and allow_null is false.

**Parameters**

**`module`** `std::shared_ptr<Module>`

The module that claims the device, from [Adapter::get_module](adapter#getmodule).

---

**`allow_null`** `bool` — default: false

Return an empty pointer, rather than throwing, when the module publishes no enumeration service.

---

#### Overload 2

```cpp showLineNumbers={false}
static std::shared_ptr<EnumerationInterfaceV1> hololink::module::Service<EnumerationInterfaceV1>::get_service(
    std::shared_ptr<Module> module,
    const char *instance_id,
    bool allow_null = false
)
```

Type-safe way to fetch a std::shared_ptr to an instance of \<Derived> from a [Module](module).

Note that [Module](module) usually caches instances, it's likely that calls to get_service with the same locator_id will return pointers to the same implementation object.

**Returns:** A shared pointer to the service instance.

**Parameters**

**`module`** `std::shared_ptr<Module>`

Is the shared object that owns the instance we wish to fetch

---

**`instance_id`** `const char *`

Names the specific object, usually expressed as a set of "name=value;..." pairs, as defined by the implementations themselves. This name is normally fetched by calling `Derived::locator_id(enumeration_metadata)`.

---

**`allow_null`** `bool` — default: false

The default value of `false` causes this routine to throw a std::runtime_error if the service cannot be found within the module; this would be expected to terminate the calling program. If the application wants to handle the error, pass in `true` here and get_service will return `nullptr` when this module doesn't provide the requested service.

---

### for_each_type_id \[#foreachtypeid]

```cpp showLineNumbers={false}
static bool hololink::module::Service<EnumerationInterfaceV1>::for_each_type_id(
    Callback &&cb
)
```

Iterate over every type_id supported by this instance.

The callback signature is `bool(const char*)` — returning false halts the walk; true continues. Iteration is depth-first, so you'll see the most specific implementation types first.