> 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/sendalarmreport.md).

# SendAlarmReport

#### int SendAlarmReport(int ALID, short ALCD)

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

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

ALCD의 bit 8 = 1은 알람의 발생(Set)을 의미하고

ALCD의 bit 8 = 0은 알람의 해제(cleared)를 의미합니다.

Alarm Set의 ALCD = 0x80 + EZGemPlus.GetAlarmCode(ALID); - 사용자가 ALCD를 만들어야 합니다.

Alarm Clear의 ALCD = 0x00 – 0x00 입력 시 자동으로 ALCD값을 더하여 전송, ALCD 값은 AddALID에서 입력한 값입니다.

Parameters

<table data-header-hidden><thead><tr><th width="146" valign="top"></th><th width="184" 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></tbody></table>

```csharp
//알람을 발생시킬때
int nALID = Convert.ToInt32(strAlarmId);
short nAlcd = (short)m_gem.GetAlarmCode(nALID);
nAlcd += 0x80;
m_gem.SendAlarmReport(nALID, nAlcd);

//알람을 해제시킬때
 int nALID = Convert.ToInt32(strAlarmId);
 short nAlcd = (short)m_gem.GetAlarmCode(nALID);
 m_gem.SendAlarmReport(nALID, 0);
```

```log
11:10:55(007) , [HSMS:OUT   ]  00 00 85 01 00 00 00 00 00 05 01 03 21 01 81 B1 04 00 00 0F A3 41 0A 34 30 30 33 5F 41 4C 41 52 4D 
11:10:55(007) , [SECS-II:OUT]  S5F1, DeviceID=0, WBit=1, SystemByte=00000005, TotalLength=33, MsgQue=1
		<S5F1W
		   <L[3/1]
		      <B[1/1] 0x81>		//알람발생
		      <U4[1/1] 4003>
		      <A[10/1] '4003_ALARM'>
		   >
		>
11:10:55(023) , [EZNET:EVENT]  [Callback Event] -> EventID=412, param=65541
11:10:55(055) , [EZNET:EVENT]  [Callback Event] -> EventID=402, param=5001
11:10:55(075) , [HSMS:IN    ]  00 00 05 02 00 00 00 00 00 05 21 01 00 
11:10:55(079) , [SECS-II:IN ]  S5F2, DeviceID=0, WBit=0, SystemByte=00000005, TotalLength=13, MsgQue=1
		<S5F2
		   <B[1/1] 0x00>   /* ACKC5 */
		>
11:10:55(103) , [EZNET:EVENT]  [Callback Event] -> EventID=411, param=65542
11:10:55(119) , [EZNET:EVENT]  [Callback Event] -> EventID=401, param=5002
11:11:07(445) , [HSMS:OUT   ]  00 00 85 01 00 00 00 00 00 07 01 03 21 01 01 B1 04 00 00 0F A3 41 0A 34 30 30 33 5F 41 4C 41 52 4D 
11:11:07(445) , [SECS-II:OUT]  S5F1, DeviceID=0, WBit=1, SystemByte=00000007, TotalLength=33, MsgQue=1
		<S5F1W
		   <L[3/1]
		      <B[1/1] 0x01>		//알람해제
		      <U4[1/1] 4003>
		      <A[10/1] '4003_ALARM'>
		   >
		>
11:11:07(468) , [EZNET:EVENT]  [Callback Event] -> EventID=412, param=65543
11:11:07(479) , [EZNET:EVENT]  [Callback Event] -> EventID=402, param=5001
11:11:07(487) , [HSMS:IN    ]  00 00 05 02 00 00 00 00 00 07 21 01 00 
11:11:07(500) , [SECS-II:IN ]  S5F2, DeviceID=0, WBit=0, SystemByte=00000007, TotalLength=13, MsgQue=1
		<S5F2
		   <B[1/1] 0x00>   /* ACKC5 */
		>
```


---

# 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/sendalarmreport.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.
