feat: add array data type

this commit introduces breaking changes
This commit is contained in:
Strix 2023-10-15 18:06:30 +02:00
parent f5de996a89
commit 08baf134dd
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774

View file

@ -54,13 +54,15 @@ These define what kind of data the property holds.
| `data_type` | physical type (rust types) | size | virtual type | description | | `data_type` | physical type (rust types) | size | virtual type | description |
|-------------|----------------------------|-----------|---------------------|-----------------------------------------------------------------------------| |-------------|----------------------------|-----------|---------------------|-----------------------------------------------------------------------------|
| `0x0*` | | | | **Basic** | | `0x0*` | | | | **Meta** |
| `0x00` | `None` | 0 bytes | Nothing | Nothing, mostly used internally or as example. | | `0x00` | `None` | 0 bytes | Nothing | Nothing, mostly used internally or as example. |
| `0x01` | `bool` | 1 byte | Switch | A simple switch with two states. `0x00` = off, `0x01` = on, `0x02` = toggle | | `0x01` | `Vec<DataType>` | 2+ bytes | Array | An array of DataTypes. first two bytes is the u16 length |
| `0x02` | `u8` | 1 byte | Slider | A simple slider with u8 precision. | | `0x1*` | | | | **Simple** |
| `0x03` | `[u8; 256]` | 256 bytes | Text | A simple bit of text. | | `0x10` | `bool` | 1 byte | Switch | A simple switch with two states. `0x00` = off, `0x01` = on, `0x02` = toggle |
| `0x1*` | | | | **Cosmetic** | | `0x11` | `u8` | 1 byte | Slider | A simple slider with u8 precision. |
| `0x10` | `[u8; 3]` | 3 bytes | Color | An RGB value. | | `0x12` | `[u8; 256]` | 256 bytes | Text | A simple bit of text. |
| `0x2*` | | | | **Cosmetic** |
| `0x20` | `[u8; 3]` | 3 bytes | Color | An RGB value. |
| `0x9*` | | | | **Time & Space** | | `0x9*` | | | | **Time & Space** |
| `0x90` | `u64` | 8 bytes | Seconds | A simple value that is in seconds. | | `0x90` | `u64` | 8 bytes | Seconds | A simple value that is in seconds. |
| `0xF*` | | | | **Domo types** | | `0xF*` | | | | **Domo types** |