Expand description
Data stream headers (subgroup, datagram, fetch, object). Draft-17 data stream header encoding and decoding.
Subgroup header type byte: 0b00X1XXXX (bit 4 always set)
- bit 0 (0x01): PROPERTIES
- bits 1-2 (0x06): SUBGROUP_ID_MODE (0=zero, 1=first_obj, 2=explicit, 3=reserved)
- bit 3 (0x08): END_OF_GROUP
- bit 5 (0x20): DEFAULT_PRIORITY (no priority byte)
Datagram type byte: 0b00X0XXXX (bit 4 always 0)
- bit 0 (0x01): PROPERTIES
- bit 1 (0x02): END_OF_GROUP
- bit 2 (0x04): ZERO_OBJECT_ID (object_id=0, field omitted)
- bit 3 (0x08): DEFAULT_PRIORITY (no priority byte)
- bit 5 (0x20): STATUS (status byte replaces payload)
Fetch header: stream type 0x05 + request_id.
StructsΒ§
- Datagram
Header - Fetch
Header - Subgroup
Header - Subgroup
Object - One object within a draft-17 subgroup stream. Object IDs are
delta-encoded and the presence of a βpropertiesβ block (the
draft-17 equivalent of extension headers) is determined by the
PROPERTIES bit on the enclosing
SubgroupHeader. UseSubgroupObjectReaderto encode/decode. - Subgroup
Object Reader
ConstantsΒ§
- DATAGRAM_
DEFAULT_ πPRIORITY_ BIT - DATAGRAM_
END_ πOF_ GROUP_ BIT - DATAGRAM_
PROPERTIES_ πBIT - DATAGRAM_
STATUS_ πBIT - DATAGRAM_
ZERO_ πOBJECT_ ID_ BIT - FETCH_
STREAM_ πTYPE - SUBGROUP_
BASE_ πBIT - SUBGROUP_
DEFAULT_ πPRIORITY_ BIT - SUBGROUP_
END_ πOF_ GROUP_ BIT - SUBGROUP_
ID_ πMODE_ MASK - SUBGROUP_
PROPERTIES_ πBIT