Vision 数据命令
该 parameter 用于读取 fixture 的 custom information,并为您的 device 启用定制的 app menu。所有 custom information 都会上传到 VISION SERVER,并且也可以在那里访问。
| Data Type | DS_UNSIGNED_BYTE | PDL Size | Variable(See Protocolversion) |
| Cmd Class | CC_GET | Unit | UNITS_NONE |
| Prefix | PREFIX_NONE | Default | 0x00 |
| Min | 0x00 | Max | 0xFF |
| Description | "VISION DATA" | ||
GET Command 0xA001
Controller Incoming Command:
| (Port ID) | (Msg. Count) | (Sub-Device) | |
| 0x01-0xFF | 0x00 | 0x0000 (Root) or 0x0001-0x0200 | |
| (CC) | (PID) | (PDL) | |
| GET_COMMAND | VISION DATA (0xA001) | 0x00 | |
| (PD) | |||
| Packet Index (8-bit) | |||
Controller Response:
| (Response Type) | (Msg. Count) | (Sub-Device) | |
| ACK | 0x00-0xFF | Copy of Controller SD | |
| (CC) | (PID) | (PDL) | |
| GET_COMMAND_RESPONSE | VISION DATA (0xA000) | Variable(See Protocolversion) | |
| (PD) | |||
| Data Stream | |||
Data Streams:
| DataType | Name | Description | Value Definitions |
|---|---|---|---|
| uint8_t | Protocol Version | 描述 Protocol Version | 1: Version 1 |
| uint8_t | PacketIndex | Packet Index | |
| uint8_t | More Data | 用于表示是否还有更多 data 的 flag | 如果 flag 大于 0,表示还有更多 Data packets available |
| uint8_t[140] | Data | Data array | 遵循下方 Config 中定义的 Data scheme。 |
SET Command 0xA001
Controller Incoming Command:
| (Port ID) | (Msg. Count) | (Sub-Device) | |
| 0x01-0xFF | 0x00 | 0x0000 (Root) or 0x0001-0x0200 | |
| (CC) | (PID) | (PDL) | |
| SET_COMMAND | VISION DATA (0xA001) | Variable | |
| (PD) | |||
| Settings Stream | |||
Settings Stream:
| DataType | Name | Description | Value Definitions |
|---|---|---|---|
| uint8_t | Protocol Version | 描述 Protocol Version | 1: Version 1 |
| uint8_t | Data Id | 需要修改的 data variable id | |
| uint8_t[140] | Data | 最多 140 bytes data | Format 取决于 data type。 |
Controller Response:
| (Response Type) | (Msg. Count) | (Sub-Device) | |
| ACK | 0x00-0xFF | Copy of Controller SD | |
| (CC) | (PID) | (PDL) | |
| SET_COMMAND_RESPONSE | Vision DATA (0xA001) | 1 | |
| (PD) | |||
| uint8_t Status | 0 = OK, 1= Unknown Command, 2 = Error executing Command, 3 = Unsupported Command | |||
Data array scheme
Data array 可以包含任意 custom data。为了 encode data,必须在 fixture config 中定义这些 data。
Datastream 结构如下:整个 DATA block 包含多个 DATA items。每个 DATA item 的 bytes 会按顺序添加到 data stream 中。
一个 Data item 由以下 attributes 定义:
- Id (Int32): 定义 attribute 的 unique Id。如果希望在 database 中比较不同 configurations 的 values,请不要修改它。
- Name (String): Attribute name,会显示在 App Interface 或 database 中。
- DataType (Enum - IQCustomDataValueType): 描述 value type,例如 bool 或 integer。
- DataUnit (String): 会显示在 App Interface 或 Server 中的 unit。
- DataSize (int): 某些 datatypes 需要,例如 string。
- DataDefinition (List of Tuple (int,string)): Optional,用于 App Interface 或 Server 中 decode。例如 Colormixing Mode (byte): 0 - RGB, 1 - RGBL。注意:如果 user 可以设置该 variable,并且 DataDefinition 不为 null,则只能选择这些 values。
- DataMin (Int64): 定义 App Interface 中的 minimum value。Optional
- DataMax (Int64): 定义 App Interface 中的 maximum value。Optional
- InterfacePath (string): 定义 interface structure,应使用以下 format:MainMenu: "";MainMenu->MenuPoint1: "MenuPoint1";MainMenu->MenuPoint1->MenuPoint2: "MenuPoint1/MenuPoint2"
- Internal (bool): 定义 attribute 是对所有 users 可见,还是仅对 company account 可见。如果设置,会 override Adjustable。
- Adjustable (bool): 定义 attribute 是否可由 users 修改。如果设置,会 override Internal。
- AdjustableInternal (bool): 定义 attribute 是否可由 company account users 修改。
- Patch (bool): 定义 attribute 是否显示在 NFC Patching 中。需要 Adjustable enabled。
支持以下 data types(IQCustomDataValueType):
- 0: Bool (Size 1 byte)
- 1: Byte (Size 1 byte)
- 2: Short (Size 2 byte)
- 3: UShort (Size 2 byte)
- 4: Int32 (Size 4 byte)
- 5: UInt32 (Size 4 byte)
- 6: Int64 (Size 8 byte)
- 7: UInt64 (Size 8 byte)
- 8: Float (Size 4 byte)
- 9: Double (Size 8 byte)
- 10: String ASCII (Data length required)
- 11: ByteArray (Data length required)
- 12: ShortArray (Data length required)
- 13: UShortArray (Data length required)
- 14: Int32Array (Data length required)
- 15: UInt32Array (Data length required)
- 16: Int64Array (Data length required)
- 17: UInt64Array (Data length required)
- 18: FloatArray (Data length required)
- 19: DoubleArray (Data length required)
最终 config 可以作为 json config 上传到 server。Config 应包含 DataItems list,结构类似如下:
Example Config:
[
{
"Id": "1",
"Name": "Color Mix Mode",
"DataType": "1",
"DataUnit": "",
"DataDefinitions":
[
{
"Value": "0",
"Definition": "RGB",
},
{
"Value": "1",
"Definition": "RGBL",
}
]
"InterfacePath": "MenuPoint 1",
"Internal": "False",
"Adjustable": "True",
"AdjustableInternal": "True",
}
]
Example Pseudo Data Structure:
DATA 1: Name: "Data 1" DataType="Byte" Value="100"
DATA 2: Name: "Data 2" DataType="Ushort" Value="10000"
DATA 3: Name: "Data 3" DataType="String" Value="Test" DataLength = 4
DATA 1 | DATA 2 | DATA 3 | ...
Example Data Stream:
DATA Stream -> 0x64,0x27,0x10,0x54,0x65,0x73,0x74,...