Skip to navigation

holoscan.channel

Beta
View as Markdown

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

Submodules

Package Contents

Classes

NameDescription
CancelToken-
ChannelOptions-
ClockHealthAssessment-
ClockHealthReason-
ClockHealthReport-
Publisher-
QueuePolicy-
ReadinessHandle-
RuntimeOwn endpoints; normal close publishes EOS, while abnormal exit abandons them.
Sample-
SampleMetadata-
Subscriber-
TensorLoanOne-shot loan consumed by every emit attempt, including a failed attempt.
TensorTransferMode-
_TensorWritePhase-

API

class holoscan.channel.CancelToken()
cancelled
bool
holoscan.channel.CancelToken.cancel() -> None
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
class holoscan.channel.ClockHealthAssessment

Bases: enum.Enum

DEGRADED
= ...
HEALTHY
= ...
UNHEALTHY
= ...
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
= ...
class holoscan.channel.ClockHealthReport(
)
class holoscan.channel.Publisher()
has_subscribers
bool
payload_type
_payload_PayloadType
holoscan.channel.Publisher.close() -> None

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

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
holoscan.channel.Publisher.emit_captured(
value: object,
capture_timestamp_ns: int,
frame_id: int | None = None,
flags: holoscan.SampleFlags | None = None
) -> int
holoscan.channel.Publisher.loan(
shape: list[int] | tuple[int, ...],
dtype: object,
strides: list[int] | tuple[int, ...] | None = None

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

holoscan.channel.Publisher.make_capture_time(
timestamp_ns: int
holoscan.channel.Publisher.report_clock_health(
) -> None
holoscan.channel.Publisher.update_connections() -> None
holoscan.channel.Publisher.wait_for_subscribers(
timeout: holoscan.channel._Timeout | None = None
) -> None
class holoscan.QueuePolicy

Bases: enum.Enum

BLOCKING
= 0
DROP_OLDEST
= 1
class holoscan.channel.ReadinessHandle()
holoscan.channel.ReadinessHandle.__enter__() -> typing.Self
holoscan.channel.ReadinessHandle.__exit__(
exc_type: object,
exc_value: object,
traceback: object
) -> None
holoscan.channel.ReadinessHandle.acknowledge() -> None
holoscan.channel.ReadinessHandle.detach() -> None
holoscan.channel.ReadinessHandle.fileno() -> int
class holoscan.channel.Runtime()

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

holoscan.channel.Runtime.__enter__() -> typing.Self
holoscan.channel.Runtime.__exit__(
exc_type: object,
exc_value: object,
traceback: object
) -> None
holoscan.channel.Runtime.close() -> None
class holoscan.Sample()
data
T
is_missing
bool
is_stale
bool
metadata
SampleMetadata
holoscan.Sample.__class_getitem__(
item: object
) -> types.GenericAlias
classmethod
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
class holoscan.channel.Subscriber()
has_publishers
bool
has_samples
bool
payload_type
_payload_PayloadType
holoscan.channel.Subscriber.close() -> None
holoscan.channel.Subscriber.readiness() -> holoscan.channel.ReadinessHandle
holoscan.channel.Subscriber.receive(
timeout: holoscan.channel._Timeout | None = None,
cancel: holoscan.channel.CancelToken | None = None
) -> holoscan.Sample[typing.Any]
holoscan.channel.Subscriber.refresh_connections() -> None
holoscan.channel.Subscriber.try_receive() -> holoscan.Sample[typing.Any] | None
holoscan.channel.Subscriber.wait(
timeout: holoscan.channel._Timeout | None = None,
cancel: holoscan.channel.CancelToken | None = None
) -> None
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
holoscan.channel.TensorLoan.__array__(
dtype: object | None = None,
copy: bool | None = None
) -> object
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.

holoscan.channel.TensorLoan.__dlpack_device__() -> tuple[int, int]
holoscan.channel.TensorLoan.cancel() -> None
holoscan.channel.TensorLoan.write(
stream: object | None = None

Enter the writable phase.

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

class holoscan.channel.TensorTransferMode

Bases: enum.Enum

BUFFER_HANDLE
= ...
SAME_PROCESS_SIDECAR
= ...
class holoscan.channel._TensorWritePhase()
holoscan.channel._TensorWritePhase.__enter__() -> holoscan.channel.TensorLoan
holoscan.channel._TensorWritePhase.__exit__(
exc_type: object,
exc_value: object,
traceback: object
) -> None