Skip to main content

Module data_stream

Module data_stream 

Source
Expand description

Data stream headers (subgroup, datagram, fetch, object). Draft-18 data stream header encoding and decoding.

Subgroup header type byte: bit 4 must be set; valid type ranges are 0x10..0x1F, 0x30..0x3F, 0x50..0x5F, 0x70..0x7F.

  • 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)
  • bit 6 (0x40): FIRST_OBJECT (new in draft-18)

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. Fetch objects use delta-encoded Group ID and Object ID (the first object’s deltas are interpreted as absolute values).

Structs§

DatagramHeader
FetchHeader
SubgroupHeader
SubgroupObject
One object within a draft-18 subgroup stream. Object IDs are delta-encoded; whether a per-object “properties” block (the draft-18 equivalent of extension headers) is present depends on the PROPERTIES bit on the enclosing SubgroupHeader. Use SubgroupObjectReader to encode/decode.
SubgroupObjectReader

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_FIRST_OBJECT_BIT 🔒
SUBGROUP_ID_MODE_MASK 🔒
SUBGROUP_PROPERTIES_BIT 🔒