# ReplyHostSetECID

### int ReplyHostSetECID(int lMsgId, short EAC)

호스트로부터 수신된 S2F15 (New Equipment Constant Send) 메시지에 대한 응답(`S2F16`)을 전송합니다. 사용자는 라이브러리 이벤트에서 수신된 내용을 확인하고, 설정값 변경이 성공했는지 여부를 EAC 값에 담아 이 함수를 호출하면 됩니다.

{% hint style="info" %}
GetHostSetECID()와 사용하면 더욱 편리합니다.
{% endhint %}

Parameters

<table data-header-hidden><thead><tr><th width="205" valign="top"></th><th width="101" 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">lMsgId</td><td valign="top">int</td><td valign="top">수신한 S2F15W의 Message의 ID</td></tr><tr><td valign="top">EAC</td><td valign="top">short</td><td valign="top">S2F16에 설정할 응답코드</td></tr></tbody></table>

```csharp
public void OnNewHOST_ECID(int lMsgId)
{
    int nECCount = 0;
    int nECID = 0;
    string strNewValue = "";


    nECCount = 0;
    while (nECCount > -1)
    {
        nECCount = m_gem.GetHostSetECID(lMsgId, ref nECID, ref strNewValue); // HOST에서 전송한 ECID, ECVALUE를 가져옴.

        if (nECCount < 0)
        {
            break;
        }
        AddLog(string.Format("ECID={0},VALUE={1}", nECID, strNewValue));
        m_gem.SetECValue(nECID, strNewValue); //해당 값을 ECID에 저장.
    }


    m_gem.ReplyHostSetECID(lMsgId, 0); // ECID에 대한 응답을 보냄.

}
```


---

# 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/undefined-5/replyhostsetecid.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.
