Skip to content
Start free evaluation

pdcomm_gem_host_acknowledge_alarm

Function

Sends the S5F2 Alarm Report Acknowledge for a received W=1 alarm report.

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

Declared in: #include <pdcomm_gem_alarms.h>

A Host validates every S5F1 it receives but never acknowledges it automatically. The result owns its body and its transaction origin, so the original TCP event may already be destroyed. The result is marked acknowledged, and its PdcommGemResultInfo receives the acknowledgement and reply_sent = 1, only after the S5F2 has been accepted for sending. An allocation or backpressure failure leaves the result retryable.

Parameters

NameDescription
endpointThe Host endpoint that produced result.
resultResult with outcome #PDCOMM_GEM_ALARM_RECEIVED.
acknowledgementACKC5 value, 0 (accepted) to 63 (error codes).

Returns

#PDCOMM_OK when S5F2 was queued; #PDCOMM_INVALID_ARGUMENT when endpoint or result is NULL, acknowledgement is above 63, or result is not an alarm result; #PDCOMM_INVALID_STATE when result is a list reply or a W=0 report, the endpoint has no GEM Host, or communication is not COMMUNICATING; #PDCOMM_STALE_TOKEN when the report came from another endpoint, an older connection generation or selection, was already acknowledged, or its reply slot is no longer open; #PDCOMM_BACKPRESSURE when a TCP event is staged or the TCP queue is full; #PDCOMM_INVALID_DATA, #PDCOMM_LIMIT_EXCEEDED, or #PDCOMM_ALLOCATION_FAILED; #PDCOMM_POISONED when the endpoint is poisoned or a panic was contained; or another TCP reply status, as for pdcomm_tcp_reply().

Notes

  • Thread safety: this call mutates result. Do not run it concurrently with getters on the same result or with pdcomm_gem_result_destroy().