Skip to content
Start free evaluation

pdcomm::GemFormattedProgramExecutionSnapshot

Class

Immutable copy of the equipment's formatted program execution state.

class GemFormattedProgramExecutionSnapshot

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Get one from formattedProgramExecutionSnapshot(). It owns its contents, including a copy of the executed program and the application detail bytes, and stays valid after later changes and endpoint destruction.

Notes

  • Move-only RAII wrapper. Getters may run concurrently; destruction must not race with them. Getters on an empty snapshot throw pdcomm::Error with PDCOMM_INVALID_ARGUMENT.

Members

GemFormattedProgramExecutionSnapshot

Constructor

Creates an empty snapshot that owns no native handle.

GemFormattedProgramExecutionSnapshot() noexcept = default

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

GemFormattedProgramExecutionSnapshot

Constructor

Takes ownership of the native handle owned by other.

GemFormattedProgramExecutionSnapshot(GemFormattedProgramExecutionSnapshot &&other) noexcept

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Parameters

NameDescription
otherSource wrapper; it becomes empty.

GemFormattedProgramExecutionSnapshot

Constructor

Copying is disabled; the wrapper exclusively owns its native handle.

GemFormattedProgramExecutionSnapshot(const GemFormattedProgramExecutionSnapshot &) = delete

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

applicationDetail

Method

Copies the detail bytes passed to completeFormattedProgramExecution().

std::vector<uint8_t> applicationDetail() const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Returns

The detail bytes; empty when none were reported.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_ARGUMENT for an empty snapshot.

commandCode

Method

Returns the CCODE of one command of the executed program.

SecsItem commandCode(size_t commandIndex) const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Parameters

NameDescription
commandIndexZero-based command position.

Returns

An independently owned item.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE when no execution exists; PDCOMM_OUT_OF_RANGE for an invalid index.

commandInfo

Method

Describes one command of the executed program.

GemFormattedProgramExecutionCommandInfo commandInfo(size_t commandIndex) const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Parameters

NameDescription
commandIndexZero-based command position, less than GemFormattedProgramExecutionInfo::commandCount.

Returns

Parameter count and CCODE format.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE when no execution exists; PDCOMM_OUT_OF_RANGE for an invalid index.

info

Method

Returns the execution state captured in the snapshot.

GemFormattedProgramExecutionInfo info() const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Returns

State, pending action, dry-run and application report data, and progress.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_ARGUMENT for an empty snapshot.

model

Method

Copies the MDLN of the executed program.

std::string model() const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Returns

The model text.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE when no execution exists.

nativeHandle

Method

Returns the owned native handle for read-only C API calls.

const PdcommGemFormattedProgramExecutionSnapshotHandle *nativeHandle() const noexcept

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Returns

The handle, or nullptr for an empty snapshot. Ownership stays with this wrapper.

operator bool

Method

Reports whether the wrapper owns a native snapshot.

explicit operator bool() const noexcept

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Returns

true when a snapshot is owned.

operator=

Method

Releases the current handle, then takes ownership of the handle owned by other.

GemFormattedProgramExecutionSnapshot &operator=(GemFormattedProgramExecutionSnapshot &&other) noexcept

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Parameters

NameDescription
otherSource wrapper; it becomes empty.

Returns

This wrapper.

operator=

Method

Copy assignment is disabled; the wrapper exclusively owns its native handle.

GemFormattedProgramExecutionSnapshot &operator=(const GemFormattedProgramExecutionSnapshot &) = delete

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

parameter

Method

Returns one PPARM of one command of the executed program.

SecsItem parameter(size_t commandIndex, size_t parameterIndex) const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Parameters

NameDescription
commandIndexZero-based command position.
parameterIndexZero-based parameter position.

Returns

An independently owned item.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE when no execution exists; PDCOMM_OUT_OF_RANGE for an invalid index.

programId

Method

Returns the PPID of the executed program.

SecsItem programId() const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Returns

An independently owned ASCII or Binary item.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE when no execution exists.

softwareRevision

Method

Copies the SOFTREV of the executed program.

std::string softwareRevision() const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Returns

The software revision text.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE when no execution exists.

~GemFormattedProgramExecutionSnapshot

Method

Releases the native handle with pdcomm_gem_formatted_program_execution_snapshot_destroy().

~GemFormattedProgramExecutionSnapshot()

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

An empty snapshot releases nothing.