Skip to content
Start free evaluation

pdcomm_tcp_select

Function

Sends Select.req to enter the SELECTED state.

PdcommStatus pdcomm_tcp_select(PdcommTcpEndpoint *endpoint, PdcommTcpToken *out_token)

Declared in: #include <pdcomm_tcp.h>

An active endpoint already sends Select.req automatically after each connection; use this call to select again after a Deselect or a rejected selection. Success moves the endpoint to #PDCOMM_TCP_SELECTED, reported as a #PDCOMM_TCP_STATE_CHANGED event. A failure produces a #PDCOMM_TCP_FAILED event for the returned token, for example #PDCOMM_TCP_SELECT_STATUS or #PDCOMM_TCP_T6_TIMEOUT.

Parameters

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

Returns

#PDCOMM_OK when Select.req was queued; #PDCOMM_INVALID_ARGUMENT when out_token or endpoint is NULL; #PDCOMM_INVALID_STATE when the endpoint is not NOT SELECTED; #PDCOMM_BACKPRESSURE when a Select 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.