NVIDIA Holoscan SDK v2.8.0
Holoscan v2.8.0

holoscan.conditions

This module provides a Python API to underlying C++ API Conditions.

<a href="#holoscan.conditions.AsynchronousCondition">holoscan.conditions.AsynchronousCondition</a> Asynchronous condition class.
<a href="#holoscan.conditions.BooleanCondition">holoscan.conditions.BooleanCondition</a> Boolean condition.
<a href="#holoscan.conditions.CountCondition">holoscan.conditions.CountCondition</a> Count condition.
<a href="#holoscan.conditions.CudaBufferAvailableCondition">holoscan.conditions.CudaBufferAvailableCondition</a> Condition based on data availability in a CudaBuffer object.
<a href="#holoscan.conditions.CudaEventCondition">holoscan.conditions.CudaEventCondition</a> Condition class to indicate data availability on CUDA stream completion via an event.
<a href="#holoscan.conditions.CudaStreamCondition">holoscan.conditions.CudaStreamCondition</a> Condition class to indicate data availability on CUDA stream completion.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition">holoscan.conditions.DownstreamMessageAffordableCondition</a> Condition that permits execution when the downstream operator can accept new messages.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition">holoscan.conditions.ExpiringMessageAvailableCondition</a> Condition that tries to wait for specified number of messages in receiver.
<a href="#holoscan.conditions.MessageAvailableCondition">holoscan.conditions.MessageAvailableCondition</a> Condition that permits execution when an upstream message is available.
<a href="#holoscan.conditions.MultiMessageAvailableCondition">holoscan.conditions.MultiMessageAvailableCondition</a> Condition that checks the number of messages available across multiple inputs.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition">holoscan.conditions.MultiMessageAvailableTimeoutCondition</a> Condition that checks the number of messages available across multiple inputs.
<a href="#holoscan.conditions.PeriodicCondition">holoscan.conditions.PeriodicCondition</a> Condition class to support periodic execution of operators.
class holoscan.conditions.AsynchronousCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Asynchronous condition class.

Used to control whether an entity is executed.

Attributes

<a href="#holoscan.conditions.AsynchronousCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.AsynchronousCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.AsynchronousCondition.event_state">event_state</a> Event state property
<a href="#holoscan.conditions.AsynchronousCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.AsynchronousCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.AsynchronousCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.AsynchronousCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.AsynchronousCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.AsynchronousCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.AsynchronousCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.AsynchronousCondition.name">name</a> The name of the condition.
spec

Methods

<a href="#holoscan.conditions.AsynchronousCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.AsynchronousCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.AsynchronousCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.AsynchronousCondition.setup">setup</a>(self, arg0) setup method for the condition.
__init__(self: holoscan.conditions._conditions.AsynchronousCondition, fragment: holoscan.core._core.Fragment, name: str = 'noname_async_condition') → None

Asynchronous condition.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

namestr, optional

The name of the condition.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property description

YAML formatted string describing the condition.

property event_state

Event state property

  • AsynchronousEventState.READY

  • AsynchronousEventState.WAIT

  • AsynchronousEventState.EVENT_WAITING

  • AsynchronousEventState.EVENT_DONE

  • AsynchronousEventState.EVENT_NEVER

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

property name

The name of the condition.

Returns
namestr
setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
class holoscan.conditions.AsynchronousEventState

Bases: pybind11_builtins.pybind11_object

Members:

READY

WAIT

EVENT_WAITING

EVENT_DONE

EVENT_NEVER

Attributes

<a href="#holoscan.conditions.AsynchronousEventState.name">name</a>

value
EVENT_DONE = <AsynchronousEventState.EVENT_DONE: 3>
EVENT_NEVER = <AsynchronousEventState.EVENT_NEVER: 4>
EVENT_WAITING = <AsynchronousEventState.EVENT_WAITING: 2>
READY = <AsynchronousEventState.READY: 0>
WAIT = <AsynchronousEventState.WAIT: 1>
__init__(self: holoscan.conditions._conditions.AsynchronousEventState, value: int) → None
property name
property value
class holoscan.conditions.BooleanCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Boolean condition.

This condition can be used as a kill switch for an operator. Once the condition is set to false, the operator will enter the NEVER scheduling status and cannot be executed again. In other words ,this condition cannot currently be used to pause and resume an operator as the operator cannot be restarted once it is in the NEVER state.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

enable_tickbool, optional

Boolean value for the condition.

namestr, optional

The name of the condition.

Attributes

<a href="#holoscan.conditions.BooleanCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.BooleanCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.BooleanCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.BooleanCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.BooleanCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.BooleanCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.BooleanCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.BooleanCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.BooleanCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.BooleanCondition.name">name</a> The name of the condition.
spec

Methods

<a href="#holoscan.conditions.BooleanCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.BooleanCondition.check_tick_enabled">check_tick_enabled</a>(self) Check whether the condition is True.
<a href="#holoscan.conditions.BooleanCondition.disable_tick">disable_tick</a>(self) Set condition to False.
<a href="#holoscan.conditions.BooleanCondition.enable_tick">enable_tick</a>(self) Set condition to True.
<a href="#holoscan.conditions.BooleanCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.BooleanCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.BooleanCondition.setup">setup</a>(self, arg0) setup method for the condition.
__init__(self: holoscan.conditions._conditions.BooleanCondition, fragment: holoscan.core._core.Fragment, enable_tick: bool = True, name: str = 'noname_boolean_condition') → None

Boolean condition.

This condition can be used as a kill switch for an operator. Once the condition is set to false, the operator will enter the NEVER scheduling status and cannot be executed again. In other words ,this condition cannot currently be used to pause and resume an operator as the operator cannot be restarted once it is in the NEVER state.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

enable_tickbool, optional

Boolean value for the condition.

namestr, optional

The name of the condition.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
check_tick_enabled(self: holoscan.conditions._conditions.BooleanCondition) → bool

Check whether the condition is True.

property description

YAML formatted string describing the condition.

disable_tick(self: holoscan.conditions._conditions.BooleanCondition) → None

Set condition to False.

enable_tick(self: holoscan.conditions._conditions.BooleanCondition) → None

Set condition to True.

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

property name

The name of the condition.

Returns
namestr
setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
class holoscan.conditions.CountCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Count condition.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

countint

The execution count value used by the condition.

namestr, optional

The name of the condition.

Attributes

<a href="#holoscan.conditions.CountCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.CountCondition.count">count</a> The execution count associated with the condition
<a href="#holoscan.conditions.CountCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.CountCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.CountCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.CountCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.CountCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.CountCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.CountCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.CountCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.CountCondition.name">name</a> The name of the condition.
spec

Methods

<a href="#holoscan.conditions.CountCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.CountCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.CountCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.CountCondition.setup">setup</a>(self, arg0) setup method for the condition.
__init__(self: holoscan.conditions._conditions.CountCondition, fragment: holoscan.core._core.Fragment, count: int = 1, name: str = 'noname_count_condition') → None

Count condition.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

countint

The execution count value used by the condition.

namestr, optional

The name of the condition.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property count

The execution count associated with the condition

property description

YAML formatted string describing the condition.

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

property name

The name of the condition.

Returns
namestr
setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
class holoscan.conditions.CudaBufferAvailableCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Condition based on data availability in a CudaBuffer object.

A component which specifies the availability of data at the receiver based on the CudaBuffers present in incoming messages.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with.

receiverstr, optional

The name of the operator’s input port to which the condition would apply.

namestr, optional

The name of the condition.

Notes

The nvidia::gxf::CudaBuffer class is currently unused by Holoscan SDK. This condition is intended exclusively for interoperation with wrapped GXF Codelets that use GXF’s CudaBuffer type.

Attributes

<a href="#holoscan.conditions.CudaBufferAvailableCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.name">name</a> The name of the condition.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.receiver">receiver</a> The receiver associated with the condition.
spec

Methods

<a href="#holoscan.conditions.CudaBufferAvailableCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.CudaBufferAvailableCondition.setup">setup</a>(self, arg0) setup method for the condition.
__init__(self: holoscan.conditions._conditions.CudaBufferAvailableCondition, fragment: holoscan.core._core.Fragment, receiver: Optional[str] = None, name: str = 'noname_cuda_buffer_available_condition') → None

Condition based on data availability in a CudaBuffer object.

A component which specifies the availability of data at the receiver based on the CudaBuffers present in incoming messages.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with.

receiverstr, optional

The name of the operator’s input port to which the condition would apply.

namestr, optional

The name of the condition.

Notes

The nvidia::gxf::CudaBuffer class is currently unused by Holoscan SDK. This condition is intended exclusively for interoperation with wrapped GXF Codelets that use GXF’s CudaBuffer type.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property description

YAML formatted string describing the condition.

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

property name

The name of the condition.

Returns
namestr
property receiver

The receiver associated with the condition.

setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
class holoscan.conditions.CudaEventCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Condition class to indicate data availability on CUDA stream completion via an event.

A condition which specifies the availability of data at the receiver on completion of the work on the provided cuda stream with the help of cuda event. This condition will keep polling on the event provided to check for data availability for consumption.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with.

event_nameevent, optional

The event name on which the cudaEventQuery API is called to get the status.

receiverstr, optional

The name of the operator’s input port to which the condition would apply.

namestr, optional

The name of the condition.

Notes

The nvidia::gxf::CudaEvent class is currently unused by Holoscan SDK. This condition is intended exclusively for interoperation with wrapped GXF Codelets that use GXF’s CudaEvent type.

Attributes

<a href="#holoscan.conditions.CudaEventCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.CudaEventCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.CudaEventCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.CudaEventCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.CudaEventCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.CudaEventCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.CudaEventCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.CudaEventCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.CudaEventCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.CudaEventCondition.name">name</a> The name of the condition.
<a href="#holoscan.conditions.CudaEventCondition.receiver">receiver</a> The receiver associated with the condition.
spec

Methods

<a href="#holoscan.conditions.CudaEventCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.CudaEventCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.CudaEventCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.CudaEventCondition.setup">setup</a>(self, arg0) setup method for the condition.
__init__(self: holoscan.conditions._conditions.CudaEventCondition, fragment: holoscan.core._core.Fragment, event_name: str = '', receiver: Optional[str] = None, name: str = 'noname_cuda_event_condition') → None

Condition class to indicate data availability on CUDA stream completion via an event.

A condition which specifies the availability of data at the receiver on completion of the work on the provided cuda stream with the help of cuda event. This condition will keep polling on the event provided to check for data availability for consumption.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with.

event_nameevent, optional

The event name on which the cudaEventQuery API is called to get the status.

receiverstr, optional

The name of the operator’s input port to which the condition would apply.

namestr, optional

The name of the condition.

Notes

The nvidia::gxf::CudaEvent class is currently unused by Holoscan SDK. This condition is intended exclusively for interoperation with wrapped GXF Codelets that use GXF’s CudaEvent type.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property description

YAML formatted string describing the condition.

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

property name

The name of the condition.

Returns
namestr
property receiver

The receiver associated with the condition.

setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
class holoscan.conditions.CudaStreamCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Condition class to indicate data availability on CUDA stream completion.

This condition will register a callback function which will be called once the work on the specified CUDA stream completes indicating that the data is available for consumption.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with.

receiverstr, optional

The name of the operator’s input port to which the condition would apply.

namestr, optional

The name of the condition.

Attributes

<a href="#holoscan.conditions.CudaStreamCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.CudaStreamCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.CudaStreamCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.CudaStreamCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.CudaStreamCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.CudaStreamCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.CudaStreamCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.CudaStreamCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.CudaStreamCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.CudaStreamCondition.name">name</a> The name of the condition.
<a href="#holoscan.conditions.CudaStreamCondition.receiver">receiver</a> The receiver associated with the condition.
spec

Methods

<a href="#holoscan.conditions.CudaStreamCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.CudaStreamCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.CudaStreamCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.CudaStreamCondition.setup">setup</a>(self, arg0) setup method for the condition.
__init__(self: holoscan.conditions._conditions.CudaStreamCondition, fragment: holoscan.core._core.Fragment, receiver: Optional[str] = None, name: str = 'noname_cuda_stream_condition') → None

Condition class to indicate data availability on CUDA stream completion.

This condition will register a callback function which will be called once the work on the specified CUDA stream completes indicating that the data is available for consumption.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with.

receiverstr, optional

The name of the operator’s input port to which the condition would apply.

namestr, optional

The name of the condition.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property description

YAML formatted string describing the condition.

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

property name

The name of the condition.

Returns
namestr
property receiver

The receiver associated with the condition.

setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
class holoscan.conditions.DownstreamMessageAffordableCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Condition that permits execution when the downstream operator can accept new messages.

Satisfied when the receiver queue of any connected downstream operators has at least a certain number of elements free. The minimum number of messages that permits the execution of the entity is specified by min_size. It can be used for operators to prevent operators from sending a message when the downstream operator is not ready to receive it.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

min_sizeint

The minimum number of free slots present in the back buffer.

transmitterstr, optional

The name of the operator’s output port to which the condition would apply.

namestr, optional

The name of the condition.

Notes

This condition is typically set within the Operator.setup method using the IOSpec.condition method with ConditionType.DOWNSTREAM_MESSAGE_AFFORDABLE. In that case, the transmitter name is already known from the port corresponding to the IOSpec object, so the “transmitter” argument is not needed.

Attributes

<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.min_size">min_size</a> The minimum number of free slots required for the downstream entity's back buffer.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.name">name</a> The name of the condition.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.transmitter">transmitter</a> The transmitter associated with the condition.
spec

Methods

<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.DownstreamMessageAffordableCondition.setup">setup</a>(self, arg0) setup method for the condition.
__init__(self: holoscan.conditions._conditions.DownstreamMessageAffordableCondition, fragment: holoscan.core._core.Fragment, min_size: int = 1, transmitter: Optional[str] = None, name: str = 'noname_downstream_affordable_condition') → None

Condition that permits execution when the downstream operator can accept new messages.

Satisfied when the receiver queue of any connected downstream operators has at least a certain number of elements free. The minimum number of messages that permits the execution of the entity is specified by min_size. It can be used for operators to prevent operators from sending a message when the downstream operator is not ready to receive it.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

min_sizeint

The minimum number of free slots present in the back buffer.

transmitterstr, optional

The name of the operator’s output port to which the condition would apply.

namestr, optional

The name of the condition.

Notes

This condition is typically set within the Operator.setup method using the IOSpec.condition method with ConditionType.DOWNSTREAM_MESSAGE_AFFORDABLE. In that case, the transmitter name is already known from the port corresponding to the IOSpec object, so the “transmitter” argument is not needed.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property description

YAML formatted string describing the condition.

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

property min_size

The minimum number of free slots required for the downstream entity’s back buffer.

property name

The name of the condition.

Returns
namestr
setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
property transmitter

The transmitter associated with the condition.

class holoscan.conditions.ExpiringMessageAvailableCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Condition that tries to wait for specified number of messages in receiver. When the first message in the queue mature after specified delay since arrival it would fire regardless.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

max_batch_sizeint

The maximum number of messages to be batched together.

max_delay_ns: int or datetime.timedelta

The maximum delay to wait from the time of the first message before submitting the workload anyway. If an int is provided, the value must be in nanoseconds. Any provided datetime.timedelta value will be converted internally to the corresponding number of nanoseconds to wait.

clockholoscan.resources.Clock or None, optional

The clock used by the scheduler to define the flow of time. If None, a default-constructed holoscan.resources.RealtimeClock will be used.

receiverstr, optional

The name of the operator’s input port to which the condition would apply.

namestr, optional

The name of the condition.

Notes

This condition is typically set within the Operator.setup method using the IOSpec.condition method with ConditionType.EXPIRING_MESSAGE_AVAILABLE. In that case, the receiver name is already known from the port corresponding to the IOSpec object, so the “receiver” argument is unnecessary.

The max_delay_ns used by this condition type is relative to the timestamp of the oldest message in the receiver queue. Use of this condition requires that the upstream operator emitted a timestamp for at least one message in the queue. Holoscan Operators do not emit a timestamp by default, but only when it is explicitly requested in the Operator::emit call. The built-in operators of the SDK do not currently emit a timestamp, so this condition cannot be easily used with the provided operators. As a potential alternative, please see MultiMessageAvailableTimeoutCondition which can be configured to use a single port and a timeout interval without needing a timestamp. A timestamp is not needed in the case of MultiMessageAvailableTimeoutCondition because the interval measured is the time since the same operator previously ticked.

Attributes

<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.max_batch_size">max_batch_size</a> The maximum number of messages to be batched together.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.name">name</a> The name of the condition.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.receiver">receiver</a> The receiver associated with the condition.
spec

Methods

<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.max_delay">max_delay</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.max_delay_ns">max_delay_ns</a>(self) The maximum delay from first message to wait before submitting workload anyway.
<a href="#holoscan.conditions.ExpiringMessageAvailableCondition.setup">setup</a>(self, arg0) setup method for the condition.
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: holoscan.conditions._conditions.ExpiringMessageAvailableCondition, fragment: holoscan.core._core.Fragment, max_batch_size: int, max_delay_ns: int, clock: holoscan.resources._resources.Clock = None, receiver: Optional[str] = None, name: str = ‘noname_expiring_message_available_condition’) -> None

  2. __init__(self: holoscan.conditions._conditions.ExpiringMessageAvailableCondition, fragment: holoscan.core._core.Fragment, max_batch_size: int, max_delay_ns: datetime.timedelta, clock: holoscan.resources._resources.Clock = None, receiver: Optional[str] = None, name: str = ‘noname_expiring_message_available_condition’) -> None

Condition that tries to wait for specified number of messages in receiver. When the first message in the queue mature after specified delay since arrival it would fire regardless.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

max_batch_sizeint

The maximum number of messages to be batched together.

max_delay_ns: int or datetime.timedelta

The maximum delay to wait from the time of the first message before submitting the workload anyway. If an int is provided, the value must be in nanoseconds. Any provided datetime.timedelta value will be converted internally to the corresponding number of nanoseconds to wait.

clockholoscan.resources.Clock or None, optional

The clock used by the scheduler to define the flow of time. If None, a default-constructed holoscan.resources.RealtimeClock will be used.

receiverstr, optional

The name of the operator’s input port to which the condition would apply.

namestr, optional

The name of the condition.

Notes

This condition is typically set within the Operator.setup method using the IOSpec.condition method with ConditionType.EXPIRING_MESSAGE_AVAILABLE. In that case, the receiver name is already known from the port corresponding to the IOSpec object, so the “receiver” argument is unnecessary.

The max_delay_ns used by this condition type is relative to the timestamp of the oldest message in the receiver queue. Use of this condition requires that the upstream operator emitted a timestamp for at least one message in the queue. Holoscan Operators do not emit a timestamp by default, but only when it is explicitly requested in the Operator::emit call. The built-in operators of the SDK do not currently emit a timestamp, so this condition cannot be easily used with the provided operators. As a potential alternative, please see MultiMessageAvailableTimeoutCondition which can be configured to use a single port and a timeout interval without needing a timestamp. A timestamp is not needed in the case of MultiMessageAvailableTimeoutCondition because the interval measured is the time since the same operator previously ticked.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property description

YAML formatted string describing the condition.

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

property max_batch_size

The maximum number of messages to be batched together.

max_delay(*args, **kwargs)

Overloaded function.

  1. max_delay(self: holoscan.conditions._conditions.ExpiringMessageAvailableCondition, arg0: int) -> None

The maximum delay from first message to wait before submitting workload anyway.

  1. max_delay(self: holoscan.conditions._conditions.ExpiringMessageAvailableCondition, arg0: datetime.timedelta) -> None

The maximum delay from first message to wait before submitting workload anyway.

max_delay_ns(self: holoscan.conditions._conditions.ExpiringMessageAvailableCondition) → int

The maximum delay from first message to wait before submitting workload anyway.

property name

The name of the condition.

Returns
namestr
property receiver

The receiver associated with the condition.

setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
class holoscan.conditions.MessageAvailableCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Condition that permits execution when an upstream message is available.

Satisfied when the associated receiver queue has at least a certain number of elements. The receiver is specified using the receiver parameter of the scheduling term. The minimum number of messages that permits the execution of the entity is specified by min_size. An optional parameter for this scheduling term is front_stage_max_size, the maximum front stage message count. If this parameter is set, the scheduling term will only allow execution if the number of messages in the queue does not exceed this count. It can be used for operators which do not consume all messages from the queue.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

min_sizeint

The total number of messages over a set of input channels needed to permit execution.

front_stage_max_sizeint

Threshold for the number of front stage messages. Execution is only allowed if the number of front stage messages does not exceed this count.

receiverstr, optional

The name of the operator’s input port to which the condition would apply.

namestr, optional

The name of the condition.

Notes

This condition is typically set within the Operator.setup method using the IOSpec.condition method with ConditionType.MESSAGE_AVAILABLE. In that case, the receiver name is already known from the port corresponding to the IOSpec object, so the “receiver” argument is unnecessary.

Attributes

<a href="#holoscan.conditions.MessageAvailableCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.MessageAvailableCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.MessageAvailableCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.MessageAvailableCondition.front_stage_max_size">front_stage_max_size</a> Threshold for the number of front stage messages.
<a href="#holoscan.conditions.MessageAvailableCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.MessageAvailableCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.MessageAvailableCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.MessageAvailableCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.MessageAvailableCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.MessageAvailableCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.MessageAvailableCondition.min_size">min_size</a> The total number of messages over a set of input channels needed to permit execution.
<a href="#holoscan.conditions.MessageAvailableCondition.name">name</a> The name of the condition.
<a href="#holoscan.conditions.MessageAvailableCondition.receiver">receiver</a> The receiver associated with the condition.
spec

Methods

<a href="#holoscan.conditions.MessageAvailableCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.MessageAvailableCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.MessageAvailableCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.MessageAvailableCondition.setup">setup</a>(self, arg0) setup method for the condition.
__init__(self: holoscan.conditions._conditions.MessageAvailableCondition, fragment: holoscan.core._core.Fragment, min_size: int = 1, front_stage_max_size: int = 1, receiver: Optional[str] = None, name: str = 'noname_message_available_condition') → None

Condition that permits execution when an upstream message is available.

Satisfied when the associated receiver queue has at least a certain number of elements. The receiver is specified using the receiver parameter of the scheduling term. The minimum number of messages that permits the execution of the entity is specified by min_size. An optional parameter for this scheduling term is front_stage_max_size, the maximum front stage message count. If this parameter is set, the scheduling term will only allow execution if the number of messages in the queue does not exceed this count. It can be used for operators which do not consume all messages from the queue.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

min_sizeint

The total number of messages over a set of input channels needed to permit execution.

front_stage_max_sizeint

Threshold for the number of front stage messages. Execution is only allowed if the number of front stage messages does not exceed this count.

receiverstr, optional

The name of the operator’s input port to which the condition would apply.

namestr, optional

The name of the condition.

Notes

This condition is typically set within the Operator.setup method using the IOSpec.condition method with ConditionType.MESSAGE_AVAILABLE. In that case, the receiver name is already known from the port corresponding to the IOSpec object, so the “receiver” argument is unnecessary.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property description

YAML formatted string describing the condition.

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property front_stage_max_size

Threshold for the number of front stage messages. Execution is only allowed if the number of front stage messages does not exceed this count.

property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

property min_size

The total number of messages over a set of input channels needed to permit execution.

property name

The name of the condition.

Returns
namestr
property receiver

The receiver associated with the condition.

setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
class holoscan.conditions.MultiMessageAvailableCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Condition that checks the number of messages available across multiple inputs.

This condition is used to check if a sufficient number of messages are available across multiple input ports. It can operator in one of two modes:

  1. SUM_OF_ALL: The condition checks if the sum of messages available across all input ports

is greater than or equal to a given threshold. For this mode, min_sum should be specified.

  1. PER_RECEIVER: The condition checks if the number of messages available at each input

port is greater than or equal to a given threshold. For this mode, min_sizes should be specified.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

sampling_mode{“SumOfAll”, “PerReceiver”} or MultiMessageAvailableCondition.SamplingMode, optional

The sampling method to use when checking for messages in receiver queues.

min_sumint, optional

The condition permits execution if the sum of message counts of all receivers has at least the given number of messages available. This option is only intended for use with “SumOfAll” sampling_mode.

min_sizeslist of int, optional

The condition permits execution if all given receivers have at least the given number of messages available in this list. This option is only intended for use with “PerReceiver” sampling_mode. The length of min_sizes must match the number of receivers associated with the condition.

namestr, optional

The name of the condition.

Notes

This condition is typically set via the Operator.multi_port_condition method using ConditionType.MULTI_MESSAGE_AVAILABLE. The “receivers” argument must be set based on the input port names as described in the “Parameters” section.

Attributes

<a href="#holoscan.conditions.MultiMessageAvailableCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.min_sizes">min_sizes</a> Get the minimum number of messages that permits the execution of the entity.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.min_sum">min_sum</a> The total number of messages that permits the execution of the entity.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.name">name</a> The name of the condition.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.receivers">receivers</a> The receivers associated with the condition.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.sampling_mode">sampling_mode</a> The sampling mode for the condition.
spec

Methods

<a href="#holoscan.conditions.MultiMessageAvailableCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.add_min_size">add_min_size</a>(self, value) Append an integer value to the min_sizes vector.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.MultiMessageAvailableCondition.setup">setup</a>(self, arg0) setup method for the condition.
SamplingMode
class SamplingMode

Bases: pybind11_builtins.pybind11_object

Members:

SUM_OF_ALL

PER_RECEIVER

Attributes

<a href="#holoscan.conditions.MultiMessageAvailableCondition.SamplingMode.name">name</a>

value
PER_RECEIVER = <SamplingMode.PER_RECEIVER: 1>
SUM_OF_ALL = <SamplingMode.SUM_OF_ALL: 0>
__init__(self: holoscan.conditions._conditions.MultiMessageAvailableCondition.SamplingMode, value: int) → None
property name
property value
__init__(self: holoscan.conditions._conditions.MultiMessageAvailableCondition, fragment: holoscan.core._core.Fragment, sampling_mode: Union[holoscan.conditions._conditions.MultiMessageAvailableCondition.SamplingMode, str] = <SamplingMode.SUM_OF_ALL: 0>, min_sum: Optional[int] = None, min_sizes: Optional[list[int]] = None, name: str = 'multi_message_condition') → None

Condition that checks the number of messages available across multiple inputs.

This condition is used to check if a sufficient number of messages are available across multiple input ports. It can operator in one of two modes:

  1. SUM_OF_ALL: The condition checks if the sum of messages available across all input ports

is greater than or equal to a given threshold. For this mode, min_sum should be specified.

  1. PER_RECEIVER: The condition checks if the number of messages available at each input

port is greater than or equal to a given threshold. For this mode, min_sizes should be specified.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

sampling_mode{“SumOfAll”, “PerReceiver”} or MultiMessageAvailableCondition.SamplingMode, optional

The sampling method to use when checking for messages in receiver queues.

min_sumint, optional

The condition permits execution if the sum of message counts of all receivers has at least the given number of messages available. This option is only intended for use with “SumOfAll” sampling_mode.

min_sizeslist of int, optional

The condition permits execution if all given receivers have at least the given number of messages available in this list. This option is only intended for use with “PerReceiver” sampling_mode. The length of min_sizes must match the number of receivers associated with the condition.

namestr, optional

The name of the condition.

Notes

This condition is typically set via the Operator.multi_port_condition method using ConditionType.MULTI_MESSAGE_AVAILABLE. The “receivers” argument must be set based on the input port names as described in the “Parameters” section.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

add_min_size(self: holoscan.conditions._conditions.MultiMessageAvailableCondition, value: int) → None

Append an integer value to the min_sizes vector.

Parameters
valueint

The value to append to the min_sizes vector.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property description

YAML formatted string describing the condition.

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

property min_sizes

Get the minimum number of messages that permits the execution of the entity. There is one value per receiver associated with this condition. This parameter is only used when sampling_mode is set to MultiMessageAvailableCondition.SamplingMode.PER_RECEIVER; otherwise, it is ignored.

property min_sum

The total number of messages that permits the execution of the entity. This total is over all receivers associated with this condition. This parameter is only used when sampling_mode is set to MultiMessageAvailableCondition.SamplingMode.SUM_OF_ALL; otherwise, it is ignored.

property name

The name of the condition.

Returns
namestr
property receivers

The receivers associated with the condition.

property sampling_mode

The sampling mode for the condition. This parameter determines how the minimum number of messages is calculated. The two possible values are: MultiMessageAvailableCondition.SamplingMode.SUM_OF_ALL and MultiMessageAvailableCondition.SamplingMode.PER_RECEIVER.

setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
class holoscan.conditions.MultiMessageAvailableTimeoutCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Condition that checks the number of messages available across multiple inputs.

This condition is used to check if a sufficient number of messages are available across multiple input ports. It can operator in one of two modes:

  1. SUM_OF_ALL: The condition checks if the sum of messages available across all input ports

is greater than or equal to a given threshold. For this mode, min_sum should be specified.

  1. PER_RECEIVER: The condition checks if the number of messages available at each input

port is greater than or equal to a given threshold. For this mode, min_sizes should be specified.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

execution_frequencystd::string

The ‘execution frequency’ indicates the amount of time after which the entity will be allowed to execute again, even if the specified number of messages have not yet been received. The period is specified as a string containing of a number and an (optional) unit. If no unit is given the value is assumed to be in nanoseconds. Supported units are: Hz, s, ms. Examples: “10ms”, “10000000”, “0.2s”, “50Hz”.

sampling_mode{“SumOfAll”, “PerReceiver”} or MultiMessageAvailableTimeoutCondition.SamplingMode, optional

The sampling method to use when checking for messages in receiver queues.

min_sumint, optional

The condition permits execution if the sum of message counts of all receivers has at least the given number of messages available. This option is only intended for use with “SumOfAll” sampling_mode.

min_sizeslist of int, optional

The condition permits execution if all given receivers have at least the given number of messages available in this list. This option is only intended for use with “PerReceiver” sampling_mode. The length of min_sizes must match the number of receivers associated with the condition.

namestr, optional

The name of the condition.

Notes

This condition is typically set via the Operator.multi_port_condition method using ConditionType.MULTI_MESSAGE_AVAILABLE_TIMEOUT. The “receivers” argument must be set based on the input port names as described in the “Parameters” section.

This condition can also be used on a single port as a way to have a message-available condition that also supports a timeout interval. For this single input port use case, the condition can be added within Operator.setup using the IOSpec.condition method with condition type ConditionType.MULTI_MESSAGE_AVAILABLE_TIMEOUT. In this case, the input port is already known from the IOSpec object, so the “receivers” argument is unnecessary.

Attributes

<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.name">name</a> The name of the condition.
spec

Methods

<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.setup">setup</a>(self, arg0) setup method for the condition.
SamplingMode
class SamplingMode

Bases: pybind11_builtins.pybind11_object

Members:

SUM_OF_ALL

PER_RECEIVER

Attributes

<a href="#holoscan.conditions.MultiMessageAvailableTimeoutCondition.SamplingMode.name">name</a>

value
PER_RECEIVER = <SamplingMode.PER_RECEIVER: 1>
SUM_OF_ALL = <SamplingMode.SUM_OF_ALL: 0>
__init__(self: holoscan.conditions._conditions.MultiMessageAvailableCondition.SamplingMode, value: int) → None
property name
property value
__init__(self: holoscan.conditions._conditions.MultiMessageAvailableTimeoutCondition, fragment: holoscan.core._core.Fragment, execution_frequency: str, sampling_mode: Union[holoscan.conditions._conditions.MultiMessageAvailableCondition.SamplingMode, str] = <SamplingMode.SUM_OF_ALL: 0>, min_sum: Optional[int] = None, min_sizes: Optional[list[int]] = None, name: str = 'multi_message_timeout_condition') → None

Condition that checks the number of messages available across multiple inputs.

This condition is used to check if a sufficient number of messages are available across multiple input ports. It can operator in one of two modes:

  1. SUM_OF_ALL: The condition checks if the sum of messages available across all input ports

is greater than or equal to a given threshold. For this mode, min_sum should be specified.

  1. PER_RECEIVER: The condition checks if the number of messages available at each input

port is greater than or equal to a given threshold. For this mode, min_sizes should be specified.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

execution_frequencystd::string

The ‘execution frequency’ indicates the amount of time after which the entity will be allowed to execute again, even if the specified number of messages have not yet been received. The period is specified as a string containing of a number and an (optional) unit. If no unit is given the value is assumed to be in nanoseconds. Supported units are: Hz, s, ms. Examples: “10ms”, “10000000”, “0.2s”, “50Hz”.

sampling_mode{“SumOfAll”, “PerReceiver”} or MultiMessageAvailableTimeoutCondition.SamplingMode, optional

The sampling method to use when checking for messages in receiver queues.

min_sumint, optional

The condition permits execution if the sum of message counts of all receivers has at least the given number of messages available. This option is only intended for use with “SumOfAll” sampling_mode.

min_sizeslist of int, optional

The condition permits execution if all given receivers have at least the given number of messages available in this list. This option is only intended for use with “PerReceiver” sampling_mode. The length of min_sizes must match the number of receivers associated with the condition.

namestr, optional

The name of the condition.

Notes

This condition is typically set via the Operator.multi_port_condition method using ConditionType.MULTI_MESSAGE_AVAILABLE_TIMEOUT. The “receivers” argument must be set based on the input port names as described in the “Parameters” section.

This condition can also be used on a single port as a way to have a message-available condition that also supports a timeout interval. For this single input port use case, the condition can be added within Operator.setup using the IOSpec.condition method with condition type ConditionType.MULTI_MESSAGE_AVAILABLE_TIMEOUT. In this case, the input port is already known from the IOSpec object, so the “receivers” argument is unnecessary.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property description

YAML formatted string describing the condition.

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

property name

The name of the condition.

Returns
namestr
setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
class holoscan.conditions.PeriodicCondition

Bases: <a href="holoscan_python_api_gxf.html#holoscan.gxf.GXFCondition">holoscan.gxf._gxf.GXFCondition</a>

Condition class to support periodic execution of operators. The recess (pause) period indicates the minimum amount of time that must elapse before the compute() method can be executed again. The recess period can be specified as an integer value in nanoseconds.

For example: 1000 for 1 microsecond 1000000 for 1 millisecond, and 10000000000 for 1 second.

The recess (pause) period can also be specified as a datetime.timedelta object representing a duration. (see https://docs.python.org/3/library/datetime.html#timedelta-objects)

For example: datetime.timedelta(minutes=1), datetime.timedelta(seconds=1), datetime.timedelta(milliseconds=1) and datetime.timedelta(microseconds=1). Supported argument names are: weeks| days | hours | minutes | seconds | millisecons | microseconds This requires import datetime.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

recess_periodint or datetime.timedelta

The recess (pause) period value used by the condition. If an integer is provided, the units are in nanoseconds.

namestr, optional

The name of the condition.

Attributes

<a href="#holoscan.conditions.PeriodicCondition.args">args</a> The list of arguments associated with the component.
<a href="#holoscan.conditions.PeriodicCondition.description">description</a> YAML formatted string describing the condition.
<a href="#holoscan.conditions.PeriodicCondition.fragment">fragment</a> Fragment that the condition belongs to.
<a href="#holoscan.conditions.PeriodicCondition.gxf_cid">gxf_cid</a> The GXF component ID.
<a href="#holoscan.conditions.PeriodicCondition.gxf_cname">gxf_cname</a> The name of the component.
<a href="#holoscan.conditions.PeriodicCondition.gxf_context">gxf_context</a> The GXF context of the component.
<a href="#holoscan.conditions.PeriodicCondition.gxf_eid">gxf_eid</a> The GXF entity ID.
<a href="#holoscan.conditions.PeriodicCondition.gxf_typename">gxf_typename</a> The GXF type name of the component.
<a href="#holoscan.conditions.PeriodicCondition.id">id</a> The identifier of the component.
<a href="#holoscan.conditions.PeriodicCondition.name">name</a> The name of the condition.
spec

Methods

<a href="#holoscan.conditions.PeriodicCondition.add_arg">add_arg</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.PeriodicCondition.gxf_initialize">gxf_initialize</a>(self) Initialize the component.
<a href="#holoscan.conditions.PeriodicCondition.initialize">initialize</a>(self) initialization method for the condition.
<a href="#holoscan.conditions.PeriodicCondition.last_run_timestamp">last_run_timestamp</a>(self) Gets the integer representing the last run time stamp.
<a href="#holoscan.conditions.PeriodicCondition.recess_period">recess_period</a>(*args, **kwargs) Overloaded function.
<a href="#holoscan.conditions.PeriodicCondition.recess_period_ns">recess_period_ns</a>(self) Gets the recess (pause) period value in nanoseconds.
<a href="#holoscan.conditions.PeriodicCondition.setup">setup</a>(self, arg0) setup method for the condition.
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: holoscan.conditions._conditions.PeriodicCondition, fragment: holoscan.core._core.Fragment, recess_period: int, name: str = ‘noname_periodic_condition’) -> None

  2. __init__(self: holoscan.conditions._conditions.PeriodicCondition, fragment: holoscan.core._core.Fragment, recess_period: datetime.timedelta, name: str = ‘noname_periodic_condition’) -> None

Condition class to support periodic execution of operators. The recess (pause) period indicates the minimum amount of time that must elapse before the compute() method can be executed again. The recess period can be specified as an integer value in nanoseconds.

For example: 1000 for 1 microsecond 1000000 for 1 millisecond, and 10000000000 for 1 second.

The recess (pause) period can also be specified as a datetime.timedelta object representing a duration. (see https://docs.python.org/3/library/datetime.html#timedelta-objects)

For example: datetime.timedelta(minutes=1), datetime.timedelta(seconds=1), datetime.timedelta(milliseconds=1) and datetime.timedelta(microseconds=1). Supported argument names are: weeks| days | hours | minutes | seconds | millisecons | microseconds This requires import datetime.

Parameters
fragmentholoscan.core.Fragment

The fragment the condition will be associated with

recess_periodint or datetime.timedelta

The recess (pause) period value used by the condition. If an integer is provided, the units are in nanoseconds.

namestr, optional

The name of the condition.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property description

YAML formatted string describing the condition.

property fragment

Fragment that the condition belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Condition) → None

initialization method for the condition.

last_run_timestamp(self: holoscan.conditions._conditions.PeriodicCondition) → int

Gets the integer representing the last run time stamp.

property name

The name of the condition.

Returns
namestr
recess_period(*args, **kwargs)

Overloaded function.

  1. recess_period(self: holoscan.conditions._conditions.PeriodicCondition, arg0: int) -> None

Sets the recess (pause) period associated with the condition. The recess period can be specified as an integer value in nanoseconds or a datetime.timedelta object representing a duration.

  1. recess_period(self: holoscan.conditions._conditions.PeriodicCondition, arg0: datetime.timedelta) -> None

Sets the recess (pause) period associated with the condition. The recess period can be specified as an integer value in nanoseconds or a datetime.timedelta object representing a duration.

recess_period_ns(self: holoscan.conditions._conditions.PeriodicCondition) → int

Gets the recess (pause) period value in nanoseconds.

setup(self: holoscan.core._core.Condition, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the condition.

property spec
Previous Holoscan Python API
Next holoscan.core
© Copyright 2022-2024, NVIDIA. Last updated on Jan 2, 2025.