-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Byte Order and nested messages #914
Labels
architectural decision
Discussion of design decision
Comments
kanigsson
added a commit
that referenced
this issue
Feb 8, 2022
- We track byte order by field instead of by message, using a new map that maps fields to their byte order. This is similar to the existing types map. - To avoid having to potentially instantiate Insert/Extract functions per byte order and type, we use a single Insert (and a single Extract) function which takes the byte order as argument. - This requires adding a Byte_Order type to the interface. - Byte order in scalar sequences is hard-coded to High_Order_First (as it was already before). - adapt session_endianness test to account for nested messages Fixes #914
kanigsson
added a commit
that referenced
this issue
Feb 8, 2022
- We track byte order by field instead of by message, using a new map that maps fields to their byte order. This is similar to the existing types map. - To avoid having to potentially instantiate Insert/Extract functions per byte order and type, we use a single Insert (and a single Extract) function which takes the byte order as argument. - This requires adding a Byte_Order type to the interface. - Byte order in scalar sequences is hard-coded to High_Order_First (as it was already before). - adapt session_endianness test to account for nested messages Fixes #914
kanigsson
added a commit
that referenced
this issue
Feb 11, 2022
- We track byte order by field instead of by message, using a new map that maps fields to their byte order. This is similar to the existing types map. - To avoid having to potentially instantiate Insert/Extract functions per byte order and type, we use a single Insert (and a single Extract) function which takes the byte order as argument. - This requires adding a Byte_Order type to the interface. - Byte order in scalar sequences is hard-coded to High_Order_First (as it was already before). - adapt session_endianness test to account for nested messages Fixes #914
kanigsson
added a commit
that referenced
this issue
Feb 14, 2022
- We track byte order by field instead of by message, using a new map that maps fields to their byte order. This is similar to the existing types map. - To avoid having to potentially instantiate Insert/Extract functions per byte order and type, we use a single Insert (and a single Extract) function which takes the byte order as argument. - This requires adding a Byte_Order type to the interface. - Byte order in scalar sequences is hard-coded to High_Order_First (as it was already before). - adapt session_endianness test to account for nested messages Fixes #914
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context and Problem Statement
The current implementation of the
Byte_Order
aspect is broken when nested messages are used. The byte order of the outermost message type will be used throughout. Instead, for each message, the byte order that was specified for this message type should be used for fields of this type, even if this message type is then used as a field type in other messages.Design
RFLX_Generic_Types
so that only one variant ofExtract
andInsert
exists, and not one variant per byte order. The byte order is then passed as an additional parameter instead. This permits a single instance ofExtract
andInsert
even if a message uses a type with both byte orders.The text was updated successfully, but these errors were encountered: