RecordFlux
RecordFlux copied to clipboard
Lazy message parsing and generation
When parsing or generating a message, the message must be processed sequentially, i.e. before a field can be parsed or set, all predecessor fields must have been successfully verified. In some cases this is not desirable:
- Iterating over a sequence of complex messages to access the n-th element
- Setting a length field before defining a concrete sequence (if the value of the length field can be determined when setting the sequence)
The structural validity of message should only depend on the relevant fields. It should be possible to parse or set message fields in different order if their field bounds can be determined in the current state.
Objectives
- [ ] Field is accessible/settable if its location is clearly determinable
- [ ] Setting field only invalidates fields which depend on fields value
- [ ] N-th element of sequence is accessible without complete validation of previous element
- [ ] Setting sequence field before its corresponding length field (ideally the length field would be set automatically when setting the sequence)
Prerequisites
- #1228