> For the complete documentation index, see [llms.txt](https://nviasoft.gitbook.io/nviasoft-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nviasoft.gitbook.io/nviasoft-docs/api-reference/alarm/sendalarmreportex.md).

# SendAlarmReportEx

#### int SendAlarmReportEx(int ALID, short ALCD, short nMode)

EZGemPlus에 추가되어 있는 ALID를 S5F1\[W] Alarm Report Send 메시지로 Host에 전송해주는 함수.

전송 시 nMode값에 따라 알람의 발생 및 해제여부를 결정하게 됩니다.

nMode > 0 -> Alarm Set -> S5F1\[W]의 ALCD 값은 0x80 + 입력 받은ALCD%0x80값으로 설정 됨

nMode = 0 -> Alarm Clear -> S5F1\[W]의 ALCD 값은 입력 받은 ALCD값으로 설정됨

{% hint style="warning" %}
AddALID에서 설정한 ALID와 상관없이 자유롭게 ALCD를 설정하여 보낼 수 있도록 해주는 함수입니다. 특별한 경우가 아니면 SendAlarmReport 함수 사용을 권장합니다.
{% endhint %}

Parameters

<table data-header-hidden><thead><tr><th width="169" valign="top"></th><th width="121" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Name</td><td valign="top">Type</td><td valign="top">Description</td></tr><tr><td valign="top">ALID</td><td valign="top">int</td><td valign="top">전송하고자 하는 ALID</td></tr><tr><td valign="top">ALCD</td><td valign="top">short</td><td valign="top">전송 시 ALCD</td></tr><tr><td valign="top">nMode</td><td valign="top">short</td><td valign="top">0보다 클시 = 알람Set,  0일시 알람Clear</td></tr></tbody></table>

```csharp
m_gem.SendAlarmReportEx(4001,2,1);    //4001번 / 0x82 / 알람발생
m_gem.SendAlarmReportEx(4001,2,0);    //4001번 / 0x02 / 알람해제

m_gem.SendAlarmReportEx(4002,6,1);    //4002번 / 0x86 / 알람발생
m_gem.SendAlarmReportEx(4002,6,0);    //4002번 / 0x06 / 알람해제
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nviasoft.gitbook.io/nviasoft-docs/api-reference/alarm/sendalarmreportex.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
