Skip to content
Start free evaluation

pdcomm_gem_formatted_program_verification_request_respond

Function

Sends the S7F32 acknowledge for a received S7F31.

PdcommStatus pdcomm_gem_formatted_program_verification_request_respond(PdcommTcpEndpoint *endpoint, PdcommGemResult *result, uint8_t acknowledgement)

Declared in: #include <pdcomm_gem_formatted_program_verification_requests.h>

Equipment only. On success the result outcome becomes #PDCOMM_GEM_REPLIED and reply_sent becomes 1. The prepared reply is kept when queuing fails, so a call that returned #PDCOMM_BACKPRESSURE can be repeated with the same code. After the reply is sent, a repeated call with the same code returns #PDCOMM_OK without sending again, and a call with another code returns #PDCOMM_STALE_TOKEN.

Parameters

NameDescription
endpointEquipment endpoint in the GEM COMMUNICATING state.
resultResult whose outcome is #PDCOMM_GEM_FORMATTED_PROGRAM_VERIFICATION_REQUEST_RECEIVED.
acknowledgementACKC7 code from 0 to 7.

Returns

#PDCOMM_OK when S7F32 was queued or had already been sent with acknowledgement; #PDCOMM_INVALID_ARGUMENT when endpoint or result is NULL or acknowledgement is above 7; #PDCOMM_INVALID_STATE when the endpoint is not an Equipment in the COMMUNICATING state, the service is not configured, or result is not a verification request result; #PDCOMM_STALE_TOKEN when result is not a received S7F31, came from another endpoint or an earlier HSMS session or selection, or an earlier attempt prepared or sent a different code; #PDCOMM_BACKPRESSURE when a staged TCP event must be drained first or the TCP send queue is full (retry later); other TCP statuses when the reply cannot be queued; #PDCOMM_POISONED when the endpoint is poisoned.

Notes

  • Thread safety: serialize with every other call on endpoint, and do not read result from another thread during this call.