Skip to content
Start free evaluation

pdcomm::GemFormattedProgramDryRunReport

Class

Read-only structural analysis of the selected formatted program.

class GemFormattedProgramDryRunReport

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

dryRunFormattedProgram() 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 = default

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

GemFormattedProgramDryRunReport

Constructor

Takes ownership of the native handle owned by other.

GemFormattedProgramDryRunReport(GemFormattedProgramDryRunReport &&other) noexcept

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

Parameters

NameDescription
otherSource wrapper; it becomes empty.

GemFormattedProgramDryRunReport

Constructor

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

GemFormattedProgramDryRunReport(const GemFormattedProgramDryRunReport &) = delete

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

info

Method

Returns the summary of the report.

GemFormattedProgramDryRunInfo info() const

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

Returns

Outcome, policy, captured generations, sizes and issue count.

Notes

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

issue

Method

Returns one finding of the report.

GemFormattedProgramDryRunIssueInfo issue(size_t index) const

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

Parameters

NameDescription
indexZero-based finding position, less than GemFormattedProgramDryRunInfo::issueCount.

Returns

Code, severity, presence bits and values.

Notes

  • Throws pdcomm::Error: PDCOMM_OUT_OF_RANGE for an invalid index; PDCOMM_INVALID_ARGUMENT for an empty report.

model

Method

Copies the MDLN of the analysed program.

std::string model() const

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

Returns

The model text.

Notes

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

nativeHandle

Method

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

const PdcommGemFormattedProgramDryRunReportHandle *nativeHandle() const noexcept

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

Returns

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 noexcept

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

Returns

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) noexcept

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

Parameters

NameDescription
otherSource wrapper; it becomes empty.

Returns

This wrapper.

operator=

Method

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

GemFormattedProgramDryRunReport &operator=(const GemFormattedProgramDryRunReport &) = delete

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

programId

Method

Returns the PPID of the analysed program as an item.

SecsItem programId() const

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

Returns

An independently owned ASCII or Binary item.

Notes

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

programIdBytes

Method

Copies the raw PPID bytes of the analysed program.

std::vector<uint8_t> programIdBytes() const

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

Returns

The PPID payload; use GemFormattedProgramDryRunInfo::idFormat for its format.

Notes

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

softwareRevision

Method

Copies the SOFTREV of the analysed program.

std::string softwareRevision() const

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

Returns

The software revision text.

Notes

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

~GemFormattedProgramDryRunReport

Method

Releases the native handle with pdcomm_gem_formatted_program_dry_run_destroy().

~GemFormattedProgramDryRunReport()

Declared in: #include <pdcomm_gem_formatted_program_dry_runs.hpp>

An empty report releases nothing.