Skip to content
Start free evaluation

pdcomm_tcp_deselect

Function

Sends Deselect.req to leave the SELECTED state.

PdcommStatus pdcomm_tcp_deselect(PdcommTcpEndpoint *endpoint, PdcommTcpToken *out_token)

Declared in: #include <pdcomm_tcp.h>

When the peer answers with DeselectStatus 0, every open transaction fails with #PDCOMM_TCP_DESELECTED, unanswered received primaries are dropped, and the state becomes #PDCOMM_TCP_NOT_SELECTED with the T7 timer running. A nonzero status produces #PDCOMM_TCP_DESELECT_STATUS for the returned token. Peers that implement only HSMS-SS (SEMI E37.1) might not support Deselect.

Parameters

NameDescription
endpointLive endpoint in the #PDCOMM_TCP_SELECTED state.
out_tokenReceives the control transaction token; all zeros after every failure. Must not be NULL.

Returns

#PDCOMM_OK when Deselect.req was queued; #PDCOMM_INVALID_ARGUMENT when out_token or endpoint is NULL; #PDCOMM_INVALID_STATE when the endpoint is not SELECTED; #PDCOMM_BACKPRESSURE when a Deselect is already outstanding, all transaction slots are in use, an event is staged, a queue is full, or the endpoint is stopping; #PDCOMM_LIMIT_EXCEEDED when the system bytes are exhausted; #PDCOMM_POISONED.