diff --git a/docs/protocol.md b/docs/protocol.md index de661db..ccde312 100644 --- a/docs/protocol.md +++ b/docs/protocol.md @@ -69,9 +69,10 @@ Values not listed are reserved. A node receiving an unknown type must skip the p ### `VIDEO_FRAME` (0x0001) ```mermaid +%%{init: {'packet': {'bitsPerRow': 16}}}%% packet-beta 0-15: "stream_id" -16-47: "frame data …" +16-31: "frame data …" ``` `stream_id` identifies which video stream this frame belongs to. The codec is established at stream open time (see [Stream Lifecycle](#stream-lifecycle)) and does not appear in every frame. @@ -121,6 +122,7 @@ packet-beta ### `STREAM_EVENT` (0x0004) ```mermaid +%%{init: {'packet': {'bitsPerRow': 8}}}%% packet-beta 0-15: "stream_id" 16-23: "event_code" @@ -164,6 +166,7 @@ The receiver responds with `CONTROL_RESPONSE`. On `status = OK` the stream is op ### Closing a Stream (`STREAM_CLOSE` request) ```mermaid +%%{init: {'packet': {'bitsPerRow': 16}}}%% packet-beta 0-15: "request_id" 16-31: "command = 0x0002" @@ -227,6 +230,7 @@ Node discovery uses UDP multicast. The wire format is a standard transport frame Sent periodically by every node and immediately on startup. ```mermaid +%%{init: {'packet': {'bitsPerRow': 8}}}%% packet-beta 0-7: "protocol_version" 8-23: "site_id" @@ -320,6 +324,7 @@ Then repeated `standalone_count` times (u16): **Request**: ```mermaid +%%{init: {'packet': {'bitsPerRow': 16}}}%% packet-beta 0-15: "request_id" 16-31: "command = 0x0004" @@ -331,6 +336,7 @@ packet-beta Fixed prefix per control: ```mermaid +%%{init: {'packet': {'bitsPerRow': 8}}}%% packet-beta 0-31: "id" 32-39: "type" @@ -372,6 +378,7 @@ Menu items may have non-contiguous `index` values (gaps where the driver returns **Request**: ```mermaid +%%{init: {'packet': {'bitsPerRow': 16}}}%% packet-beta 0-15: "request_id" 16-31: "command = 0x0005" @@ -393,6 +400,7 @@ packet-beta **Request**: ```mermaid +%%{init: {'packet': {'bitsPerRow': 16}}}%% packet-beta 0-15: "request_id" 16-31: "command = 0x0006"