-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
To solve, among others, problems with extendable structure skipping (in particular, vector elements) in case of GMQ, its binary format is to be based on the following principles:
- Basic units are binary representation of IDL elementary types (such as integers, strings, reals, etc).
- Basic units are organized in frames; the whole message is a sequence of frames.
2.1. Frame size must not exceed a predefined value - Each frame has its header that tells its size and flags; header encoding allows compact representation (e.g., utf8-like) in case of small sizes, but does not require it (that is, in all cases to continue header parsing it suffices to parse previous bytes). Exact encoding algorithm is TBD.
- Currently the following flags are seen:
4.1. frame sequence termination flag
4.2. frame-size-from-its-content flag (used in case of long strings, blobs, etc that tell their size themselves) - When composing,
5.1. in general, it is Composer's decision to begin and end a frame while writing an entry of elementary type (based on a number of bytes remaining in frame up to its maximal size, number of bytes that might be necessary to write an entry, etc);
5.2. in particular, it can be terminated base on an caller's request;
5.2.1. in this case caller may request to add 'frame sequence termination flag' to the frame header.
Important usage point: when an extendable structure has been composed, caller requests to terminate a frame with adding 'frame sequence termination flag' flag; then, while parsing, to skip this structure meand to follow until a frame with 'frame sequence termination flag'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels