pdcomm_gem_formatted_program_execution_submit_action_result
Function
Reports the application's result for the pending action.
PdcommStatus pdcomm_gem_formatted_program_execution_submit_action_result(PdcommTcpEndpoint *endpoint, const PdcommGemFormattedProgramExecutionActionToken *action_token, uint32_t result)Valid results per action kind:
- Start: ACCEPTED, REJECTED, FAILED, OUTCOME_UNKNOWN.
- Step: APPLIED, REJECTED, FAILED, OUTCOME_UNKNOWN.
- Cancel: CANCELLED, REJECTED, FAILED, OUTCOME_UNKNOWN.
Reporting the same result again for an already resolved action succeeds without changing state.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint with formatted program queries configured. |
action_token | Token built from the action's ::PdcommGemFormattedProgramExecutionActionInfo. |
result | A PDCOMM_GEM_FORMATTED_PROGRAM_EXECUTION_ACTION_RESULT_* value. |
Returns
#PDCOMM_OK on success or on an identical repeat; #PDCOMM_INVALID_ARGUMENT when endpoint or action_token is NULL, the token has an invalid size, version, kind, or reserved field, result is unknown, or result is not valid for the action kind; #PDCOMM_STALE_TOKEN when the token does not identify the current execution or its pending action, or a different result was already reported for the action; #PDCOMM_INVALID_STATE when execution tracking is not available; #PDCOMM_LIMIT_EXCEEDED when a counter overflows; #PDCOMM_BACKPRESSURE when the endpoint holds a staged TCP event; #PDCOMM_POISONED.