Skip to content
Start free evaluation

pdcomm_gem_formatted_program_clear_selection

Function

Clears the current selection when the token matches it.

PdcommStatus pdcomm_gem_formatted_program_clear_selection(PdcommTcpEndpoint *endpoint, const PdcommGemFormattedProgramSelectionToken *token, uint8_t *out_cleared)

Declared in: #include <pdcomm_gem_formatted_program_selections.h>

A stale selection can be cleared too. When nothing is selected, an all-zero token (with a valid header) succeeds with *out_cleared = 0.

Parameters

NameDescription
endpointEquipment endpoint with the formatted program query service configured.
tokenToken of the current selection.
out_clearedReceives 1 when a selection was cleared, else 0. Set to 0 once token and out_cleared are valid.

Returns

#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint, token, or out_cleared is NULL, or the token header is invalid; #PDCOMM_STALE_TOKEN when the token does not match the current selection, or is not all-zero while nothing is selected; #PDCOMM_INVALID_STATE when the endpoint is not an Equipment or the query service is not configured; #PDCOMM_LIMIT_EXCEEDED when the selection revision is exhausted; #PDCOMM_BACKPRESSURE when a staged TCP event must be drained first; #PDCOMM_POISONED when the endpoint is poisoned.

Notes

  • Thread safety: serialize with every other call on endpoint.