> 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/item-parsing/getremotecommandinfo.md).

# GetRemoteCommandInfo

### int GetRemoteCommandInfo(int lMsgId, ref string pszRCMD, ref string\[] sParamNames, ref string\[] sParamValues)

호스트(Host)로부터 수신한 S2F41 (Host Command Send) 메시지의 \*\*원격 명령 이름(RCMD)\*\*과 그에 포함된 모든 파라미터(CPNAME, CPVAL) 목록을 배열 형태로 한 번에 가져옵니다. 여러 개의 파라미터를 루프 없이 한 번에 관리할 때 유용합니다.

Parameters

<table data-header-hidden><thead><tr><th width="189"></th><th width="131"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>lMsgId</td><td>int</td><td>수신한 메시지의 고유 식별 ID</td></tr><tr><td>pszRCMD</td><td>ref string</td><td>수신된 원격 명령 이름 (예: "START", "STOP")</td></tr><tr><td>sParamNames</td><td>ref string[]</td><td>모든 파라미터 이름(CPNAME)들이 담길 배열</td></tr><tr><td>sParamValues</td><td>ref string[]</td><td>모든 파라미터 값(CPVAL)들이 담길 배열</td></tr></tbody></table>

```csharp
string rcmd = "";
string[] pNames = null;
string[] pValues = null;

// 모든 명령 정보를 한 번에 추출
int result = m_gem.GetRemoteCommandInfo(lMsgId, ref rcmd, ref pNames, ref pValues);

if (result >= 0)
{
    Console.WriteLine($"Received RCMD: {rcmd}");
    for (int i = 0; i < pNames.Length; i++)
    {
        Console.WriteLine($"  Param[{i}] Name: {pNames[i]}, Value: {pValues[i]}");
    }
}
else
{
    Console.WriteLine($"Error occurred: {result}");
}
```


---

# 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/item-parsing/getremotecommandinfo.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.
