| 3 | 0.7 | Add brightness field to modes, add SaveMode() |
| 4 | 0.9 | Add segments field to zones |
\* Denotes unreleased version, reflects status of current pipeline
@ -42,24 +43,28 @@ Each packet starts with a header that indicates the packet is an OpenRGB SDK pac
The following IDs represent different SDK commands. Each ID packet has a certain format of data associated with it, which will be explained under each ID's section of this document. Gaps have been left in the ID values to allow for future expansion. The same ID values are often used for both request and response packets.
\* The NET_PACKET_ID_REQUEST_PROTOCOL_VERSION packet was not present in protocol version 0, but clients supporting protocol versions 1+ should always send this packet. If no response is received, it should be assumed that the server is using protocol 0.
# Packet-Specific Documentation
@ -150,8 +155,22 @@ The Zone Data block represents one entry in the `RGBController::zones` vector.
| 4* | unsigned int | zone_matrix_height | 0 | Zone matrix_map height (*only if matrix_map exists) |
| 4* | unsigned int | zone_matrix_width | 0 | Zone matrix_map width (*only if matrix_map exists) |
| (zone_matrix_len - 8)* | unsigned int[zone_matrix_len - 8] | zone_matrix_data | 0 | Zone matrix_map data (*only if matrix_map exists) |
| 2 | unsigned short | num_segments | 4 | Number of segments in zone |
| Variable | Segment Data[num_segments] | segments | 4 | See [Segment Data](#segment-data) block format table. Repeat num_segments times |
## LED data
## Segment Data
The Segment Data block represents one entry in the `RGBController::zones::segments` vector. This data block was introduced in protocol version 4.
| Size | Format | Name | Protocol Version | Description |
| 2 | unsigned short | led_name_len | 0 | Length of LED name string, including null termination |
| led_name_len | char[led_name_len] | led_name | 0 | LED name string value, including null termination |
| 4 | unsignd int | led_value | 0 | LED value field value |
| 4 | unsigned int | led_value | 0 | LED value field value |
## NET_PACKET_ID_REQUEST_PROTOCOL_VERSION
@ -170,7 +189,7 @@ The client uses this ID to request the server's highest supported protocol versi
### Response [Size: 4]
The server responds to this request with a single `unsigned int`, size 4, containing the server's highest supported protocol version.
The server responds to this request with a single `unsigned int`, size 4, containing the server's highest supported protocol version. If the server is using protocol version 0, it will not send a response. If no response is received, assume the server's highest supported protocol version is version 0.
## NET_PACKET_ID_SET_CLIENT_NAME
@ -214,6 +233,41 @@ Calling this function will not actually update the controllers. Instead, the co
The client uses this ID to command the server to delete the given profile. It passes the name of the profile to delete as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1. There is no response from the server for this packet.
## NET_PACKET_ID_REQUEST_PLUGIN_LIST
### Request [Size: 0]
The client uses this ID to request the server's plugin list. The request contains no data.
### Response [Size: Variable]
The server responds to this request with a data block. The format of the block is shown below.