pdcomm_tcp_deselect
Function
Sends Deselect.req to leave the SELECTED state.
PdcommStatus pdcomm_tcp_deselect(PdcommTcpEndpoint *endpoint, PdcommTcpToken *out_token)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
| Name | Description |
|---|---|
endpoint | Live endpoint in the #PDCOMM_TCP_SELECTED state. |
out_token | Receives 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.