pdcomm_gem_formatted_program_execution_cancel
Function
Requests cancellation of the execution as a Cancel action.
PdcommStatus pdcomm_gem_formatted_program_execution_cancel(PdcommTcpEndpoint *endpoint, const PdcommGemFormattedProgramExecutionToken *execution_token, PdcommGemFormattedProgramExecutionActionHandle **out_action)Allowed in RUNNING; the state becomes CANCEL_PENDING. In CANCEL_PENDING the call returns the pending Cancel action again. Resolve a pending Start or Step action before cancelling. A connection is not required.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint with formatted program queries configured. |
execution_token | Token of the current execution. |
out_action | Receives the Cancel action. When endpoint is valid and not poisoned, it is set to NULL first, so it is NULL after every later failure. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when a pointer is NULL or the token has an invalid size, version, or reserved field; #PDCOMM_STALE_TOKEN when the token does not identify the current execution; #PDCOMM_INVALID_STATE when execution tracking is not available or the state is not RUNNING or CANCEL_PENDING; #PDCOMM_LIMIT_EXCEEDED when the action history or sequence counter is exhausted; #PDCOMM_BACKPRESSURE when the endpoint holds a staged TCP event; #PDCOMM_ALLOCATION_FAILED; #PDCOMM_POISONED.
Notes
- Ownership: release the action with pdcomm_gem_formatted_program_execution_action_destroy().