feat: add array data type
this commit introduces breaking changes
This commit is contained in:
parent
f5de996a89
commit
08baf134dd
1 changed files with 8 additions and 6 deletions
14
doc/proto.md
14
doc/proto.md
|
@ -54,13 +54,15 @@ These define what kind of data the property holds.
|
|||
|
||||
| `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. |
|
||||
| `0x01` | `bool` | 1 byte | Switch | A simple switch with two states. `0x00` = off, `0x01` = on, `0x02` = toggle |
|
||||
| `0x02` | `u8` | 1 byte | Slider | A simple slider with u8 precision. |
|
||||
| `0x03` | `[u8; 256]` | 256 bytes | Text | A simple bit of text. |
|
||||
| `0x1*` | | | | **Cosmetic** |
|
||||
| `0x10` | `[u8; 3]` | 3 bytes | Color | An RGB value. |
|
||||
| `0x01` | `Vec<DataType>` | 2+ bytes | Array | An array of DataTypes. first two bytes is the u16 length |
|
||||
| `0x1*` | | | | **Simple** |
|
||||
| `0x10` | `bool` | 1 byte | Switch | A simple switch with two states. `0x00` = off, `0x01` = on, `0x02` = toggle |
|
||||
| `0x11` | `u8` | 1 byte | Slider | A simple slider with u8 precision. |
|
||||
| `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** |
|
||||
| `0x90` | `u64` | 8 bytes | Seconds | A simple value that is in seconds. |
|
||||
| `0xF*` | | | | **Domo types** |
|
||||
|
|
Loading…
Reference in a new issue