pdcomm_gem_formatted_program_selection_snapshot
Function
Copies the current selection state, and the selected program if any, into a new snapshot.
PdcommStatus pdcomm_gem_formatted_program_selection_snapshot(PdcommTcpEndpoint *endpoint, PdcommGemFormattedProgramSelectionSnapshot **out_snapshot)The snapshot reports EMPTY, READY, or STALE as evaluated at the time of the call. A STALE snapshot still contains the program captured at selection.
Parameters
| Name | Description |
|---|---|
endpoint | Equipment endpoint with the formatted program query service configured. |
out_snapshot | Receives the snapshot. Set to NULL first, so it is NULL after every failure on a valid endpoint. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint or out_snapshot is NULL; #PDCOMM_INVALID_STATE when the endpoint is not an Equipment or the query service is not configured; #PDCOMM_BACKPRESSURE when a staged TCP event must be drained first; #PDCOMM_ALLOCATION_FAILED or #PDCOMM_LIMIT_EXCEEDED when the copy cannot be made; #PDCOMM_POISONED when the endpoint is poisoned.
Notes
- Ownership: release the snapshot with pdcomm_gem_formatted_program_selection_snapshot_destroy().
- Thread safety: serialize with every other call on
endpoint.