Skip to content
Start free evaluation

pdcomm::completeFormattedProgramExecution

Function

Submits the application's final report for a running execution.

inline void completeFormattedProgramExecution(GemEquipment &endpoint, const GemFormattedProgramExecutionToken &token, uint64_t reportId, uint32_t outcome, const uint8_t *detail, size_t detailLength)

Declared in: #include <pdcomm_gem_formatted_program_executions.hpp>

Allowed while the execution is running with no pending action; PDCOMM_GEM_FORMATTED_PROGRAM_EXECUTION_TERMINAL_COMPLETE also needs every command to be applied. Repeating an identical report is accepted.

Parameters

NameDescription
endpointEquipment endpoint that runs the execution.
tokenToken of the execution.
reportIdApplication-defined report identifier.
outcomePDCOMM_GEM_FORMATTED_PROGRAM_EXECUTION_TERMINAL_COMPLETE, ..._TERMINAL_FAIL or ..._TERMINAL_OUTCOME_UNKNOWN.
detailApplication detail bytes, or nullptr when detailLength is 0. Copied.
detailLengthNumber of detail bytes.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_STATE when the execution is not running, an action is pending, or commands remain for a complete report; PDCOMM_STALE_TOKEN for a stale token or a conflicting repeated report; PDCOMM_INVALID_ARGUMENT for an unknown outcome; PDCOMM_LIMIT_EXCEEDED when the detail is too large.