holoscan.gxf
This module provides a Python API for GXF base classes in the C++ API.
<a href="#holoscan.gxf.Entity">holoscan.gxf.Entity</a> |
alias of holoscan.gxf._gxf.PyEntity |
<a href="#holoscan.gxf.GXFComponent">holoscan.gxf.GXFComponent</a> |
Base GXF-based component class. |
<a href="#holoscan.gxf.GXFCondition">holoscan.gxf.GXFCondition</a> |
Base GXF-based condition class. |
<a href="#holoscan.gxf.GXFExecutionContext">holoscan.gxf.GXFExecutionContext</a> |
GXF execution context. |
<a href="#holoscan.gxf.GXFInputContext">holoscan.gxf.GXFInputContext</a> |
GXF input context. |
<a href="#holoscan.gxf.GXFNetworkContext">holoscan.gxf.GXFNetworkContext</a> |
Base GXF-based network context class. |
<a href="#holoscan.gxf.GXFOperator">holoscan.gxf.GXFOperator</a> |
Base GXF-based operator class. |
<a href="#holoscan.gxf.GXFOutputContext">holoscan.gxf.GXFOutputContext</a> |
GXF output context. |
<a href="#holoscan.gxf.GXFResource">holoscan.gxf.GXFResource</a> |
Base GXF-based resource class. |
<a href="#holoscan.gxf.GXFScheduler">holoscan.gxf.GXFScheduler</a> |
Base GXF-based scheduler class. |
- holoscan.gxf.Entity
alias of
holoscan.gxf._gxf.PyEntity
- class holoscan.gxf.GXFComponent
Bases:
pybind11_builtins.pybind11_object
Base GXF-based component class.
Attributes
<a href="#holoscan.gxf.GXFComponent.gxf_cid">gxf_cid</a>
The GXF component ID. <a href="#holoscan.gxf.GXFComponent.gxf_cname">gxf_cname</a>
The name of the component. <a href="#holoscan.gxf.GXFComponent.gxf_context">gxf_context</a>
The GXF context of the component. <a href="#holoscan.gxf.GXFComponent.gxf_eid">gxf_eid</a>
The GXF entity ID. Methods
<a href="#holoscan.gxf.GXFComponent.gxf_initialize">gxf_initialize</a>
(self)Initialize the component. - __init__(self: holoscan.gxf._gxf.GXFComponent) → None
Base GXF-based component class.
- 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.
- class holoscan.gxf.GXFCondition
Bases:
<a href="holoscan_python_api_core.html#holoscan.core.Condition">holoscan.core._core.Condition</a>
,<a href="#holoscan.gxf.GXFComponent">holoscan.gxf._gxf.GXFComponent</a>
Base GXF-based condition class.
Attributes
<a href="#holoscan.gxf.GXFCondition.args">args</a>
The list of arguments associated with the component. <a href="#holoscan.gxf.GXFCondition.description">description</a>
YAML formatted string describing the condition. <a href="#holoscan.gxf.GXFCondition.fragment">fragment</a>
Fragment that the condition belongs to. <a href="#holoscan.gxf.GXFCondition.gxf_cid">gxf_cid</a>
The GXF component ID. <a href="#holoscan.gxf.GXFCondition.gxf_cname">gxf_cname</a>
The name of the component. <a href="#holoscan.gxf.GXFCondition.gxf_context">gxf_context</a>
The GXF context of the component. <a href="#holoscan.gxf.GXFCondition.gxf_eid">gxf_eid</a>
The GXF entity ID. <a href="#holoscan.gxf.GXFCondition.id">id</a>
The identifier of the component. <a href="#holoscan.gxf.GXFCondition.name">name</a>
The name of the condition. spec Methods
<a href="#holoscan.gxf.GXFCondition.add_arg">add_arg</a>
(*args, **kwargs)Overloaded function. <a href="#holoscan.gxf.GXFCondition.gxf_initialize">gxf_initialize</a>
(self)Initialize the component. <a href="#holoscan.gxf.GXFCondition.initialize">initialize</a>
(self)Initialize the component. <a href="#holoscan.gxf.GXFCondition.setup">setup</a>
(self, arg0)setup method for the condition. - __init__(self: holoscan.gxf._gxf.GXFCondition) → None
Base GXF-based condition class.
- add_arg(*args, **kwargs)
Overloaded function.
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
Add an argument to the component.
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 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.gxf._gxf.GXFCondition) → None
Initialize the component.
- 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.gxf.GXFExecutionContext
Bases:
<a href="holoscan_python_api_core.html#holoscan.core.ExecutionContext">holoscan.core._core.ExecutionContext</a>
GXF execution context.
- __init__(self: holoscan.gxf._gxf.GXFExecutionContext, context: capsule, op: holoscan.gxf._gxf.GXFOperator) → None
Execution context for an operator using GXF.
- Parameters
- opholoscan.gxf.GXFOperator
The GXF operator that owns this context.
- class holoscan.gxf.GXFInputContext
Bases:
<a href="holoscan_python_api_core.html#holoscan.core.InputContext">holoscan.core._core.InputContext</a>
GXF input context.
Methods
<a href="#holoscan.gxf.GXFInputContext.receive">receive</a>
(self, name)- __init__(self: holoscan.gxf._gxf.GXFInputContext, context: holoscan.core._core.ExecutionContext, op: holoscan.gxf._gxf.GXFOperator) → None
GXF input context.
- Parameters
- opholoscan.gxf.GXFOperator
The GXF operator that owns this context.
- receive(self: holoscan.core._core.InputContext, name: str) → None
- class holoscan.gxf.GXFNetworkContext
Bases:
<a href="holoscan_python_api_core.html#holoscan.core.NetworkContext">holoscan.core._core.NetworkContext</a>
,<a href="#holoscan.gxf.GXFComponent">holoscan.gxf._gxf.GXFComponent</a>
Base GXF-based network context class.
Attributes
<a href="#holoscan.gxf.GXFNetworkContext.args">args</a>
The list of arguments associated with the component. <a href="#holoscan.gxf.GXFNetworkContext.description">description</a>
YAML formatted string describing the component. <a href="#holoscan.gxf.GXFNetworkContext.fragment">fragment</a>
Fragment that the network context belongs to. <a href="#holoscan.gxf.GXFNetworkContext.gxf_cid">gxf_cid</a>
The GXF component ID. <a href="#holoscan.gxf.GXFNetworkContext.gxf_cname">gxf_cname</a>
The name of the component. <a href="#holoscan.gxf.GXFNetworkContext.gxf_context">gxf_context</a>
The GXF context of the component. <a href="#holoscan.gxf.GXFNetworkContext.gxf_eid">gxf_eid</a>
The GXF entity ID. <a href="#holoscan.gxf.GXFNetworkContext.id">id</a>
The identifier of the component. <a href="#holoscan.gxf.GXFNetworkContext.name">name</a>
The name of the network context. spec Methods
<a href="#holoscan.gxf.GXFNetworkContext.add_arg">add_arg</a>
(*args, **kwargs)Overloaded function. <a href="#holoscan.gxf.GXFNetworkContext.gxf_initialize">gxf_initialize</a>
(self)Initialize the component. <a href="#holoscan.gxf.GXFNetworkContext.initialize">initialize</a>
(self)Initialize the network context. <a href="#holoscan.gxf.GXFNetworkContext.setup">setup</a>
(self, arg0)setup method for the network context. - __init__(*args, **kwargs)
- add_arg(*args, **kwargs)
Overloaded function.
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
Add an argument to the component.
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 component.
- property fragment
Fragment that the network context 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 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.gxf._gxf.GXFNetworkContext) → None
Initialize the network context.
- property name
The name of the network context.
- Returns
- namestr
- setup(self: holoscan.core._core.NetworkContext, arg0: holoscan.core._core.ComponentSpec) → None
setup method for the network context.
- property spec
- class holoscan.gxf.GXFOperator
Bases:
holoscan.core._core.Operator
Base GXF-based operator class.
Attributes
<a href="#holoscan.gxf.GXFOperator.args">args</a>
The list of arguments associated with the component. <a href="#holoscan.gxf.GXFOperator.conditions">conditions</a>
Conditions associated with the operator. <a href="#holoscan.gxf.GXFOperator.description">description</a>
YAML formatted string describing the operator. <a href="#holoscan.gxf.GXFOperator.fragment">fragment</a>
The fragment ( holoscan.core.Fragment
) that the operator belongs to.<a href="#holoscan.gxf.GXFOperator.gxf_cid">gxf_cid</a>
The GXF component ID. <a href="#holoscan.gxf.GXFOperator.gxf_context">gxf_context</a>
The GXF context of the component. <a href="#holoscan.gxf.GXFOperator.gxf_eid">gxf_eid</a>
The GXF entity ID. <a href="#holoscan.gxf.GXFOperator.id">id</a>
The identifier of the component. <a href="#holoscan.gxf.GXFOperator.name">name</a>
The name of the operator. <a href="#holoscan.gxf.GXFOperator.operator_type">operator_type</a>
The operator type. <a href="#holoscan.gxf.GXFOperator.resources">resources</a>
Resources associated with the operator. <a href="#holoscan.gxf.GXFOperator.spec">spec</a>
The operator spec ( holoscan.core.OperatorSpec
) associated with the operator.Methods
<a href="#holoscan.gxf.GXFOperator.add_arg">add_arg</a>
(*args, **kwargs)Overloaded function. <a href="#holoscan.gxf.GXFOperator.compute">compute</a>
(self, arg0, arg1, arg2)Operator compute method. <a href="#holoscan.gxf.GXFOperator.initialize">initialize</a>
(self)Initialize the operator. <a href="#holoscan.gxf.GXFOperator.resource">resource</a>
(self, name)Resources associated with the operator. <a href="#holoscan.gxf.GXFOperator.setup">setup</a>
(self, arg0)Operator setup method. <a href="#holoscan.gxf.GXFOperator.start">start</a>
(self)Operator start method. <a href="#holoscan.gxf.GXFOperator.stop">stop</a>
(self)Operator stop method. OperatorType - class OperatorType
Bases:
pybind11_builtins.pybind11_object
Enum class for operator types used by the executor.
NATIVE: Native operator.
GXF: GXF operator.
VIRTUAL: Virtual operator. (for internal use, not intended for use by application authors)
Members:
NATIVE
GXF
VIRTUAL
Attributes
<a href="#holoscan.gxf.GXFOperator.OperatorType.name">name</a>
value - GXF = <OperatorType.GXF: 1>
- NATIVE = <OperatorType.NATIVE: 0>
- VIRTUAL = <OperatorType.VIRTUAL: 2>
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
- __init__(self: holoscan.gxf._gxf.GXFOperator) → None
Base GXF-based operator class.
- add_arg(*args, **kwargs)
Overloaded function.
add_arg(self: holoscan.core._core.Operator, arg: holoscan.core._core.Arg) -> None
Add an argument to the component.
add_arg(self: holoscan.core._core.Operator, arg: holoscan.core._core.ArgList) -> None
Add a list of arguments to the component.
add_arg(self: holoscan.core._core.Operator, **kwargs) -> None
Add arguments to the component via Python kwargs.
add_arg(self: holoscan.core._core.Operator, arg: holoscan.core._core.Condition) -> None
add_arg(self: holoscan.core._core.Operator, arg: holoscan.core._core.Resource) -> None
Add a condition or resource to the Operator.
This can be used to add a condition or resource to an operator after it has already been constructed.
- Parameters
- argholoscan.core.Condition or holoscan.core.Resource
The condition or resource to add.
- property args
The list of arguments associated with the component.
- Returns
- arglistholoscan.core.ArgList
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property description
YAML formatted string describing the operator.
- property fragment
The fragment (
holoscan.core.Fragment
) that the operator belongs to.
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- 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.gxf._gxf.GXFOperator) → None
Initialize the operator.
- property name
The name of the operator.
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType enum representing the type of the operator. The two types currently implemented are native and GXF.
- resource(self: holoscan.core._core.Operator, name: str) → Optional[object]
Resources associated with the operator.
- Parameters
- namestr
- The name of the resource to retrieve
- Returns
- holoscan.core.Resource or None
The resource with the given name. If no resource with the given name is found, None is returned.
- property resources
Resources associated with the operator.
- setup(self: holoscan.gxf._gxf.GXFOperator, arg0: holoscan.core._core.OperatorSpec) → None
Operator setup method.
- property spec
The operator spec (
holoscan.core.OperatorSpec
) associated with the operator.
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.gxf.GXFOutputContext
Bases:
<a href="holoscan_python_api_core.html#holoscan.core.OutputContext">holoscan.core._core.OutputContext</a>
GXF output context.
Methods
<a href="#holoscan.gxf.GXFOutputContext.emit">emit</a>
(self, data[, name])OutputType - class OutputType
Bases:
pybind11_builtins.pybind11_object
Members:
SHARED_POINTER
GXF_ENTITY
Attributes
<a href="#holoscan.gxf.GXFOutputContext.OutputType.name">name</a>
value - GXF_ENTITY = <OutputType.GXF_ENTITY: 1>
- SHARED_POINTER = <OutputType.SHARED_POINTER: 0>
- __init__(self: holoscan.core._core.OutputContext.OutputType, value: int) → None
- property name
- property value
- __init__(self: holoscan.gxf._gxf.GXFOutputContext, context: holoscan.core._core.ExecutionContext, op: holoscan.gxf._gxf.GXFOperator) → None
GXF input context.
- Parameters
- opholoscan.gxf.GXFOperator
The GXF operator that owns this context.
- emit(self: holoscan.core._core.OutputContext, data: object, name: str = '') → None
- class holoscan.gxf.GXFResource
Bases:
holoscan.core._core.Resource
,<a href="#holoscan.gxf.GXFComponent">holoscan.gxf._gxf.GXFComponent</a>
Base GXF-based resource class.
Attributes
<a href="#holoscan.gxf.GXFResource.args">args</a>
The list of arguments associated with the component. <a href="#holoscan.gxf.GXFResource.description">description</a>
YAML formatted string describing the resource. <a href="#holoscan.gxf.GXFResource.fragment">fragment</a>
Fragment that the resource belongs to. <a href="#holoscan.gxf.GXFResource.gxf_cid">gxf_cid</a>
The GXF component ID. <a href="#holoscan.gxf.GXFResource.gxf_cname">gxf_cname</a>
The name of the component. <a href="#holoscan.gxf.GXFResource.gxf_context">gxf_context</a>
The GXF context of the component. <a href="#holoscan.gxf.GXFResource.gxf_eid">gxf_eid</a>
The GXF entity ID. <a href="#holoscan.gxf.GXFResource.id">id</a>
The identifier of the component. <a href="#holoscan.gxf.GXFResource.name">name</a>
The name of the resource. <a href="#holoscan.gxf.GXFResource.resource_type">resource_type</a>
Resource type. spec Methods
<a href="#holoscan.gxf.GXFResource.add_arg">add_arg</a>
(*args, **kwargs)Overloaded function. <a href="#holoscan.gxf.GXFResource.gxf_initialize">gxf_initialize</a>
(self)Initialize the component. <a href="#holoscan.gxf.GXFResource.initialize">initialize</a>
(self)Initialize the component. <a href="#holoscan.gxf.GXFResource.setup">setup</a>
(self, arg0)setup method for the resource. ResourceType - class ResourceType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
<a href="#holoscan.gxf.GXFResource.ResourceType.name">name</a>
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.gxf._gxf.GXFResource) → None
Base GXF-based resource class.
- add_arg(*args, **kwargs)
Overloaded function.
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
Add an argument to the component.
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 resource.
- property fragment
Fragment that the resource 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 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.gxf._gxf.GXFResource) → None
Initialize the component.
- property name
The name of the resource.
- Returns
- namestr
- property resource_type
Resource type.
holoscan.core.Resource.ResourceType enum representing the type of the operator. The two types currently implemented are NATIVE and GXF.
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
setup method for the resource.
- property spec
- class holoscan.gxf.GXFScheduler
Bases:
<a href="holoscan_python_api_core.html#holoscan.core.Scheduler">holoscan.core._core.Scheduler</a>
,<a href="#holoscan.gxf.GXFComponent">holoscan.gxf._gxf.GXFComponent</a>
Base GXF-based scheduler class.
Attributes
<a href="#holoscan.gxf.GXFScheduler.args">args</a>
The list of arguments associated with the component. <a href="#holoscan.gxf.GXFScheduler.description">description</a>
YAML formatted string describing the component. <a href="#holoscan.gxf.GXFScheduler.fragment">fragment</a>
Fragment that the scheduler belongs to. <a href="#holoscan.gxf.GXFScheduler.gxf_cid">gxf_cid</a>
The GXF component ID. <a href="#holoscan.gxf.GXFScheduler.gxf_cname">gxf_cname</a>
The name of the component. <a href="#holoscan.gxf.GXFScheduler.gxf_context">gxf_context</a>
The GXF context of the component. <a href="#holoscan.gxf.GXFScheduler.gxf_eid">gxf_eid</a>
The GXF entity ID. <a href="#holoscan.gxf.GXFScheduler.id">id</a>
The identifier of the component. <a href="#holoscan.gxf.GXFScheduler.name">name</a>
The name of the scheduler. clock spec Methods
<a href="#holoscan.gxf.GXFScheduler.add_arg">add_arg</a>
(*args, **kwargs)Overloaded function. <a href="#holoscan.gxf.GXFScheduler.gxf_initialize">gxf_initialize</a>
(self)Initialize the component. <a href="#holoscan.gxf.GXFScheduler.initialize">initialize</a>
(self)Initialize the scheduler. <a href="#holoscan.gxf.GXFScheduler.setup">setup</a>
(self, arg0)setup method for the scheduler. - __init__(*args, **kwargs)
- add_arg(*args, **kwargs)
Overloaded function.
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
Add an argument to the component.
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 clock
- property description
YAML formatted string describing the component.
- property fragment
Fragment that the scheduler 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 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.gxf._gxf.GXFScheduler) → None
Initialize the scheduler.
- property name
The name of the scheduler.
- Returns
- namestr
- setup(self: holoscan.core._core.Scheduler, arg0: holoscan.core._core.ComponentSpec) → None
setup method for the scheduler.
- property spec
- holoscan.gxf.load_extensions(context: int, extension_filenames: List[str] = [], manifest_filenames: List[str] = []) → None
Loads GXF extension libraries