> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LampArrayEnumerationKind 列舉參考

> 此列舉控制 RegisterLampArrayStatusCallback 中的初始 LampArray 列舉是以非同步方式執行，還是封鎖直到每個裝置都回報為止。

# LampArrayEnumerationKind 列舉

描述新註冊之 LampArrayStatusCallback 函式所需的裝置列舉行為。此行為與 [RegisterLampArrayStatusCallback](/zh-TW/reference/lighting/lamparray/functions/registerlamparraystatuscallback) 搭配使用，僅會套用至註冊時已連線的 LampArray。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
enum class LampArrayEnumerationKind : uint32_t
{
    Async       = 1,
    Blocking    = 2
};
```

<a id="constantsSection" />

## 常數

| 常數 | 描述 |
| - | - |
| Async | 對 [RegisterLampArrayStatusCallback](/zh-TW/reference/lighting/lamparray/functions/registerlamparraystatuscallback) 的呼叫應立即傳回，而已連線 LampArray 的列舉應在專用的 LampArray 回呼背景工作執行緒上以非同步方式進行。 |
| Blocking | 對 [RegisterLampArrayStatusCallback](/zh-TW/reference/lighting/lamparray/functions/registerlamparraystatuscallback) 的呼叫應封鎖，直到所有已連線的 LampArray 都已列舉為止。 |

<a id="remarksSection" />

## 備註

[RegisterLampArrayStatusCallback](/zh-TW/reference/lighting/lamparray/functions/registerlamparraystatuscallback) 的 **LampArrayEnumerationKind** 參數可讓呼叫端指定應如何接收呼叫時已連接之任何 LampArray 裝置的回呼。如果選取 **LampArrayEnumerationKind::Blocking**，RegisterLampArrayStatusCallback 函式將會封鎖，直到針對每個已連接的裝置叫用該回呼為止 (表示回呼將在呼叫執行緒上叫用)。

註冊第一個回呼時，LampArray API 會啟動背景工作執行緒來處理 **ILampArray** 裝置狀態通知。這些事件並不頻繁，背景工作執行緒在其他時間會維持在等候狀態。註冊呼叫傳回之後，所有後續的 LampArrayStatusCallback 都會在此背景工作執行緒上依序叫用。

如果指定 **LampArrayEnumerationKind::Async**，註冊呼叫將立即傳回，而呼叫時已連線的任何 LampArray 都會在前述的 LampArray 回呼背景工作執行緒上列舉。

<a id="requirementsSection" />

## 需求

**標頭：** 在 LampArray.h 中宣告。

<a id="seealsoSection" />

## 另請參閱

[照明 API 概觀](/zh-TW/build/core-features/common/lighting/gc-lighting-toc)\
[RegisterLampArrayStatusCallback](/zh-TW/reference/lighting/lamparray/functions/registerlamparraystatuscallback)


## Related topics

- [LampArrayKind 列舉參考](/zh-TW/reference/lighting/lamparray/enums/lamparraykind.md)
- [LampArrayStatus 列舉參考](/zh-TW/reference/lighting/lamparray/enums/lamparraystatus.md)
- [LampPurposes 列舉參考](/zh-TW/reference/lighting/lamparray/enums/lamppurposes.md)
- [LampArray 周邊裝置的燈光 API 參考](/zh-TW/reference/lighting/gc-reference-lighting-toc.md)
- [RegisterLampArrayStatusCallback 函式](/zh-TW/reference/lighting/lamparray/functions/registerlamparraystatuscallback.md)
