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

> Holds the handle to the Module a service was published with.

Holds the handle to the [Module](module) a service was published with.

A service reaches the other services it cooperates with (for example a data channel finding its device) through this [Module](module), so that they all come from the same module as the service itself.

Services use virtual inheritance of `ServiceBase` to ensure they have exactly one pointer to the owner [Module](module), even when a service implements several interfaces.

Applications do not use this class directly; it is a base of every interface derived from [Service](service).

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

---

## Methods

### 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.