pdcomm::GemFormattedProgramExecutionSnapshot
Class
Immutable copy of the equipment's formatted program execution state.
class GemFormattedProgramExecutionSnapshotGet 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 = defaultGemFormattedProgramExecutionSnapshot
Constructor
Takes ownership of the native handle owned by other.
GemFormattedProgramExecutionSnapshot(GemFormattedProgramExecutionSnapshot &&other) noexceptParameters
| Name | Description |
|---|---|
other | Source wrapper; it becomes empty. |
GemFormattedProgramExecutionSnapshot
Constructor
Copying is disabled; the wrapper exclusively owns its native handle.
GemFormattedProgramExecutionSnapshot(const GemFormattedProgramExecutionSnapshot &) = deleteapplicationDetail
Method
Copies the detail bytes passed to completeFormattedProgramExecution().
std::vector<uint8_t> applicationDetail() constReturns
The detail bytes; empty when none were reported.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_ARGUMENTfor an empty snapshot.
commandCode
Method
Returns the CCODE of one command of the executed program.
SecsItem commandCode(size_t commandIndex) constParameters
| Name | Description |
|---|---|
commandIndex | Zero-based command position. |
Returns
An independently owned item.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_STATEwhen no execution exists;PDCOMM_OUT_OF_RANGEfor an invalid index.
commandInfo
Method
Describes one command of the executed program.
GemFormattedProgramExecutionCommandInfo commandInfo(size_t commandIndex) constParameters
| Name | Description |
|---|---|
commandIndex | Zero-based command position, less than GemFormattedProgramExecutionInfo::commandCount. |
Returns
Parameter count and CCODE format.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_STATEwhen no execution exists;PDCOMM_OUT_OF_RANGEfor an invalid index.
info
Method
Returns the execution state captured in the snapshot.
GemFormattedProgramExecutionInfo info() constReturns
State, pending action, dry-run and application report data, and progress.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_ARGUMENTfor an empty snapshot.
model
Method
Copies the MDLN of the executed program.
std::string model() constReturns
The model text.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_STATEwhen no execution exists.
nativeHandle
Method
Returns the owned native handle for read-only C API calls.
const PdcommGemFormattedProgramExecutionSnapshotHandle *nativeHandle() const noexceptReturns
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 noexceptReturns
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) noexceptParameters
| Name | Description |
|---|---|
other | Source wrapper; it becomes empty. |
Returns
This wrapper.
operator=
Method
Copy assignment is disabled; the wrapper exclusively owns its native handle.
GemFormattedProgramExecutionSnapshot &operator=(const GemFormattedProgramExecutionSnapshot &) = deleteparameter
Method
Returns one PPARM of one command of the executed program.
SecsItem parameter(size_t commandIndex, size_t parameterIndex) constParameters
| Name | Description |
|---|---|
commandIndex | Zero-based command position. |
parameterIndex | Zero-based parameter position. |
Returns
An independently owned item.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_STATEwhen no execution exists;PDCOMM_OUT_OF_RANGEfor an invalid index.
programId
Method
Returns the PPID of the executed program.
SecsItem programId() constReturns
An independently owned ASCII or Binary item.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_STATEwhen no execution exists.
softwareRevision
Method
Copies the SOFTREV of the executed program.
std::string softwareRevision() constReturns
The software revision text.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_STATEwhen no execution exists.
~GemFormattedProgramExecutionSnapshot
Method
Releases the native handle with pdcomm_gem_formatted_program_execution_snapshot_destroy().
~GemFormattedProgramExecutionSnapshot()An empty snapshot releases nothing.