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

Standalone Channel clients for processes that do not host a Graph.

## Submodules

* **[`holoscan.channel.aio`](/holoscan/sdk-user-guide/python/api-reference/holoscan/channel/aio)**

## Package Contents

### Classes

| Name                                                               | Description                                                                   |
| ------------------------------------------------------------------ | ----------------------------------------------------------------------------- |
| [`CancelToken`](#holoscan-channel-CancelToken)                     | -                                                                             |
| [`ChannelOptions`](#holoscan-channel-ChannelOptions)               | -                                                                             |
| [`ClockHealthAssessment`](#holoscan-channel-ClockHealthAssessment) | -                                                                             |
| [`ClockHealthReason`](#holoscan-channel-ClockHealthReason)         | -                                                                             |
| [`ClockHealthReport`](#holoscan-channel-ClockHealthReport)         | -                                                                             |
| [`Publisher`](#holoscan-channel-Publisher)                         | -                                                                             |
| [`QueuePolicy`](#holoscan-QueuePolicy)                             | -                                                                             |
| [`ReadinessHandle`](#holoscan-channel-ReadinessHandle)             | -                                                                             |
| [`Runtime`](#holoscan-channel-Runtime)                             | Own endpoints; normal close publishes EOS, while abnormal exit abandons them. |
| [`Sample`](#holoscan-Sample)                                       | -                                                                             |
| [`SampleMetadata`](#holoscan-SampleMetadata)                       | -                                                                             |
| [`Subscriber`](#holoscan-channel-Subscriber)                       | -                                                                             |
| [`TensorLoan`](#holoscan-channel-TensorLoan)                       | One-shot loan consumed by every emit attempt, including a failed attempt.     |
| [`TensorTransferMode`](#holoscan-channel-TensorTransferMode)       | -                                                                             |
| [`_TensorWritePhase`](#holoscan-channel-_TensorWritePhase)         | -                                                                             |

### API

```python
class holoscan.channel.CancelToken()
```

**`cancelled`** `bool`

---

```python
holoscan.channel.CancelToken.cancel() -> None
```

```python
class holoscan.channel.ChannelOptions(
    queue_policy: holoscan.QueuePolicy = ...,
    max_subscriber_queue_depth: int = 0,
    subscriber_queue_depth: int = 8,
    max_subscriber_borrowed_samples: int = 0,
    max_borrowed_samples: int = 0,
    publisher_history_depth: int = 0,
    max_loaned_samples: int = 0,
    expected_recipient_count: int = 1,
    enable_event_wake: bool = False,
    replacement_attribution_required: bool = False,
    tensor_transfer_mode: holoscan.channel.TensorTransferMode = ...
)
```

**`enable_event_wake`** `bool`

---

**`expected_recipient_count`** `int`

---

**`max_borrowed_samples`** `int`

---

**`max_loaned_samples`** `int`

---

**`max_subscriber_borrowed_samples`** `int`

---

**`max_subscriber_queue_depth`** `int`

---

**`publisher_history_depth`** `int`

---

**`queue_policy`** `QueuePolicy`

---

**`replacement_attribution_required`** `bool`

---

**`subscriber_queue_depth`** `int`

---

**`tensor_transfer_mode`** `TensorTransferMode`

---

```python
class holoscan.channel.ClockHealthAssessment
```

**Bases:** `enum.Enum`

**`DEGRADED`** `= ...`

---

**`HEALTHY`** `= ...`

---

**`UNHEALTHY`** `= ...`

---

```python
class holoscan.channel.ClockHealthReason
```

**Bases:** `enum.Enum`

**`CALIBRATION_EXPIRED`** `= ...`

---

**`CLOCK_STALLED`** `= ...`

---

**`MONITOR_FAULT`** `= ...`

---

**`NONE`** `= ...`

---

**`PHASE_ERROR_LIMIT_EXCEEDED`** `= ...`

---

**`RATE_ERROR_LIMIT_EXCEEDED`** `= ...`

---

**`SYNCHRONIZATION_LOCK_LOST`** `= ...`

---

**`TIMESTAMP_REGRESSION`** `= ...`

---

**`TIMESTAMP_SOURCE_FAULT`** `= ...`

---

**`UNSPECIFIED`** `= ...`

---

```python
class holoscan.channel.ClockHealthReport(
    assessment: holoscan.channel.ClockHealthAssessment,
    reason: holoscan.channel.ClockHealthReason = ...
)
```

**`assessment`** `ClockHealthAssessment`

---

**`reason`** `ClockHealthReason`

---

```python
holoscan.channel.ClockHealthReport.degraded(
    reason: holoscan.channel.ClockHealthReason
) -> holoscan.channel.ClockHealthReport
```

staticmethod

```python
holoscan.channel.ClockHealthReport.healthy() -> holoscan.channel.ClockHealthReport
```

staticmethod

```python
holoscan.channel.ClockHealthReport.unhealthy(
    reason: holoscan.channel.ClockHealthReason
) -> holoscan.channel.ClockHealthReport
```

staticmethod

```python
class holoscan.channel.Publisher()
```

**`has_subscribers`** `bool`

---

**`payload_type`** `_payload_PayloadType`

---

```python
holoscan.channel.Publisher.close() -> None
```

Publish ordered EOS; destruction and process exit do not imply EOS.

```python
holoscan.channel.Publisher.emit(
    value: object,
    capture_time: holoscan.time.TimePoint | None = None,
    frame_id: int | None = None,
    flags: holoscan.SampleFlags | None = None,
    timeout: holoscan.channel._Timeout | None = None
) -> int
```

```python
holoscan.channel.Publisher.emit_captured(
    value: object,
    capture_timestamp_ns: int,
    frame_id: int | None = None,
    flags: holoscan.SampleFlags | None = None
) -> int
```

```python
holoscan.channel.Publisher.loan(
    shape: list[int] | tuple[int, ...],
    dtype: object,
    strides: list[int] | tuple[int, ...] | None = None
) -> holoscan.channel.TensorLoan
```

Borrow Tensor backing; scalar publishers reject this runtime-only operation.

```python
holoscan.channel.Publisher.make_capture_time(
    timestamp_ns: int
) -> holoscan.time.TimePoint
```

```python
holoscan.channel.Publisher.report_clock_health(
    report: holoscan.channel.ClockHealthReport
) -> None
```

```python
holoscan.channel.Publisher.update_connections() -> None
```

```python
holoscan.channel.Publisher.wait_for_subscribers(
    timeout: holoscan.channel._Timeout | None = None
) -> None
```

```python
class holoscan.QueuePolicy
```

**Bases:** `enum.Enum`

**`BLOCKING`** `= 0`

---

**`DROP_OLDEST`** `= 1`

---

```python
class holoscan.channel.ReadinessHandle()
```

```python
holoscan.channel.ReadinessHandle.__enter__() -> typing.Self
```

```python
holoscan.channel.ReadinessHandle.__exit__(
    exc_type: object,
    exc_value: object,
    traceback: object
) -> None
```

```python
holoscan.channel.ReadinessHandle.acknowledge() -> None
```

```python
holoscan.channel.ReadinessHandle.detach() -> None
```

```python
holoscan.channel.ReadinessHandle.fileno() -> int
```

```python
class holoscan.channel.Runtime()
```

Own endpoints; normal close publishes EOS, while abnormal exit abandons them.

```python
holoscan.channel.Runtime.__enter__() -> typing.Self
```

```python
holoscan.channel.Runtime.__exit__(
    exc_type: object,
    exc_value: object,
    traceback: object
) -> None
```

```python
holoscan.channel.Runtime.close() -> None
```

```python
class holoscan.Sample()
```

**`data`** `T`

---

**`is_missing`** `bool`

---

**`is_stale`** `bool`

---

**`metadata`** `SampleMetadata`

---

```python
holoscan.Sample.__class_getitem__(
    item: object
) -> types.GenericAlias
```

classmethod

```python
class holoscan.SampleMetadata()
```

**`byte_size`** `int`

---

**`capture_time`** `_time_TimePoint`

---

**`capture_timestamp_ns`** `int`

---

**`degraded`** `bool`

---

**`flags`** `SampleFlags`

---

**`frame_id`** `int`

---

**`payload_kind`** `PayloadKind`

---

**`publish_clock_id`** `int`

---

**`publish_time`** `_time_TimePoint`

---

**`publish_timestamp_ns`** `int`

---

**`sequence`** `int`

---

**`source_clock_id`** `int`

---

**`trace_id`** `int`

---

**`valid`** `bool`

---

**`version`** `SampleMetadataVersion`

---

```python
class holoscan.channel.Subscriber()
```

**`has_publishers`** `bool`

---

**`has_samples`** `bool`

---

**`payload_type`** `_payload_PayloadType`

---

```python
holoscan.channel.Subscriber.close() -> None
```

```python
holoscan.channel.Subscriber.readiness() -> holoscan.channel.ReadinessHandle
```

```python
holoscan.channel.Subscriber.receive(
    timeout: holoscan.channel._Timeout | None = None,
    cancel: holoscan.channel.CancelToken | None = None
) -> holoscan.Sample[typing.Any]
```

```python
holoscan.channel.Subscriber.refresh_connections() -> None
```

```python
holoscan.channel.Subscriber.try_receive() -> holoscan.Sample[typing.Any] | None
```

```python
holoscan.channel.Subscriber.wait(
    timeout: holoscan.channel._Timeout | None = None,
    cancel: holoscan.channel.CancelToken | None = None
) -> None
```

```python
class holoscan.channel.TensorLoan()
```

One-shot loan consumed by every emit attempt, including a failed attempt.

**`dtype`** `_tensor_DLDataType`

---

**`memory_kind`** `_tensor_MemoryKind`

---

**`nbytes`** `int`

---

**`shape`** `tuple[int, ...]`

---

**`strides`** `tuple[int, ...] | None`

---

```python
holoscan.channel.TensorLoan.__array__(
    dtype: object | None = None,
    copy: bool | None = None
) -> object
```

```python
holoscan.channel.TensorLoan.__dlpack__(
    stream: object | None = None,
    max_version: tuple[int, int] | None = None,
    dl_device: tuple[int, int] | None = None,
    copy: bool | None = None
) -> object
```

Export a writable view; CUDA consumers must use the write phase's stream.

```python
holoscan.channel.TensorLoan.__dlpack_device__() -> tuple[int, int]
```

```python
holoscan.channel.TensorLoan.cancel() -> None
```

```python
holoscan.channel.TensorLoan.write(
    stream: object | None = None
) -> holoscan.channel._TensorWritePhase
```

Enter the writable phase.

CUDA rejects thread-relative `cudaStreamPerThread` (`stream=2`).

```python
class holoscan.channel.TensorTransferMode
```

**Bases:** `enum.Enum`

**`BUFFER_HANDLE`** `= ...`

---

**`SAME_PROCESS_SIDECAR`** `= ...`

---

```python
class holoscan.channel._TensorWritePhase()
```

```python
holoscan.channel._TensorWritePhase.__enter__() -> holoscan.channel.TensorLoan
```

```python
holoscan.channel._TensorWritePhase.__exit__(
    exc_type: object,
    exc_value: object,
    traceback: object
) -> None
```