What can I help you with?
NVIDIA Holoscan SDK v3.2.0

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.GXFSystemResourceBase A class considered a GXF nvidia::gxf::Resource.

holoscan.gxf.Entity

alias of holoscan.gxf._gxf.PyEntity

class holoscan.gxf.GXFComponent

Bases: pybind11_builtins.pybind11_object

Base GXF-based component class.

Attributes

gxf_cid The GXF component ID.
gxf_cname The name of the component.
gxf_context The GXF context of the component.
gxf_eid The GXF entity ID.
gxf_typename The GXF type name of the component.

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.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

class holoscan.gxf.GXFCondition

Bases: holoscan.core._core.Condition, holoscan.gxf._gxf.GXFComponent

Base GXF-based condition class.

Attributes

args The list of arguments associated with the component.
condition_type Condition type.
description YAML formatted string describing the condition.
fragment Fragment that the condition belongs to.
gxf_cid The GXF component ID.
gxf_cname The name of the component.
gxf_context The GXF context of the component.
gxf_eid The GXF entity ID.
gxf_typename The GXF type name of the component.
id The identifier of the component.
name The name of the condition.

spec

Methods

add_arg(*args, **kwargs) Overloaded function.
gxf_initialize(self) Initialize the component.
initialize(self) initialization method for the condition.
receiver(self, port_name) Get the receiver used by an input port of the operator this condition is associated with.
setup(self, arg0) setup method for the condition.
transmitter(self, port_name) Get the transmitter used by an output port of the operator this condition is associated with.

ConditionComponentType

class ConditionComponentType

Bases: pybind11_builtins.pybind11_object

Members:

NATIVE

GXF

Attributes

name

value
GXF = <ConditionComponentType.GXF: 1>
NATIVE = <ConditionComponentType.NATIVE: 0>
__init__(self: holoscan.core._core.Condition.ConditionComponentType, value: int) → None
property name
property value
__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.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 condition_type

Condition type.

holoscan.core.Condition.ConditionComponentType enum representing the type of the condition. The two types currently implemented are NATIVE and GXF.

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
receiver(self: holoscan.core._core.Condition, port_name: str) → Optional[holoscan::Receiver]

Get the receiver used by an input port of the operator this condition is associated with.

Parameters
port_namestr

The name of the input port.

Returns
receiverholoscan.resources.Receiver

The receiver used by this input port. Will be None if the port does not exist.

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

setup method for the condition.

property spec
transmitter(self: holoscan.core._core.Condition, port_name: str) → Optional[holoscan::Transmitter]

Get the transmitter used by an output port of the operator this condition is associated with.

Parameters
port_namestr

The name of the output port.

Returns
transmitterholoscan.resources.Transmitter or None

The transmitter used by this output port. Will be None if the port does not exist.

class holoscan.gxf.GXFExecutionContext

Bases: holoscan.core._core.ExecutionContext

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: holoscan.core._core.InputContext

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

Base GXF-based network context class.

Attributes

args The list of arguments associated with the component.
description YAML formatted string describing the component.
fragment Fragment that the network context belongs to.
gxf_cid The GXF component ID.
gxf_cname The name of the component.
gxf_context The GXF context of the component.
gxf_eid The GXF entity ID.
gxf_typename The GXF type name of the component.
id The identifier of the component.
name The name of the network context.

spec

Methods

add_arg(*args, **kwargs) Overloaded function.
gxf_initialize(self) Initialize the component.
initialize(self) initialization method for the network context.
setup(self, arg0) setup method for the network context.

__init__(*args, **kwargs)
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 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 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.NetworkContext) → None

initialization method for 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

args The list of arguments associated with the component.
async_condition The internal asynchronous condition for the operator.
conditions Conditions associated with the operator.
description YAML formatted string describing the operator.
execution_context The execution context for the operator.
fragment The fragment (holoscan.core.Fragment) that the operator belongs to.
gxf_cid The GXF component ID.
gxf_context The GXF context of the component.
gxf_eid The GXF entity ID.
gxf_entity_group_name The name of the GXF EntityGroup containing this operator.
gxf_typename The GXF type name of the operator.
id The identifier of the component.
is_metadata_enabled Boolean indicating whether the fragment this operator belongs to has metadata transmission enabled.
metadata The metadata dictionary (holoscan.core.MetadataDictionary) associated with the operator.
metadata_policy The metadata policy (holoscan.core.MetadataPolicy) associated with the operator.
name The name of the operator.
next_flows Get the list of flow information for connections to downstream operators.
operator_type The operator type.
resources Resources associated with the operator.
spec The operator spec (holoscan.core.OperatorSpec) associated with the operator.

Methods

add_arg(*args, **kwargs) Overloaded function.
add_dynamic_flow(*args, **kwargs) Overloaded function.
compute(self, arg0, arg1, arg2) Operator compute method.
enable_metadata(self, enable) Configure whether or not the metadata feature is enabled for this operator.
find_all_flow_info(self, predicate) Find all flow info objects in the operator's next flows that match a given condition.
find_flow_info(self, predicate) Find a flow info in the operator's next flows based on a given predicate.
initialize(self) Operator initialization method.
queue_policy(self, port_name, port_type, policy) Set the queue policy to be used by an input (or output) port's receiver (or transmitter).
receiver(self, port_name) Get the receiver used by an input port.
resource(self, name) Resources associated with the operator.
setup(self, arg0) Operator setup method.
start(self) Operator start method.
stop(self) Operator stop method.
stop_execution(self) Stop the execution of the operator.
transmitter(self, port_name) Get the transmitter used by an output port.

OperatorType

INPUT_EXEC_PORT_NAME = '__input_exec__'
OUTPUT_EXEC_PORT_NAME = '__output_exec__'
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

name

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.

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

Add an argument to the component.

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

Add a list of arguments to the component.

  1. add_arg(self: holoscan.core._core.Operator, **kwargs) -> None

Add arguments to the component via Python kwargs.

  1. add_arg(self: holoscan.core._core.Operator, arg: holoscan.core._core.Condition) -> None

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

add_dynamic_flow(*args, **kwargs)

Overloaded function.

  1. add_dynamic_flow(self: holoscan.core._core.Operator, flow: holoscan.core._core.FlowInfo) -> None

  2. add_dynamic_flow(self: holoscan.core._core.Operator, flows: list[holoscan.core._core.FlowInfo]) -> None

  3. add_dynamic_flow(self: holoscan.core._core.Operator, next_op: holoscan.core._core.Operator, next_input_port_name: str = ‘’) -> None

Add a dynamic flow from this operator to another operator.

Parameters
next_opholoscan.core.Operator

The downstream operator to connect to.

next_input_port_namestr, optional

The name of the input port on the downstream operator to connect to. If not specified, the first available input port will be used.

Notes

This method has several overloads to support different ways of creating dynamic flows:

  1. add_dynamic_flow(next_op: Operator, next_input_port_name: str = ‘’) - Basic connection using default output port. This is the simplest form for connecting

    two operators when you only need to specify the destination.

  2. add_dynamic_flow(curr_output_port_name: str, next_op: Operator, next_input_port_name: str = ‘’) - Connection with explicit output port specification. Use this when the source operator has

    multiple output ports and you need to specify which one to use.

  3. add_dynamic_flow(flow: FlowInfo) - Connection using a FlowInfo object, which encapsulates all connection details including:

    • Source operator and its output port specification

    • Destination operator and its input port specification

    • Port names and associated IOSpecs

    • This is useful for complex connections or when reusing connection patterns.

  4. add_dynamic_flow(flows: List[FlowInfo]) - Batch connection using multiple FlowInfo objects. Use this to set up multiple

    connections in a single call, which is more efficient than making multiple individual connections.

The FlowInfo class provides a complete description of a flow connection between operators, including all port specifications and naming. It’s particularly useful when you need to:

  • Store and reuse connection patterns

  • Create complex routing configurations

  • Handle dynamic port specifications

  • Manage multiple connections systematically

  1. add_dynamic_flow(self: holoscan.core._core.Operator, curr_output_port_name: str, next_op: holoscan.core._core.Operator, next_input_port_name: str = ‘’) -> None

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property async_condition

The internal asynchronous condition for the operator.

This property provides access to the internal asynchronous condition for the operator, which controls the scheduling of the operator’s compute method.

Returns
conditionholoscan.conditions.AsynchronousCondition

An instance of holoscan.conditions.AsynchronousCondition that is the internal asynchronous condition for the operator.

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.

enable_metadata(self: holoscan.core._core.Operator, enable: bool) → None

Configure whether or not the metadata feature is enabled for this operator. If it is not set, the default value will be determined by the enable_metadata setting from the Fragment that this operator belongs to.

property execution_context

The execution context for the operator.

This property provides access to the execution context of the operator, which contains information about the current execution environment including scheduling details.

Returns
holoscan.core.ExecutionContext

The execution context object for this operator.

find_all_flow_info(self: holoscan.core._core.Operator, predicate: Callable[[holoscan.core._core.FlowInfo], bool]) → list[holoscan.core._core.FlowInfo]

Find all flow info objects in the operator’s next flows that match a given condition.

Parameters
predicatecallable

A function that takes a FlowInfo object and returns a boolean.

Returns
list[holoscan.core.FlowInfo]

List of matching FlowInfo objects.

find_flow_info(self: holoscan.core._core.Operator, predicate: Callable[[holoscan.core._core.FlowInfo], bool])holoscan.core._core.FlowInfo

Find a flow info in the operator’s next flows based on a given predicate.

Parameters
predicatecallable

A function that takes a FlowInfo object and returns a boolean.

Returns
holoscan.core.FlowInfo or None

The first matching FlowInfo object, or None if not found.

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 gxf_entity_group_name

The name of the GXF EntityGroup containing this operator.

Returns
str

The entity group name.

property gxf_typename

The GXF type name of the operator.

Returns
str

The GXF type name of the operator.

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 is_metadata_enabled

Boolean indicating whether the fragment this operator belongs to has metadata transmission enabled.

property metadata

The metadata dictionary (holoscan.core.MetadataDictionary) associated with the operator.

property metadata_policy

The metadata policy (holoscan.core.MetadataPolicy) associated with the operator.

The supported policies are:

  • MetadataPolicy.REJECT: Reject the new value if the key already exists

  • MetadataPolicy.UPDATE: Replace existing value with the new one if the key already exists

  • MetadataPolicy.INPLACE_UPDATE: Update the value stored within an existing MetadataObject in-place if the key already exists (in contrast to UPDATE which always replaces the existing MetadataObject with a new one).

  • MetadataPolicy.RAISE: Raise an exception if the key already exists

property name

The name of the operator.

property next_flows

Get the list of flow information for connections to downstream operators.

Returns
list[holoscan.core.FlowInfo]

List of flow information objects describing connections to downstream operators.

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.

queue_policy(self: holoscan.core._core.Operator, port_name: str, port_type: holoscan.core._core.IOSpec.IOType = <IOType.INPUT: 0>, policy: holoscan.core._core.IOSpec.QueuePolicy = <QueuePolicy.FAULT: 2>) → None

Set the queue policy to be used by an input (or output) port’s receiver (or transmitter).

Parameters
port_namestr

The name of the port.

port_typeIOSpec.IOType, optional

Enum indicating whether port_name corresponds to an input port or output port.

policyIOSpec.QueuePolicy, optional

The queue policy to set. Valid values are:

  • QueuePolicy.POP : If the queue is full, pop the oldest item, then add the new one.

  • QueuePolicy.REJECT : If the queue is full, reject (discard) the new item.

  • QueuePolicy.FAULT : If the queue is full, log a warning and reject the new item.

Returns
transmitterholoscan.resources.Transmitter or None

The transmitter used by this output port. Will be None if the port does not exist.

receiver(self: holoscan.core._core.Operator, port_name: str) → Optional[holoscan::Receiver]

Get the receiver used by an input port.

Parameters
port_namestr

The name of the input port.

Returns
receiverholoscan.resources.Receiver

The receiver used by this input port. Will be None if the port does not exist.

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.core._core.Operator, 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.

stop_execution(self: holoscan.core._core.Operator) → None

Stop the execution of the operator.

This method is used to stop the execution of the operator by setting the internal async condition to EVENT_NEVER state, which sets the scheduling condition to NEVER. Once stopped, the operator will not be scheduled for execution (the compute() method will not be called).

Note that executing this method does not trigger the operator’s stop() method. The stop() method is called only when the scheduler deactivates all operators together.

transmitter(self: holoscan.core._core.Operator, port_name: str) → Optional[holoscan::Transmitter]

Get the transmitter used by an output port.

Parameters
port_namestr

The name of the output port.

Returns
transmitterholoscan.resources.Transmitter or None

The transmitter used by this output port. Will be None if the port does not exist.

class holoscan.gxf.GXFOutputContext

Bases: holoscan.core._core.OutputContext

GXF output context.

Methods

emit(self, data[, name])

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

Base GXF-based resource class.

Attributes

args The list of arguments associated with the component.
description YAML formatted string describing the resource.
fragment Fragment that the resource belongs to.
gxf_cid The GXF component ID.
gxf_cname The name of the component.
gxf_context The GXF context of the component.
gxf_eid The GXF entity ID.
gxf_typename The GXF type name of the component.
id The identifier of the component.
name The name of the resource.
resource_type Resource type.

spec

Methods

add_arg(*args, **kwargs) Overloaded function.
gxf_initialize(self) Initialize the component.
initialize(self) initialization method for the resource.
setup(self, arg0) setup method for the resource.

ResourceType

class ResourceType

Bases: pybind11_builtins.pybind11_object

Members:

NATIVE

GXF

Attributes

name

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.

  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 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 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.Resource) → None

initialization method for the resource.

property name

The name of the resource.

Returns
namestr
property resource_type

Resource type.

holoscan.core.Resource.ResourceType enum representing the type of the resource. 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: holoscan.core._core.Scheduler, holoscan.gxf._gxf.GXFComponent

Base GXF-based scheduler class.

Attributes

args The list of arguments associated with the component.
description YAML formatted string describing the component.
fragment Fragment that the scheduler belongs to.
gxf_cid The GXF component ID.
gxf_cname The name of the component.
gxf_context The GXF context of the component.
gxf_eid The GXF entity ID.
gxf_typename The GXF type name of the component.
id The identifier of the component.
name The name of the scheduler.

clock
spec

Methods

add_arg(*args, **kwargs) Overloaded function.
gxf_initialize(self) Initialize the component.
initialize(self) initialization method for the scheduler.
setup(self, arg0) setup method for the scheduler.

__init__(*args, **kwargs)
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 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 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.Scheduler) → None

initialization method for 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
class holoscan.gxf.GXFSystemResourceBase

Bases: holoscan.gxf._gxf.GXFResource, holoscan.core._core.Resource, holoscan.gxf._gxf.GXFComponent

A class considered a GXF nvidia::gxf::Resource.

This represents a resource such as a ThreadPool or GPUDevice that may be shared amongst multiple entities in an nvidia::gxf::EntityGroup.

Attributes

args The list of arguments associated with the component.
description YAML formatted string describing the resource.
fragment Fragment that the resource belongs to.
gxf_cid The GXF component ID.
gxf_cname The name of the component.
gxf_context The GXF context of the component.
gxf_eid The GXF entity ID.
gxf_typename The GXF type name of the component.
id The identifier of the component.
name The name of the resource.
resource_type Resource type.

spec

Methods

add_arg(*args, **kwargs) Overloaded function.
gxf_initialize(self) Initialize the component.
initialize(self) initialization method for the resource.
setup(self, arg0) setup method for the resource.

ResourceType

class ResourceType

Bases: pybind11_builtins.pybind11_object

Members:

NATIVE

GXF

Attributes

name

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.GXFSystemResourceBase) → None

A class considered a GXF nvidia::gxf::Resource.

This represents a resource such as a ThreadPool or GPUDevice that may be shared amongst multiple entities in an nvidia::gxf::EntityGroup.

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 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 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.Resource) → None

initialization method for the resource.

property name

The name of the resource.

Returns
namestr
property resource_type

Resource type.

holoscan.core.Resource.ResourceType enum representing the type of the resource. 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
holoscan.gxf.load_extensions(context: int, extension_filenames: list[str] = [], manifest_filenames: list[str] = []) → None

Loads GXF extension libraries

Previous holoscan.graphs
Next holoscan.logger
© Copyright 2022-2025, NVIDIA. Last updated on Apr 30, 2025.