pdcomm::GemFormattedProgramDryRunReport
Class
Read-only structural analysis of the selected formatted program.
class GemFormattedProgramDryRunReportdryRunFormattedProgram() compares the selected program with the equipment's S7F22 capability catalog: model and software revision, command count and size, known command codes and required commands. Checks that the library cannot decide, such as dependency and parameter semantics, are reported as indeterminate. A dry run never executes anything and does not guarantee that physical execution would succeed.
The report owns its contents. Pass it to startFormattedProgramExecution() to start an execution that is bound to this analysis.
auto token = pdcomm::selectFormattedProgram(equipment, id);
auto report = pdcomm::dryRunFormattedProgram(
equipment, token, pdcomm::gemFormattedProgramDryRunOptions(8, 4096));
if (report.info().outcome == PDCOMM_GEM_FORMATTED_PROGRAM_DRY_RUN_REJECT)
for (size_t i = 0; i < report.info().issueCount; ++i)
std::cout << report.issue(i).code << '\n';Notes
- Move-only RAII wrapper. Getters may run concurrently; destruction must not race with them. Getters on an empty report throw pdcomm::Error with
PDCOMM_INVALID_ARGUMENT.
Members
GemFormattedProgramDryRunReport
Constructor
Creates an empty report that owns no native handle.
GemFormattedProgramDryRunReport() noexcept = defaultGemFormattedProgramDryRunReport
Constructor
Takes ownership of the native handle owned by other.
GemFormattedProgramDryRunReport(GemFormattedProgramDryRunReport &&other) noexceptParameters
| Name | Description |
|---|---|
other | Source wrapper; it becomes empty. |
GemFormattedProgramDryRunReport
Constructor
Copying is disabled; the wrapper exclusively owns its native handle.
GemFormattedProgramDryRunReport(const GemFormattedProgramDryRunReport &) = deleteinfo
Method
Returns the summary of the report.
GemFormattedProgramDryRunInfo info() constReturns
Outcome, policy, captured generations, sizes and issue count.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_ARGUMENTfor an empty report.
issue
Method
Returns one finding of the report.
GemFormattedProgramDryRunIssueInfo issue(size_t index) constParameters
| Name | Description |
|---|---|
index | Zero-based finding position, less than GemFormattedProgramDryRunInfo::issueCount. |
Returns
Code, severity, presence bits and values.
Notes
- Throws
pdcomm::Error:PDCOMM_OUT_OF_RANGEfor an invalidindex;PDCOMM_INVALID_ARGUMENTfor an empty report.
model
Method
Copies the MDLN of the analysed program.
std::string model() constReturns
The model text.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_ARGUMENTfor an empty report.
nativeHandle
Method
Returns the owned native handle for read-only C API calls.
const PdcommGemFormattedProgramDryRunReportHandle *nativeHandle() const noexceptReturns
The handle, or nullptr for an empty report. Ownership stays with this wrapper.
operator bool
Method
Reports whether the wrapper owns a native report.
explicit operator bool() const noexceptReturns
true when a report is owned.
operator=
Method
Releases the current handle, then takes ownership of the handle owned by other.
GemFormattedProgramDryRunReport &operator=(GemFormattedProgramDryRunReport &&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.
GemFormattedProgramDryRunReport &operator=(const GemFormattedProgramDryRunReport &) = deleteprogramId
Method
Returns the PPID of the analysed program as an item.
SecsItem programId() constReturns
An independently owned ASCII or Binary item.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_ARGUMENTfor an empty report.
programIdBytes
Method
Copies the raw PPID bytes of the analysed program.
std::vector<uint8_t> programIdBytes() constReturns
The PPID payload; use GemFormattedProgramDryRunInfo::idFormat for its format.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_ARGUMENTfor an empty report.
softwareRevision
Method
Copies the SOFTREV of the analysed program.
std::string softwareRevision() constReturns
The software revision text.
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_ARGUMENTfor an empty report.
~GemFormattedProgramDryRunReport
Method
Releases the native handle with pdcomm_gem_formatted_program_dry_run_destroy().
~GemFormattedProgramDryRunReport()An empty report releases nothing.