diff --git a/architecture.md b/architecture.md index 355e471..0823301 100644 --- a/architecture.md +++ b/architecture.md @@ -321,10 +321,20 @@ Payload fields: |---|---|---| | `protocol_version` | u8 | Wire format version | | `tcp_port` | u16 | Port where this node accepts transport connections | +| `function_flags` | u16 | Bitfield declaring node capabilities (see below) | | `name_len` | u8 | Length of name string | | `name` | bytes | Node name (`namespace:instance`, e.g. `v4l2:microscope`) | -| `function_len` | u8 | Length of function string | -| `function` | bytes | Node function identifier (`source`, `relay`, `sink`, ...) | + +`function_flags` bits: + +| Bit | Mask | Meaning | +|---|---|---| +| 0 | `0x0001` | Source — produces video | +| 1 | `0x0002` | Relay — receives and distributes streams | +| 2 | `0x0004` | Sink — consumes video (display, archiver, etc.) | +| 3 | `0x0008` | Controller — participates in control plane coordination | + +A node may set multiple bits — a relay that also archives sets both `RELAY` and `SINK`. ### Behaviour