Skip to content
Start free evaluation

pdcomm_gem_formatted_program_query_submit

Function

Sends an S7F25 Formatted Process Program Request to the equipment.

PdcommStatus pdcomm_gem_formatted_program_query_submit(PdcommTcpEndpoint *endpoint, const PdcommSecsItem *id, PdcommTcpToken *out_token)

Declared in: #include <pdcomm_gem_formatted_program_queries.h>

Host only. The PPID is copied before S7F25 is queued. Success means the request was accepted for sending; the S7F26 reply, a T3 timeout, or a disconnection is reported later through pdcomm_gem_handle_event() with the returned token.

Parameters

NameDescription
endpointHost endpoint in the GEM COMMUNICATING state.
idPPID: a nonempty ASCII or Binary item of at most 120 bytes.
out_tokenReceives the transaction token. It is zeroed first whenever it is not NULL, so it is zero after every failure.

Returns

#PDCOMM_OK when S7F25 was queued; #PDCOMM_INVALID_ARGUMENT when endpoint, id, or out_token is NULL, id is not an ASCII or Binary item, or the PPID is empty or longer than 120 bytes; #PDCOMM_INVALID_STATE when the endpoint is not a Host in the COMMUNICATING state or the service is not configured; #PDCOMM_LIMIT_EXCEEDED when max_pending requests are already waiting or the message exceeds the endpoint's SECS-II limits; #PDCOMM_BACKPRESSURE when a staged TCP event must be drained first, all 32 GEM request slots are in use, or the TCP send queue is full; other TCP statuses such as #PDCOMM_IO_ERROR when the request cannot be queued; #PDCOMM_POISONED when the endpoint is poisoned.

Notes

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