> For the complete documentation index, see [llms.txt](https://alex-robenko.gitbook.io/commsdsl-specification/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alex-robenko.gitbook.io/commsdsl-specification/appendix/set.md).

# Properties of set Field

The **\<set>** field has all the [common](/commsdsl-specification/appendix/fields.md) properties as well as ones listed below. Refer to [\<set> Field](/commsdsl-specification/fields/set.md) chapter for detailed description.

|     Property Name     |              Allowed type / value              | DSL Version |               Required              |                     Default Value                     | Description                                                                                                             |
| :-------------------: | :--------------------------------------------: | :---------: | :---------------------------------: | :---------------------------------------------------: | ----------------------------------------------------------------------------------------------------------------------- |
|        **type**       |      "uint8", "uint16", "uint32", "uint64"     |      1      | yes (no if **length** is specified) |                                                       | Underlying primitive type.                                                                                              |
|       **length**      | [unsigned](/commsdsl-specification/numeric.md) |      1      |   yes (no if **type** is specifed)  |                   length of **type**                  | Serialization length.                                                                                                   |
|     **bitLength**     | [unsigned](/commsdsl-specification/numeric.md) |      1      |                  no                 |               length of **type** in bits              | Serialization length in bits, applicable only to a member of [\<bitfield>](/commsdsl-specification/fields/bitfield.md). |
|    **defaultValue**   |   [bool](/commsdsl-specification/boolean.md)   |      1      |                  no                 |                         false                         | Default initialization value of every bit.                                                                              |
|   **reservedValue**   |   [bool](/commsdsl-specification/boolean.md)   |      1      |                  no                 |                         false                         | Expected value of every reserved bit.                                                                                   |
|       **endian**      |                "big" or "little"               |      1      |                  no                 | endian of [schema](/commsdsl-specification/schema.md) | Endian of the field.                                                                                                    |
|  **nonUniqueAllowed** |   [bool](/commsdsl-specification/boolean.md)   |      1      |                  no                 |                         false                         | Allow non unique **\<bit>**-s.                                                                                          |
| **validCheckVersion** |   [bool](/commsdsl-specification/boolean.md)   |      1      |                  no                 |                         false                         | Take into account protocol version when generating code for field's value validity check.                               |

## Properties of \<bit> Child Element of \<set> Field

|   Property Name   |               Allowed type / value              | DSL Version | Required |               Default Value               | Description                                                                                                                                   |
| :---------------: | :---------------------------------------------: | :---------: | :------: | :---------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------- |
|      **name**     | [name](/commsdsl-specification/names.md) string |      1      |    yes   |                                           | Name of the value.                                                                                                                            |
|      **idx**      |  [numeric](/commsdsl-specification/numeric.md)  |      1      |    yes   |                                           | Index of the specified bit. Counting starts from least significant bit.                                                                       |
|  **description**  |                      string                     |      1      |    no    |                                           | Human readable description of the bit.                                                                                                        |
|  **displayName**  |                      string                     |      1      |    no    |                                           | Human readable name of the bit to display in various analysis tools.                                                                          |
|  **defaultValue** |    [bool](/commsdsl-specification/boolean.md)   |      1      |    no    |  **defaultValue** of the **\<set>** field | Default value of the bit (when constructed).                                                                                                  |
| **reservedValue** |    [bool](/commsdsl-specification/boolean.md)   |      1      |    no    | **reservedValue** of the **\<set>** field | Expected value of the bit if it is reserved.                                                                                                  |
|    **reserved**   |    [bool](/commsdsl-specification/boolean.md)   |      1      |    no    |                   false                   | Mark / Unmark the bit as being reserved.                                                                                                      |
|  **sinceVersion** |  [unsigned](/commsdsl-specification/numeric.md) |      1      |    no    |                     0                     | Version of the protocol in which bit was introduced (became non-reserved).                                                                    |
|   **deprecated**  |  [unsigned](/commsdsl-specification/numeric.md) |      1      |    no    |                max unsigned               | <p>Version of the protocol in which bit was deprecated (became reserved).<br>Must be greater than value of <strong>sinceVersion</strong>.</p> |
