holoscan::ForeignOperatorCore
Host one language-neutral Operator through a non-throwing callback table.
Inherits from: holoscan::Operator< NoParams > (public)
Constructors
ForeignOperatorCore
Construct one hosted Operator from a copyable callback capture.
Parameters
Owned callback capture copied by the ordinary Graph factory.
Plan-visible hosting and serialization declarations.
Destructor
~ForeignOperatorCore
Methods
setup
Declare stable ports and other cold metadata by reference.
Repeated calls receive fresh specs and must describe the same deterministic contract.
Parameters
Fresh declaration pass owned by the compiler or private conformance fixture.
contract
Return this Operator type’s complete cold temporal contract.
Runtime does not retain this authoring object’s address. Compilation calls this operation while replaying an owning Operator factory and freezes the validated descriptor into pointer-free plan records.
Returns: Fresh deep-owning descriptor; an empty value requests the inputful compile-time OnAnyInput default and is invalid for a zero-input Operator.
start
Enter steady-state execution after admitted startup barriers.
An override must remain public and keep the exact void start() signature. Graph authoring lowers it into the single required LifecycleStage::kStart checkpoint; an Operator cannot also register an advanced callback for that stage. Cold preparation belongs to explicit lifecycle stages added by their owning component. For a typed session-owned Operator, params() exposes the exact parameter generation selected for this phase.
stop
Leave steady-state execution before resource release.
An override must remain public and keep the exact void stop() signature. Graph authoring lowers it into the single required LifecycleStage::kStop checkpoint; an Operator cannot also register an advanced callback for that stage. For a typed session-owned Operator, params() exposes the exact parameter generation selected for this phase, including the restored old-published view during rollback.
compute
Process one frozen activation candidate.
The callback is invoked at most once for one activation tag. It must not wait for or recursively trigger another activation.
Returns: Success after Operator work completes, or a typed failure for Runtime policy.
Parameters
Borrowed callback-lifetime runtime services and activation evidence.
host_metadata
Return cold compiler-visible callback-host metadata.
Returns: Native hosting without a serialization constraint by default.
params
Return this Operator instance’s currently stored parameter aggregate.
Before session binding, the aggregate is the authoring default. During a legacy start() or stop() callback on a session-owned instance, it is the exact generation selected for that lifecycle phase. Advanced lifecycle callbacks must use LifecycleContext and compute callbacks must use ExecutionContext::params<ParamsT>() for their pinned views. Runtime may replace the stored aggregate between quiesced lifecycle callbacks, so callers must not retain the returned reference across callback boundaries. This operation does not allocate or synchronize.
Returns: Process-static shared NoParams value, or a stable reference to this instance’s aggregate.
has_foreign_lifecycle_callback
Return whether the foreign adapter declared one advanced lifecycle callback.
Returns: true only when the adapter declared stage and supplied a dispatcher.
Parameters
Exact stage queried after the setup callback completed.
foreign_lifecycle_callback_required
Return whether one declared foreign lifecycle callback is required.
Returns: true for a required callback and false for an optional or absent callback.
Parameters
Exact declared advanced lifecycle stage.
invoke_foreign_lifecycle_callback
Invoke one foreign advanced lifecycle callback without crossing the ABI with an exception.
Returns: The adapter-provided status, or fatal failure for an invalid callback result.
Parameters
Borrowed callback-lifetime lifecycle services.