Skip to navigation

holoscan::authoring::OpaquePortRef

Beta
View as Markdown

Retain one type-erased logical port without exposing its declaration address.

Operator and embedded-interface ports retain weak Graph identity and re-resolve the current declaration on every thunk use. Embedded-interface references additionally retain the exact reusable-Graph registration identity so rollback and index reuse cannot retarget them. Topic and directly hosted interface ports retain their typed handle owner. In all cases the payload thunk verifies direction and complete payload identity before recovering a typed declaration.

#include <holoscan/authoring/registry.hpp>

Constructors

OpaquePortRef

holoscan::authoring::OpaquePortRef::OpaquePortRef() = default

Create an empty invalid port reference.


Methods

operator bool

holoscan::authoring::OpaquePortRef::operator bool() const noexcept

Return whether this reference can currently resolve a declaration.

Returns: true for a held declaration, live named Operator port, or live embedded interface.

resolve

const void * holoscan::authoring::OpaquePortRef::resolve(
const PayloadIdentityRecord &expected,
PortDirection direction
) const

held

template <PublishedPayload T>
static OpaquePortRef holoscan::authoring::OpaquePortRef::held(
std::shared_ptr<const void> holder,
const void * (*declaration)(const void *),
PortDirection direction,
bool (*valid)(const void *) noexcept = nullptr,
const void *authoring_builder = nullptr,
bool tensor_output_builder = false
)

Member variables

NameTypeDescription
holder_std::shared_ptr< const void >
declaration_const void *(*
valid_bool(*
payload_identity_PayloadIdentityRecord
direction_PortDirection
authoring_builder_const void *
tensor_output_builder_bool
state_std::weak_ptr< holoscan::detail::GraphState >
graph_port_std::optional< GraphPortId >
index_std::size_t
handle_identity_std::shared_ptr< const void >
graph_handle_identity_std::shared_ptr< const void >
operator_type_token_const void *
port_name_std::string