pdcomm::validateFormattedProgramSelection
Function
Confirms that token still names a ready selection and returns its program.
inline GemFormattedProgramSelectionSnapshot validateFormattedProgramSelection(GemEquipment &endpoint, const GemFormattedProgramSelectionToken &token, uint32_t *outStaleReason = nullptr)Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint with formatted program requests configured. |
token | Token returned by selectFormattedProgram(). |
outStaleReason | Optional output. It receives a PDCOMM_GEM_FORMATTED_PROGRAM_SELECTION_STALE_* value, also when the call throws: ..._STALE_CLEARED when nothing is selected, ..._STALE_TOKEN_MISMATCH for another selection, or the reason the selection became stale. |
Returns
A snapshot of the ready selection, valid for execution.
Notes
- Throws
pdcomm::Error:PDCOMM_STALE_TOKENwhen the selection is cleared, different or stale;PDCOMM_INVALID_STATEon a host or without a store.