Skip to content
Start free evaluation

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)

Declared in: #include <pdcomm_gem_formatted_program_selections.hpp>

Parameters

NameDescription
endpointEquipment endpoint with formatted program requests configured.
tokenToken returned by selectFormattedProgram().
outStaleReasonOptional 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_TOKEN when the selection is cleared, different or stale; PDCOMM_INVALID_STATE on a host or without a store.