> This page is for version 5.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 5.0 (Latest) (default): https://docs.nvidia.com/holoscan/sdk-user-guide/5-0-latest/llms.txt
> - ltsb-2.0: https://docs.nvidia.com/holoscan/sdk-user-guide/ltsb-2-0/llms.txt
> - 4.6: https://docs.nvidia.com/holoscan/sdk-user-guide/4-6/llms.txt
> - 4.5: https://docs.nvidia.com/holoscan/sdk-user-guide/4-5/llms.txt
> - 4.4: https://docs.nvidia.com/holoscan/sdk-user-guide/4-4/llms.txt
> - 4.3: https://docs.nvidia.com/holoscan/sdk-user-guide/4-3/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sdk-user-guide/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/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::HostedParameterSnapshot

> Own an immutable parameter schema and generation-zero value without language callbacks.

Own an immutable parameter schema and generation-zero value without language callbacks.

Copies share immutable storage. Descriptor strings, field records, and scalar values therefore remain stable for as long as a [Graph](../classes/graph) factory, compiled Plan, or session-owned [Operator](../classes/operator) retains a snapshot. Reading the snapshot never invokes a foreign runtime or acquires a language lock.

```cpp showLineNumbers={false}
#include <holoscan/hosted_parameter_snapshot.hpp>
```

---

## Methods

### operator bool \[#operatorbool]

```cpp showLineNumbers={false}
holoscan::HostedParameterSnapshot::operator bool() const noexcept
```

Return whether this snapshot carries a declared parameter schema.

### type \[#type]

```cpp showLineNumbers={false}
const ParamTypeDescriptor & holoscan::HostedParameterSnapshot::type() const noexcept
```

Return the exact process-local aggregate descriptor.

### schema \[#schema]

```cpp showLineNumbers={false}
const ParamSchemaDescriptor * holoscan::HostedParameterSnapshot::schema() const noexcept
```

Return the owned immutable schema, or null for an empty snapshot.

### read_scalar \[#readscalar]

```cpp showLineNumbers={false}
bool holoscan::HostedParameterSnapshot::read_scalar(
    const ParamFieldDescriptor &field,
    ParamScalarValue &value
) const noexcept
```

Read one scalar field by descriptor.

**Returns:** `true` only for a present exact scalar value.

### read_scalar_sequence \[#readscalarsequence]

```cpp showLineNumbers={false}
std::span<const ParamScalarValue> holoscan::HostedParameterSnapshot::read_scalar_sequence(
    const ParamFieldDescriptor &field
) const noexcept
```

Read one bounded scalar sequence by descriptor.

**Returns:** Empty for a foreign or non-sequence field; an authored empty sequence is valid.

---

## Member variables

| Name    | Type                                                            | Description              |
| ------- | --------------------------------------------------------------- | ------------------------ |
| `state` | `std::shared_ptr< const detail::HostedParameterSnapshotState >` | Immutable owned storage. |