# GetU1Item

### int GetIU1tem(int lMsgId, byte\[] pnValue)

수신한 SECS메시지의 U1(Unsigned Integer 1 Byte) Item을 읽음.

반환값은 U1 Item의 Size를 의미함

Parameters

<table data-header-hidden><thead><tr><th width="197" valign="top"></th><th width="105" 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">수신한 Message의 ID</td></tr><tr><td valign="top">pnValue</td><td valign="top">byte[]</td><td valign="top">U1 Item을 저장할 byte배열</td></tr></tbody></table>

```csharp
// 1. 개수 확인
int nCount = m_gem.GetNextItemCount(lMsgId);

if (nCount > 0)
{
    // 2. 배열 생성 및 읽기
    byte[] vData = new byte[nCount];
    m_gem.GetU1Item(lMsgId, vData);
    
    Console.WriteLine($"첫 번째 값: {vData[0]}, 총 개수: {nCount}");
}
```


---

# 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/getu1item/getu1item-1.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.
