Skip to content
Start free evaluation

pdcomm_gem_host_enable_alarm

Function

Sends S5F3 Enable/Disable Alarm Send from a Host.

PdcommStatus pdcomm_gem_host_enable_alarm(PdcommTcpEndpoint *endpoint, uint32_t id, uint8_t enabled, uint8_t reply_expected, PdcommTcpToken *out_token)

Declared in: #include <pdcomm_gem_alarms.h>

The body is L[ALED, ALID], with ALED a Binary byte of 0x80 (enable) or 0x00 (disable) and ALID a U4. With W=1 the request occupies a native pending slot and pdcomm_gem_handle_event() later yields a RESPONSE result with outcome #PDCOMM_GEM_ALARM_ENABLE_ACK and the ACKC5 value. With W=0 no pending slot is used and no reply is expected.

Parameters

NameDescription
endpointEndpoint with a configured GEM Host.
idAlarm ID (ALID).
enabled1 to enable reporting of the alarm, 0 to disable it.
reply_expected1 to send with W=1, 0 to send with W=0.
out_tokenReceives the transport token of the accepted message; zero after every failure.

Returns

#PDCOMM_OK when the message was queued (queue acceptance only); #PDCOMM_INVALID_ARGUMENT when endpoint or out_token is NULL, or enabled or reply_expected is not 0 or 1; #PDCOMM_INVALID_STATE when the endpoint has no GEM Host, communication is not COMMUNICATING, or the HSMS session is not selected; #PDCOMM_BACKPRESSURE when a TCP event is staged, all 32 pending slots are busy (W=1 only), or the TCP queue is full or stopping; #PDCOMM_LIMIT_EXCEEDED or #PDCOMM_ALLOCATION_FAILED; #PDCOMM_POISONED when the endpoint is poisoned or a panic was contained; or another TCP submission status, as for pdcomm_tcp_request().