Skip to content
Start free evaluation

pdcomm::GemFormattedProgramExecutionAction

Class

One action that the library asks the application to perform for an execution.

class GemFormattedProgramExecutionAction

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

An execution never touches equipment hardware. Instead it hands the application one action at a time: a start action with the program, a step action with the next command, or a cancel action. Perform the action on the tool, then report the result with submitFormattedProgramExecutionActionResult() using token(). The action owns copies of all data it exposes.

auto start = pdcomm::startFormattedProgramExecution(equipment, selection, report);
pdcomm::submitFormattedProgramExecutionActionResult(
    equipment, start.action.token(),
    PDCOMM_GEM_FORMATTED_PROGRAM_EXECUTION_ACTION_RESULT_ACCEPTED);
auto step = pdcomm::stepFormattedProgramExecution(equipment, start.token);
auto code = step.commandCode();  // apply the command on the tool
pdcomm::submitFormattedProgramExecutionActionResult(
    equipment, step.token(), PDCOMM_GEM_FORMATTED_PROGRAM_EXECUTION_ACTION_RESULT_APPLIED);

Notes

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

Members

GemFormattedProgramExecutionAction

Constructor

Creates an empty action that owns no native handle.

GemFormattedProgramExecutionAction() noexcept = default

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

GemFormattedProgramExecutionAction

Constructor

Takes ownership of the native handle owned by other.

GemFormattedProgramExecutionAction(GemFormattedProgramExecutionAction &&other) noexcept

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Parameters

NameDescription
otherSource wrapper; it becomes empty.

GemFormattedProgramExecutionAction

Constructor

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

GemFormattedProgramExecutionAction(const GemFormattedProgramExecutionAction &) = delete

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

commandCode

Method

Returns the CCODE of the command a step action asks to apply.

SecsItem commandCode() const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Returns

An independently owned item.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE when the action carries no command.

info

Method

Describes the action.

GemFormattedProgramExecutionActionInfo info() const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Returns

Kind, presence bits, identities, command position and counts.

Notes

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

model

Method

Copies the MDLN carried by a start action.

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 the action carries no program.

operator bool

Method

Reports whether the wrapper owns a native action.

explicit operator bool() const noexcept

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Returns

true when an action is owned.

operator=

Method

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

GemFormattedProgramExecutionAction &operator=(GemFormattedProgramExecutionAction &&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.

GemFormattedProgramExecutionAction &operator=(const GemFormattedProgramExecutionAction &) = delete

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

parameter

Method

Returns one PPARM of the command a step action asks to apply.

SecsItem parameter(size_t index) const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Parameters

NameDescription
indexZero-based parameter position, less than GemFormattedProgramExecutionActionInfo::parameterCount.

Returns

An independently owned item.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE when the action carries no command; PDCOMM_OUT_OF_RANGE for an invalid index.

programId

Method

Returns the PPID carried by a start action.

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 the action carries no program.

softwareRevision

Method

Copies the SOFTREV carried by a start action.

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 the action carries no program.

token

Method

Returns the token to report this action's result with.

GemFormattedProgramExecutionActionToken token() const

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Returns

The action token built from info().

Notes

  • Throws pdcomm::Error: Same statuses as info().

~GemFormattedProgramExecutionAction

Method

Releases the native handle with pdcomm_gem_formatted_program_execution_action_destroy().

~GemFormattedProgramExecutionAction()

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

An empty action releases nothing.