NVIDIA Holoscan SDK v0.4.0
Clara Holoscan v0.4.0

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.GXFExtensionRegistrar">holoscan.gxf.GXFExtensionRegistrar</a>

Methods

<a href="#holoscan.gxf.GXFInputContext">holoscan.gxf.GXFInputContext</a>

GXF input context.

<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.load_extensions">holoscan.gxf.load_extensions</a>(context[, ...])

Loads GXF extension libraries

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

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.

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

Add an argument to the component.

  1. 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 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::ComponentSpec) → None

setup method for the condition.

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

Bases: pybind11_builtins.pybind11_object

Methods

<a href="#holoscan.gxf.GXFExtensionRegistrar.TypeKind">TypeKind</a>

Members:

<a href="#holoscan.gxf.GXFExtensionRegistrar.add_component">add_component</a>(self, description, tid)

<a href="#holoscan.gxf.GXFExtensionRegistrar.add_type">add_type</a>(self, description, tid)

<a href="#holoscan.gxf.GXFExtensionRegistrar.allocate_tid">allocate_tid</a>(self, kind)

<a href="#holoscan.gxf.GXFExtensionRegistrar.create_random_tid">create_random_tid</a>()

<a href="#holoscan.gxf.GXFExtensionRegistrar.is_allocated">is_allocated</a>(self, tid, kind)

<a href="#holoscan.gxf.GXFExtensionRegistrar.register_extension">register_extension</a>(self)

<a href="#holoscan.gxf.GXFExtensionRegistrar.reset">reset</a>(self, context, extension_name, ...)

class TypeKind

Bases: pybind11_builtins.pybind11_object

Members:

Extension

Component

Attributes

<a href="#holoscan.gxf.GXFExtensionRegistrar.TypeKind.name">name</a>

value

Component =

Extension =

__init__(self: holoscan.gxf._gxf.GXFExtensionRegistrar.TypeKind, value: int) → None

property name

property value

__init__(self: holoscan.gxf._gxf.GXFExtensionRegistrar, context: capsule, extension_name: str, extension_description: str = '', tid: holoscan.gxf._gxf.gxf_tid_t = <holoscan.gxf._gxf.gxf_tid_t object at 0x7fad87b42130>) → None

add_component(self: holoscan.gxf._gxf.GXFExtensionRegistrar, description: str = '', tid: holoscan.gxf._gxf.gxf_tid_t = <holoscan.gxf._gxf.gxf_tid_t object at 0x7fad87b424b0>) → bool

add_type(self: holoscan.gxf._gxf.GXFExtensionRegistrar, description: str = '', tid: holoscan.gxf._gxf.gxf_tid_t = <holoscan.gxf._gxf.gxf_tid_t object at 0x7fad87b424f0>) → bool

allocate_tid(self: holoscan.gxf._gxf.GXFExtensionRegistrar, kind: holoscan::gxf::GXFExtensionRegistrar::TypeKind) → holoscan.gxf._gxf.gxf_tid_t

create_random_tid() → holoscan.gxf._gxf.gxf_tid_t

is_allocated(self: holoscan.gxf._gxf.GXFExtensionRegistrar, tid: holoscan.gxf._gxf.gxf_tid_t, kind: holoscan::gxf::GXFExtensionRegistrar::TypeKind) → bool

register_extension(self: holoscan.gxf._gxf.GXFExtensionRegistrar) → bool

reset(self: holoscan.gxf._gxf.GXFExtensionRegistrar, context: capsule, extension_name: str, extension_description: str = '', tid: holoscan.gxf._gxf.gxf_tid_t = <holoscan.gxf._gxf.gxf_tid_t object at 0x7fad87b19db0>) → None

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: capsule, 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.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.fragment">fragment</a>

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

spec

Methods

<a href="#holoscan.gxf.GXFOperator.OperatorType">OperatorType</a>

Members:

<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)

Operator initialization method.

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

class OperatorType

Bases: pybind11_builtins.pybind11_object

Members:

NATIVE

GXF

Attributes

<a href="#holoscan.gxf.GXFOperator.OperatorType.name">name</a>

value

GXF =

NATIVE =

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

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

Add an argument to the component.

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

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 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: <a href="holoscan_python_api_core.html#holoscan.core.OutputContext">holoscan.core._core.OutputContext</a>

GXF output context.

Methods

<a href="#holoscan.gxf.GXFOutputContext.OutputType">OutputType</a>

Members:

<a href="#holoscan.gxf.GXFOutputContext.emit">emit</a>(self, data[, name])

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 =

SHARED_POINTER =

__init__(self: holoscan.core._core.OutputContext.OutputType, value: int) → None

property name

property value

__init__(self: holoscan.gxf._gxf.GXFOutputContext, context: capsule, 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: <a href="holoscan_python_api_core.html#holoscan.core.Resource">holoscan.core._core.Resource</a>, <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.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.

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.

__init__(self: holoscan.gxf._gxf.GXFResource) → None

Base GXF-based resource class.

add_arg(*args, **kwargs)

Overloaded function.

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

Add an argument to the component.

  1. 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 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::ComponentSpec) → None

setup method for the resource.

holoscan.gxf.load_extensions(context: int, extension_filenames: List[str] = [], manifest_filenames: List[str] = [], base_directory: str = '') → None

Loads GXF extension libraries

© Copyright 2022, NVIDIA. Last updated on Jun 28, 2023.