Skip to navigation

holoscan::ForeignOperatorSpec

Beta
View as Markdown

Declare stable typed ports for one foreign-hosted Operator setup pass.

A language adapter resolves its payload declarations to process-local registry rows before calling these methods. Each success retains the allocated typed port for the owning ForeignOperatorCore instance. The callback must not retain this setup-only object or call it after the setup callback returns.

#include <holoscan/foreign_operator.hpp>

Constructors

ForeignOperatorSpec

OperatorSpec &spec,
std::vector<authoring::OpaquePortRef> &ports
) noexcept

Methods

input

expected<authoring::OpaquePortRef, Error> holoscan::ForeignOperatorSpec::input(
const authoring::RegisteredPayloadType &payload,
std::string_view name,
std::optional<std::uint32_t> queue_depth = std::nullopt,
bool optional = false
) noexcept

Allocate and bind one input using a registered payload row.

Returns: Stable erased port reference or the typed public OperatorSpec failure as data.

Parameters

payload
const authoring::RegisteredPayloadType &

Exact process-local payload registration.

name
std::string_view

Stable local port name copied into the declaration.

queue_depth
std::optional<std::uint32_t>Defaults to std::nullopt

Optional finite input history capacity.

optional
boolDefaults to false

Whether this input may remain unwired under an eligible temporal contract.

output

expected<authoring::OpaquePortRef, Error> holoscan::ForeignOperatorSpec::output(
const authoring::RegisteredPayloadType &payload,
std::string_view name,
std::optional<std::uint32_t> max_emits_per_compute = std::nullopt
) noexcept

Allocate and bind one output using a registered payload row.

Returns: Stable erased port reference or the typed public OperatorSpec failure as data.

Parameters

payload
const authoring::RegisteredPayloadType &

Exact process-local payload registration.

name
std::string_view

Stable local port name copied into the declaration.


Member variables

NameTypeDescription
spec_OperatorSpec *
ports_std::vector< authoring::OpaquePortRef > *