Skip to content
Start free evaluation

pdcomm_gem_formatted_program_capability_submit

Function

Sends an S7F21 capability request from the host.

PdcommStatus pdcomm_gem_formatted_program_capability_submit(PdcommTcpEndpoint *endpoint, PdcommTcpToken *out_token)

Declared in: #include <pdcomm_gem_formatted_program_capabilities.h>

The request is queued on the HSMS session; success means the request was accepted for sending, not that S7F22 arrived. Route later TCP events through pdcomm_gem_handle_event(): the reply produces a result with outcome #PDCOMM_GEM_FORMATTED_PROGRAM_CAPABILITY_RESULT, or a #PDCOMM_GEM_INVALID_RESPONSE result with code #PDCOMM_GEM_ERROR_CODEC when the S7F22 body is malformed or exceeds the configured limits, or a #PDCOMM_GEM_FAILED result on timeout or disconnection.

Parameters

NameDescription
endpointHost endpoint with configured capabilities.
out_tokenReceives the transaction token. Zeroed first, so it is zero after every failure.

Returns

#PDCOMM_OK when the request was queued; #PDCOMM_INVALID_ARGUMENT when out_token or endpoint is NULL; #PDCOMM_INVALID_STATE when the endpoint is not a GEM host, GEM communication is not established (E30 COMMUNICATING), or capabilities are not configured; #PDCOMM_BACKPRESSURE when the endpoint holds a staged TCP event, all 32 GEM request slots are in use, or the send queue is full; #PDCOMM_LIMIT_EXCEEDED when max_pending requests are outstanding; other TCP statuses such as #PDCOMM_IO_ERROR when the session rejects the send; #PDCOMM_POISONED.