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

> Configure cold authoring policy for one Graph-owned input port.

```cpp showLineNumbers={false}
template <PublishedPayload T>
class InputPortConfigurator
```

Configure cold authoring policy for one Graph-owned input port.

A configurator is a non-owning handle. It remains usable only while the originating [Graph](graph) and exact port declaration remain live. Each successful call atomically updates cold authoring state; a rejected call leaves the port and its incident edges unchanged. Configurators do not make [Graph](graph) authoring thread-safe, so callers must serialize them with all other reads and mutations of the same [Graph](graph).

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

**Template parameters**

**`T`** `PublishedPayload`

[Exact](../structs/exact) published payload type of the input declaration.

---

---

## Constructors

### InputPortConfigurator \[#inputportconfigurator]

```cpp showLineNumbers={false}
holoscan::InputPortConfigurator<T>::InputPortConfigurator(
    std::weak_ptr<detail::GraphState> state,
    GraphPortId port,
    std::shared_ptr<const void> handle_identity
) noexcept
```

---

## Methods

### queue_depth \[#queuedepth]

```cpp showLineNumbers={false}
InputPortConfigurator & holoscan::InputPortConfigurator<T>::queue_depth(
    std::uint32_t depth
)
```

Override the finite input history depth.

**Returns:** This configurator for fluent authoring.

**Throws:** `RuntimeError` if `depth` is zero or the source [Graph](graph) is unavailable.

**Parameters**

**`depth`** `std::uint32_t`

Positive number of samples retained for this logical input.

---

### expects_tensor \[#expectstensor]

```cpp showLineNumbers={false}
InputPortConfigurator & holoscan::InputPortConfigurator<T>::expects_tensor(
    const TensorInputSpec &spec
)
```

Override this input with one common consumer [Tensor](tensor) spec.

**Returns:** This configurator for fluent authoring.

**Parameters**

**`spec`** `const TensorInputSpec &`

Representation, finite bounds, and conversion requirements.

---

### diagnostic_alias \[#diagnosticalias]

```cpp showLineNumbers={false}
InputPortConfigurator & holoscan::InputPortConfigurator<T>::diagnostic_alias(
    std::string_view alias
)
```

Assign an owned diagnostic alias without changing port identity.

**Returns:** This configurator for fluent authoring.

**Throws:** `RuntimeError` if `alias` is invalid or the source [Graph](graph) is unavailable.

**Parameters**

**`alias`** `std::string_view`

Nonempty bounded UTF-8 alias copied before return.

---

### state \[#state]

```cpp showLineNumbers={false}
std::shared_ptr<detail::GraphState> holoscan::InputPortConfigurator<T>::state() const
```

### apply \[#apply]

```cpp showLineNumbers={false}
static void holoscan::InputPortConfigurator<T>::apply(
    expected<void, Error> result
)
```

---

## Types

### Typedefs

| Name                         | Definition | Description                                                          |
| ---------------------------- | ---------- | -------------------------------------------------------------------- |
| `graph_authoring_handle_tag` | `void`     | Opt this authoring handle out of replayable [Graph](graph) captures. |

---

## Member variables

| Name               | Type                                  | Description |
| ------------------ | ------------------------------------- | ----------- |
| `state_`           | `std::weak_ptr< detail::GraphState >` |             |
| `port_`            | `GraphPortId`                         |             |
| `handle_identity_` | `std::shared_ptr< const void >`       |             |