holoscan.gxf
This module provides a Python API for GXF base classes in the C++ API.
holoscan.gxf.Entity |
alias of holoscan.gxf._gxf.PyEntity |
holoscan.gxf.GXFComponent |
Base GXF-based component class. |
holoscan.gxf.GXFCondition |
Base GXF-based condition class. |
holoscan.gxf.GXFExecutionContext |
GXF execution context. |
holoscan.gxf.GXFInputContext |
GXF input context. |
holoscan.gxf.GXFNetworkContext |
Base GXF-based network context class. |
holoscan.gxf.GXFOperator |
Base GXF-based operator class. |
holoscan.gxf.GXFOutputContext |
GXF output context. |
holoscan.gxf.GXFResource |
Base GXF-based resource class. |
holoscan.gxf.GXFScheduler |
Base GXF-based scheduler class. |
- holoscan.gxf.Entity
alias of
holoscan.gxf._gxf.PyEntity
- class holoscan.gxf.GXFComponent
Bases:
pybind11_builtins.pybind11_objectBase GXF-based component class.
Attributes
gxf_cidThe GXF component ID. gxf_cnameThe name of the component. gxf_contextThe GXF context of the component. gxf_eidThe GXF entity ID. Methods
gxf_initialize(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:
holoscan.core._core.Condition,holoscan.gxf._gxf.GXFComponentBase GXF-based condition class.
Attributes
argsThe list of arguments associated with the component. descriptionYAML formatted string describing the condition. fragmentFragment that the condition belongs to. gxf_cidThe GXF component ID. gxf_cnameThe name of the component. gxf_contextThe GXF context of the component. gxf_eidThe GXF entity ID. idThe identifier of the component. nameThe name of the condition. spec Methods
add_arg(*args, **kwargs)Overloaded function. gxf_initialize(self)Initialize the component. initialize(self)Initialize the component. setup(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.Component, arg: holoscan.core._core.Arg) -> None
Add an argument to the component.
add_arg(self: holoscan.core._core.Component, 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:
holoscan.core._core.ExecutionContextGXF 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:
holoscan.core._core.InputContextGXF input context.
Methods
receive(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:
holoscan.core._core.NetworkContext,holoscan.gxf._gxf.GXFComponentBase GXF-based network context class.
Attributes
argsThe list of arguments associated with the component. descriptionYAML formatted string describing the component. fragmentFragment that the network context belongs to. gxf_cidThe GXF component ID. gxf_cnameThe name of the component. gxf_contextThe GXF context of the component. gxf_eidThe GXF entity ID. idThe identifier of the component. nameThe name of the network context. spec Methods
add_arg(*args, **kwargs)Overloaded function. gxf_initialize(self)Initialize the component. initialize(self)Initialize the network context. setup(self, arg0)setup method for the network context. - __init__(*args, **kwargs)
- add_arg(*args, **kwargs)
Overloaded function.
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
Add an argument to the component.
add_arg(self: holoscan.core._core.Component, 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.OperatorBase GXF-based operator class.
Attributes
argsThe list of arguments associated with the component. conditionsConditions associated with the operator. descriptionYAML formatted string describing the operator. fragmentThe fragment that the operator belongs to. gxf_cidThe GXF component ID. gxf_contextThe GXF context of the component. gxf_eidThe GXF entity ID. idThe identifier of the component. nameThe name of the operator. operator_typeThe operator type. resourcesResources associated with the operator. spec Methods
add_arg(*args, **kwargs)Overloaded function. compute(self, arg0, arg1, arg2)Operator compute method. initialize(self)Operator initialization method. setup(self, arg0)Operator setup method. start(self)Operator start method. stop(self)Operator stop method. OperatorType - class OperatorType
Bases:
pybind11_builtins.pybind11_objectMembers:
NATIVE
GXF
Attributes
namevalue - GXF = <OperatorType.GXF: 1>
- NATIVE = <OperatorType.NATIVE: 0>
- __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 that the operator belongs to.
- Returns
- nameholoscan.core.Fragment
- 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.core._core.Operator) → None
Operator initialization method.
- property name
The name of the operator.
- Returns
- namestr
- 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.
- property resources
Resources associated with the operator.
- setup(self: holoscan.core._core.Operator, arg0: holoscan.core._core.OperatorSpec) → None
Operator setup method.
- property spec
- 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:
holoscan.core._core.OutputContextGXF output context.
Methods
emit(self, data[, name])OutputType - class OutputType
Bases:
pybind11_builtins.pybind11_objectMembers:
SHARED_POINTER
GXF_ENTITY
Attributes
namevalue - 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,holoscan.gxf._gxf.GXFComponentBase GXF-based resource class.
Attributes
argsThe list of arguments associated with the component. descriptionYAML formatted string describing the resource. fragmentFragment that the resource belongs to. gxf_cidThe GXF component ID. gxf_cnameThe name of the component. gxf_contextThe GXF context of the component. gxf_eidThe GXF entity ID. idThe identifier of the component. nameThe name of the resource. spec Methods
add_arg(*args, **kwargs)Overloaded function. gxf_initialize(self)Initialize the component. initialize(self)Initialize the component. setup(self, arg0)setup method for the resource. - __init__(self: holoscan.gxf._gxf.GXFResource) → None
Base GXF-based resource class.
- add_arg(*args, **kwargs)
Overloaded function.
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
Add an argument to the component.
add_arg(self: holoscan.core._core.Component, 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
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
setup method for the resource.
- property spec
- class holoscan.gxf.GXFScheduler
Bases:
holoscan.core._core.Scheduler,holoscan.gxf._gxf.GXFComponentBase GXF-based scheduler class.
Attributes
argsThe list of arguments associated with the component. descriptionYAML formatted string describing the component. fragmentFragment that the scheduler belongs to. gxf_cidThe GXF component ID. gxf_cnameThe name of the component. gxf_contextThe GXF context of the component. gxf_eidThe GXF entity ID. idThe identifier of the component. nameThe name of the scheduler. clock spec Methods
add_arg(*args, **kwargs)Overloaded function. gxf_initialize(self)Initialize the component. initialize(self)Initialize the scheduler. setup(self, arg0)setup method for the scheduler. - __init__(*args, **kwargs)
- add_arg(*args, **kwargs)
Overloaded function.
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
Add an argument to the component.
add_arg(self: holoscan.core._core.Component, 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