holoscan.resources
This module provides a Python API to underlying C++ API Resources.
Base allocator class. |
|
Block memory pool resource. |
|
CUDA stream pool. |
|
Receiver using a double-buffered queue. |
|
Transmitter using a double-buffered queue. |
|
Members: |
|
Base GXF receiver class. |
|
Serializer for GXF Timestamp and Tensor components. |
|
Base GXF transmitter class. |
|
Unbounded allocator. |
|
Serializer for video streams. |
- class holoscan.resources.Allocator
Bases:
holoscan.gxf._gxf.GXFResource
Base allocator class.
Attributes
The list of arguments associated with the component.
YAML formatted string describing the resource.
Fragment that the resource belongs to.
The GXF component ID.
The name of the component.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the resource.
spec
Methods
add_arg
(*args, **kwargs)Overloaded function.
allocate
(self, size, type)Allocate the requested amount of memory.
free
(self, pointer)Free the allocated memory
gxf_initialize
(self)Initialize the component.
initialize
(self)Initialize the component.
is_available
(self, size)Boolean representing whether the resource is available.
setup
(self, arg0)setup method for the resource.
- __init__(self: holoscan.resources._resources.Allocator) → None
Base allocator class.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- allocate(self: holoscan.resources._resources.Allocator, size: int, type: holoscan.resources._resources.MemoryStorageType) → int
Allocate the requested amount of memory.
- Parameters
- sizeint
- typeholoscan.resources.MemoryStorageType
The amount of memory to allocate
Enum representing the type of memory to allocate.
- Returns
- Opaque PyCapsule object representing a std::byte* pointer to the allocated memory.
- 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
- free(self: holoscan.resources._resources.Allocator, pointer: int) → None
Free the allocated memory
- Parameters
- pointerPyCapsule
Opaque PyCapsule object representing a std::byte* pointer to the allocated memory.
- 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 resource.
- Returns
- str
The GXF type name of the resource
- 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.
- is_available(self: holoscan.resources._resources.Allocator, size: int) → bool
Boolean representing whether the resource is available.
- Returns
- bool
Availability of the resource.
- property name
The name of the resource.
- Returns
- namestr
- setup(self: holoscan.core._core.Resource, arg0: holoscan::ComponentSpec) → None
setup method for the resource.
- property spec
- class holoscan.resources.BlockMemoryPool
Bases:
holoscan.resources._resources.Allocator
Block memory pool resource.
Provides a maximum number of equally sized blocks of memory.
Attributes
The list of arguments associated with the component.
YAML formatted string describing the resource.
Fragment that the resource belongs to.
The GXF component ID.
The name of the component.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the resource.
spec
Methods
add_arg
(*args, **kwargs)Overloaded function.
allocate
(self, size, type)Allocate the requested amount of memory.
free
(self, pointer)Free the allocated memory
gxf_initialize
(self)Initialize the component.
initialize
(self)Initialize the component.
is_available
(self, size)Boolean representing whether the resource is available.
setup
(self, spec)Define the component specification.
- __init__(self: holoscan.resources._resources.BlockMemoryPool, fragment: holoscan.core._core.Fragment, storage_type: int, block_size: int, num_blocks: int, name: str = 'block_memory_pool') → None
Block memory pool resource.
Provides a maximum number of equally sized blocks of memory.
- Parameters
- fragmentholoscan.core.Fragment
- storage_typeint or holoscan.resources.MemoryStorageType
- block_sizeint
- num_blocksint
- namestr, optional
The fragment to assign the resource to.
The storage type (0=Host, 1=Device, 2=System).
The size of each block in the memory pool (in bytes).
The number of blocks in the memory pool.
The name of the memory pool.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- allocate(self: holoscan.resources._resources.Allocator, size: int, type: holoscan.resources._resources.MemoryStorageType) → int
Allocate the requested amount of memory.
- Parameters
- sizeint
- typeholoscan.resources.MemoryStorageType
The amount of memory to allocate
Enum representing the type of memory to allocate.
- Returns
- Opaque PyCapsule object representing a std::byte* pointer to the allocated memory.
- 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
- free(self: holoscan.resources._resources.Allocator, pointer: int) → None
Free the allocated memory
- Parameters
- pointerPyCapsule
Opaque PyCapsule object representing a std::byte* pointer to the allocated memory.
- 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 resource.
- Returns
- str
The GXF type name of the resource
- 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.
- is_available(self: holoscan.resources._resources.Allocator, size: int) → bool
Boolean representing whether the resource is available.
- Returns
- bool
Availability of the resource.
- property name
The name of the resource.
- Returns
- namestr
- setup(self: holoscan.resources._resources.BlockMemoryPool, spec: holoscan.core._core.ComponentSpec) → None
Define the component specification.
- Parameters
- specholoscan.core.ComponentSpec
Component specification associated with the resource.
- property spec
- class holoscan.resources.CudaStreamPool
Bases:
holoscan.resources._resources.Allocator
CUDA stream pool.
Attributes
The list of arguments associated with the component.
YAML formatted string describing the resource.
Fragment that the resource belongs to.
The GXF component ID.
The name of the component.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the resource.
spec
Methods
add_arg
(*args, **kwargs)Overloaded function.
allocate
(self, size, type)Allocate the requested amount of memory.
free
(self, pointer)Free the allocated memory
gxf_initialize
(self)Initialize the component.
initialize
(self)Initialize the component.
is_available
(self, size)Boolean representing whether the resource is available.
setup
(self, spec)Define the component specification.
- __init__(self: holoscan.resources._resources.CudaStreamPool, fragment: holoscan.core._core.Fragment, dev_id: int, stream_flags: int, stream_priority: int, reserved_size: int, max_size: int, name: str = 'cuda_stream_pool') → None
CUDA stream pool.
- Parameters
- fragmentholoscan.core.Fragment
- dev_idint
- stream_flagsint
- stream_priorityint
- reserved_sizeint
- max_sizeint
- namestr, optional
The fragment to assign the resource to.
CUDA device ID.
Flag values used in creating CUDA streams.
Priority values used in creating CUDA streams.
TODO
Maximum stream size.
The name of the stream pool.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- allocate(self: holoscan.resources._resources.Allocator, size: int, type: holoscan.resources._resources.MemoryStorageType) → int
Allocate the requested amount of memory.
- Parameters
- sizeint
- typeholoscan.resources.MemoryStorageType
The amount of memory to allocate
Enum representing the type of memory to allocate.
- Returns
- Opaque PyCapsule object representing a std::byte* pointer to the allocated memory.
- 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
- free(self: holoscan.resources._resources.Allocator, pointer: int) → None
Free the allocated memory
- Parameters
- pointerPyCapsule
Opaque PyCapsule object representing a std::byte* pointer to the allocated memory.
- 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 resource.
- Returns
- str
The GXF type name of the resource
- 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.
- is_available(self: holoscan.resources._resources.Allocator, size: int) → bool
Boolean representing whether the resource is available.
- Returns
- bool
Availability of the resource.
- property name
The name of the resource.
- Returns
- namestr
- setup(self: holoscan.resources._resources.CudaStreamPool, spec: holoscan.core._core.ComponentSpec) → None
Define the component specification.
- Parameters
- specholoscan.core.ComponentSpec
Component specification associated with the resource.
- property spec
- class holoscan.resources.DoubleBufferReceiver
Bases:
holoscan.resources._resources.Receiver
Receiver using a double-buffered queue.
New messages are first pushed to a back stage.
Attributes
The list of arguments associated with the component.
YAML formatted string describing the resource.
Fragment that the resource belongs to.
The GXF component ID.
The name of the component.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The 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, spec)Define the component specification.
- __init__(self: holoscan.resources._resources.DoubleBufferReceiver, fragment: holoscan.core._core.Fragment, capacity: int = 1, policy: int = 2, name: str = 'double_buffer_receiver') → None
Receiver using a double-buffered queue.
New messages are first pushed to a back stage.
- Parameters
- fragmentholoscan.core.Fragment
- capacityint, optional
- policyint, optional
- namestr, optional
The fragment to assign the resource to.
The capacity of the receiver.
The policy to use (0=pop, 1=reject, 2=fault).
The name of the receiver.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
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 resource.
- Returns
- str
The GXF type name of the resource
- 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.resources._resources.DoubleBufferReceiver, spec: holoscan.core._core.ComponentSpec) → None
Define the component specification.
- Parameters
- specholoscan.core.ComponentSpec
Component specification associated with the resource.
- property spec
- class holoscan.resources.DoubleBufferTransmitter
Bases:
holoscan.resources._resources.Transmitter
Transmitter using a double-buffered queue.
Messages are pushed to a back stage after they are published.
Attributes
The list of arguments associated with the component.
YAML formatted string describing the resource.
Fragment that the resource belongs to.
The GXF component ID.
The name of the component.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The 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, spec)Define the component specification.
- __init__(self: holoscan.resources._resources.DoubleBufferTransmitter, fragment: holoscan.core._core.Fragment, capacity: int = 1, policy: int = 2, name: str = 'double_buffer_transmitter') → None
Transmitter using a double-buffered queue.
Messages are pushed to a back stage after they are published.
- Parameters
- fragmentholoscan.core.Fragment
- capacityint, optional
- policyint, optional
- namestr, optional
The fragment to assign the resource to.
The capacity of the transmitter.
The policy to use (0=pop, 1=reject, 2=fault).
The name of the transmitter.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
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 resource.
- Returns
- str
The GXF type name of the resource
- 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.resources._resources.DoubleBufferTransmitter, spec: holoscan.core._core.ComponentSpec) → None
Define the component specification.
- Parameters
- specholoscan.core.ComponentSpec
Component specification associated with the resource.
- property spec
- class holoscan.resources.MemoryStorageType
Bases:
pybind11_builtins.pybind11_object
Members:
HOST
DEVICE
SYSTEM
Attributes
value
-
DEVICE =
-
HOST =
-
SYSTEM =
- __init__(self: holoscan.resources._resources.MemoryStorageType, value: int) → None
- property name
- property value
-
DEVICE =
- class holoscan.resources.Receiver
Bases:
holoscan.gxf._gxf.GXFResource
Base GXF receiver class.
Attributes
The list of arguments associated with the component.
YAML formatted string describing the resource.
Fragment that the resource belongs to.
The GXF component ID.
The name of the component.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The 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.resources._resources.Receiver) → None
Base GXF receiver class.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
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 resource.
- Returns
- str
The GXF type name of the resource
- 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.
- property spec
- class holoscan.resources.StdComponentSerializer
Bases:
holoscan.gxf._gxf.GXFResource
Serializer for GXF Timestamp and Tensor components.
Attributes
The list of arguments associated with the component.
YAML formatted string describing the resource.
Fragment that the resource belongs to.
The GXF component ID.
The name of the component.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the resource.
spec
Methods
add_arg
(*args, **kwargs)Overloaded function.
gxf_initialize
(self)Initialize the component.
initialize
(self)Initialize the resource
setup
(self, spec)Define the component specification.
- __init__(self: holoscan.resources._resources.StdComponentSerializer, fragment: holoscan.core._core.Fragment, name: str = 'standard_component_serializer') → None
Serializer for GXF Timestamp and Tensor components.
- Parameters
- fragmentholoscan.core.Fragment
- namestr, optional
The fragment to assign the resource to.
The name of the serializer.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
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 resource.
- Returns
- str
The GXF type name of the resource
- 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.resources._resources.StdComponentSerializer) → None
Initialize the resource
This method is called only once when the resource is created for the first time, and uses a light-weight initialization.
- property name
The name of the resource.
- Returns
- namestr
- setup(self: holoscan.resources._resources.StdComponentSerializer, spec: holoscan.core._core.ComponentSpec) → None
Define the component specification.
- Parameters
- specholoscan.core.ComponentSpec
Component specification associated with the resource.
- property spec
- class holoscan.resources.Transmitter
Bases:
holoscan.gxf._gxf.GXFResource
Base GXF transmitter class.
Attributes
The list of arguments associated with the component.
YAML formatted string describing the resource.
Fragment that the resource belongs to.
The GXF component ID.
The name of the component.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The 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.resources._resources.Transmitter) → None
Base GXF transmitter class.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
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 resource.
- Returns
- str
The GXF type name of the resource
- 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.
- property spec
- class holoscan.resources.UnboundedAllocator
Bases:
holoscan.resources._resources.Allocator
Unbounded allocator.
This allocator uses dynamic memory allocation without an upper bound.
Attributes
The list of arguments associated with the component.
YAML formatted string describing the resource.
Fragment that the resource belongs to.
The GXF component ID.
The name of the component.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the resource.
spec
Methods
add_arg
(*args, **kwargs)Overloaded function.
allocate
(self, size, type)Allocate the requested amount of memory.
free
(self, pointer)Free the allocated memory
gxf_initialize
(self)Initialize the component.
initialize
(self)Initialize the component.
is_available
(self, size)Boolean representing whether the resource is available.
setup
(self, spec)Define the component specification.
- __init__(self: holoscan.resources._resources.UnboundedAllocator, fragment: holoscan.core._core.Fragment, name: str = 'unbounded_allocator') → None
Unbounded allocator.
This allocator uses dynamic memory allocation without an upper bound.
- Parameters
- fragmentholoscan.core.Fragment
- namestr, optional
The fragment to assign the resource to.
The name of the serializer.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- allocate(self: holoscan.resources._resources.Allocator, size: int, type: holoscan.resources._resources.MemoryStorageType) → int
Allocate the requested amount of memory.
- Parameters
- sizeint
- typeholoscan.resources.MemoryStorageType
The amount of memory to allocate
Enum representing the type of memory to allocate.
- Returns
- Opaque PyCapsule object representing a std::byte* pointer to the allocated memory.
- 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
- free(self: holoscan.resources._resources.Allocator, pointer: int) → None
Free the allocated memory
- Parameters
- pointerPyCapsule
Opaque PyCapsule object representing a std::byte* pointer to the allocated memory.
- 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 resource.
- Returns
- str
The GXF type name of the resource
- 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.
- is_available(self: holoscan.resources._resources.Allocator, size: int) → bool
Boolean representing whether the resource is available.
- Returns
- bool
Availability of the resource.
- property name
The name of the resource.
- Returns
- namestr
- setup(self: holoscan.resources._resources.UnboundedAllocator, spec: holoscan.core._core.ComponentSpec) → None
Define the component specification.
- Parameters
- specholoscan.core.ComponentSpec
Component specification associated with the resource.
- property spec
- class holoscan.resources.VideoStreamSerializer
Bases:
holoscan.gxf._gxf.GXFResource
Serializer for video streams.
Attributes
The list of arguments associated with the component.
YAML formatted string describing the resource.
Fragment that the resource belongs to.
The GXF component ID.
The name of the component.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the resource.
spec
Methods
add_arg
(*args, **kwargs)Overloaded function.
gxf_initialize
(self)Initialize the component.
initialize
(self)Initialize the resource
setup
(self, spec)Define the component specification.
- __init__(self: holoscan.resources._resources.VideoStreamSerializer, fragment: holoscan.core._core.Fragment, name: str = 'video_stream_serializer') → None
Serializer for video streams.
- Parameters
- fragmentholoscan.core.Fragment
- namestr, optional
The fragment to assign the resource to.
The name of the serializer.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
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 resource.
- Returns
- str
The GXF type name of the resource
- 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.resources._resources.VideoStreamSerializer) → None
Initialize the resource
This method is called only once when the resource is created for the first time, and uses a light-weight initialization.
- property name
The name of the resource.
- Returns
- namestr
- setup(self: holoscan.resources._resources.VideoStreamSerializer, spec: holoscan.core._core.ComponentSpec) → None
Define the component specification.
- Parameters
- specholoscan.core.ComponentSpec
Component specification associated with the resource.
- property spec