Skip to content
Start free evaluation

pdcomm_gem_formatted_program_transfer_respond

Function

Sends the S7F24 acknowledge for a received S7F23 without storing the program.

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

Declared in: #include <pdcomm_gem_formatted_program_transfers.h>

Equipment only. Equivalent to pdcomm_gem_formatted_program_transfer_respond_and_store() with #PDCOMM_GEM_FORMATTED_PROGRAM_RESPOND_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 committed, a repeated call with the same code returns #PDCOMM_OK without sending again.

Parameters

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

Returns

#PDCOMM_OK when S7F24 was queued or had already been sent with the same code; #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 transfer result; #PDCOMM_STALE_TOKEN when result is not a received S7F23, came from another endpoint or an earlier HSMS session or selection, or was already answered or prepared with another code or a store action; #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.