"use strict";
var import_Resource = require("#models/Resource.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import_Resource.Resource.add({
  tag: "datatype",
  name: "list",
  description: "List",
  xref: "core\xA77.19.1.8",
  details: `A list is defined as a collection of entries of the same data type, with a finite count from 0 to 65534. A cluster specification may define further constraints on the maximum possible count. The list entry data type shall be any defined data type, except a list data type, or any data type derived from a list.
The quality columns for a list definition are for the list.
The list entries are indicated with an index that is an unsigned integer starting at 0 (zero). The maintained order of entries, by index, is defined in the cluster specification, or undefined. Data that is defined as a list is indicated with "list[X]" where X is the entry type. The data type of the list entry has its own qualities, constraints, and conformance.
To define qualities for the list entry data type, make the list entry data type a defined local derived data type, with a table including the columns required to define and constrain the data type.
> [!NOTE]
> For example: Derived data types defined here: | Name | Type | Constraint | Quality | ... | | --- |   --- | --- | --- | --- | | MonthNameString | string | 3 | F | ... | | MonthNumber | uint8 | 1 to 12 | | ... | SummerStruct defined here: | ID | Name | Type | Constraint | Quality | ... | | --- | --- | --- | --- | --- | --- | | 0 | Year | int16 | -1000 to 3000 | | ... | | 1 | SummerMonths | list[MonthNumber] | max 12 | N | ... | Used Here: | ID | Name | Type | Constraint | Quality | ... | | --- | --- | --- | --- | --- | --- | | 0 | MonthNames | list[MonthNameString] | 12 | N | ... | | 1 | SummerYears | list[SummerStruct] | max 50 | | ... | There is an inline shortcut to define the list entry data type constraints. See List Constraints.
> [!NOTE]
> For example: <table> <tbody> <tr> <td>ID</td> <td>Name</td> <td>Type</td> <td>Constraint</td> <td>Quality</td> <td>...</td> </tr> <tr> <td>0</td> <td>MonthNames</td> <td>list[string]</td> <td>12[3]</td> <td>N</td> <td>... .</td> </tr> </tbody> </table>
It is recommended to put a maximum constraint on the list and list entry data types.
It is recommended that a list entry data type be a struct, to enable the addition of new fields to the list's entries in the future.
  - The cluster data version shall be incremented when the list order or entries change.
  - An entry shall NOT be NULL.
  - The list shall support reading and reporting all entries.
  - The list shall support reporting, updates, and/or deletion of one or more entries.
  - If the list is writable, it shall support writing or deleting the entire list.
  - If the list is writable, it shall support updating one or more individual entries by indicating an index per updated entry.
  - If the list is writable, it shall support deleting one or more individual entries by indicating an index per deleted entry.
  - If the list is writable, it shall support adding one or more individual entries.
  - A list may define an entry that is a struct that is fabric-scoped (see Section 7.6.4, "Fabric-Scoped Access").`
});
//# sourceMappingURL=list.resource.js.map
