Skip to navigation

holoscan::ParamSnapshot

Beta
View as Markdown

Own a consistency-labeled, value-safe Parameter capture envelope.

Snapshot storage is independent of live generation slots and remains valid after the originating session retires. The baseline never copies opaque C++ object representation into this envelope.

#include <holoscan/parameter_snapshot.hpp>

Distinct snapshot objects may be used concurrently. Concurrent const access to one snapshot is safe, but assigning, moving, or destroying that object requires external exclusion from every access to the same object.


Constructors

ParamSnapshot

holoscan::ParamSnapshot::ParamSnapshot() = default

Construct an empty root-scoped snapshot.

The snapshot has zero source identities and no Operator records until populated by an admitted capture operation.


Methods

plan_digest

PlanDigest holoscan::ParamSnapshot::plan_digest() const noexcept

Return the semantic source-plan digest.

Returns: Exact digest of the source plan, or all zeros for an empty snapshot.

plan_generation

PlanGenerationId holoscan::ParamSnapshot::plan_generation() const noexcept

Return the source plan’s process-local generation identity.

Returns: Nonzero source generation for a captured snapshot, or zero when empty.

run_generation

RunGenerationId holoscan::ParamSnapshot::run_generation() const noexcept

Return the source run generation.

Returns: Nonzero source run generation for a captured snapshot, or zero when empty.

catalog_digest

ParamCatalogDigest holoscan::ParamSnapshot::catalog_digest() const noexcept

Return the source catalog digest.

A capture-only capability does not expose discovery metadata, so this digest intentionally differs from that handle’s empty ParamControlHandle::catalog projection while remaining equal to the same policy projection of a read-capable handle.

Offline slicing preserves this source capability identity rather than claiming a new catalog projection for the subset of already-owned snapshot records.

Returns: Exact plan/run-bound digest of the source capture policy’s visible catalog projection, or all zeros for an empty snapshot.

view

ParamReadView holoscan::ParamSnapshot::view() const noexcept

Return the captured immutable value view.

Returns: View selected by the capture operation.

consistency

ParamCaptureConsistency holoscan::ParamSnapshot::consistency() const noexcept

Return the capture consistency mode.

Returns: Consistency boundary established by the capture operation.

scope

const ParamSnapshotScope & holoscan::ParamSnapshot::scope() const noexcept

Return the owning structured capture or slice scope.

The reference remains valid until this snapshot is assigned or destroyed.

Returns: Borrowed scope retained by this snapshot.

accepted_through

std::optional<ParamUpdateSequence> holoscan::ParamSnapshot::accepted_through() const noexcept

Return the global accepted frontier for a stopped capture.

Returns: Accepted terminal sequence for a stopped capture, or empty for live-per-Operator capture.

published_through

std::optional<ParamUpdateSequence> holoscan::ParamSnapshot::published_through() const noexcept

Return the global published frontier for a stopped capture.

Superseded, canceled, rolled-back, and failed-stopped sequences create permanent holes. A lower value than accepted_through records one of those terminal outcomes after this frontier; it does not imply pending publication. Accepted-no-change remains a distinct state and is never relabeled as published.

Returns: Highest contiguous accepted sequence whose intent is reflected by the published view, either through publication or an equality-proven accepted-no-change result; empty for live-per-Operator capture.

operators

std::span<const ParamSnapshotOperatorRecord> holoscan::ParamSnapshot::operators() const noexcept

Return owning per-Operator records.

The span remains valid until this snapshot is assigned or destroyed. Concurrent reads are safe while no thread mutates the same snapshot object.

Returns: Borrowed canonical records owned by this snapshot.

slice

expected<ParamSnapshot, Error> holoscan::ParamSnapshot::slice(
const ParamSnapshotScope &scope
) const

Return an owning snapshot restricted to one structured scope.

Slicing reads only this snapshot, performs no live-runtime lookup, and grants no update authority. A slice can retain or narrow the source record-container scope and can never add an Operator or field omitted by the originating capture policy.

Returns: Independent owning snapshot with preserved source and consistency metadata.

Parameters

scope
const ParamSnapshotScope &

Root, embedded-Graph, or Operator scope to select.


Member variables

NameTypeDescription
plan_digest_PlanDigest
plan_generation_PlanGenerationId
run_generation_RunGenerationId
catalog_digest_ParamCatalogDigest
view_ParamReadView
consistency_ParamCaptureConsistency
scope_ParamSnapshotScope
accepted_through_std::optional< ParamUpdateSequence >
published_through_std::optional< ParamUpdateSequence >
operators_std::vector< ParamSnapshotOperatorRecord >
has_archive_identity_bool
archive_semantic_version_std::uint32_t
archive_semantic_sha256_std::array< std::byte, 32 >
archive_raw_source_version_std::uint32_t
archive_raw_source_sha256_std::array< std::byte, 32 >
archive_raw_source_bytes_std::uint64_t
archive_profile_std::optional< Profile >
archive_source_run_identity_std::optional< std::string >