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)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
| Name | Description |
|---|---|
endpoint | Equipment endpoint that runs the execution. |
token | Token of the execution. |
reportId | Application-defined report identifier. |
outcome | PDCOMM_GEM_FORMATTED_PROGRAM_EXECUTION_TERMINAL_COMPLETE, ..._TERMINAL_FAIL or ..._TERMINAL_OUTCOME_UNKNOWN. |
detail | Application detail bytes, or nullptr when detailLength is 0. Copied. |
detailLength | Number of detail bytes. |
Notes
- Throws
pdcomm::Error:PDCOMM_INVALID_STATEwhen the execution is not running, an action is pending, or commands remain for a complete report;PDCOMM_STALE_TOKENfor a stale token or a conflicting repeated report;PDCOMM_INVALID_ARGUMENTfor an unknown outcome;PDCOMM_LIMIT_EXCEEDEDwhen the detail is too large.