-
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
Semantics of length aspect and attribute in message specification #421
Labels
specification
Related to specification package (e.g., specification parsing)
Comments
treiher
added
the
specification
Related to specification package (e.g., specification parsing)
label
Aug 31, 2020
In a separate discussion we decided to only use bit lengths in the specification (O2). |
treiher
added a commit
that referenced
this issue
Oct 20, 2020
treiher
added a commit
that referenced
this issue
Oct 20, 2020
treiher
added a commit
that referenced
this issue
Oct 21, 2020
treiher
added a commit
that referenced
this issue
Oct 21, 2020
treiher
added a commit
that referenced
this issue
Oct 22, 2020
treiher
added a commit
that referenced
this issue
Oct 22, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current State
A size aspect specifies the bit length of a type:
A length aspect allows to define the bit length of the following field, if this field is opaque or an array:
A length attribute can be used to refer to the length of the message:
Issues
I1: Inconsistency
While
Size
is used for the bit length of a type,Length
is used for the bit length of a field and message. #384 proposes the use of aSize
attribute in expressions:'Length
and'Size
give the impression that they mean different things, but actually both refer to the bit length. There is no clear rule whyLength
is used in the one case andSize
in the other.I2: Useless Conversion
The bit length of an opaque or array field must always be a multiple of 8. As in common binary formats the length is given in bytes, this leads to the need for the addition of
* 8
(I'm not aware of any counter example).Options
O1: Differentiate between bit length and byte length
Change the meaning of
Length
to represent the byte length (instead of the bit length). This would solve I1 as well as I2.O2: Consistently use bit length
Replace all uses of
Length
bySize
(orSize
byLength
) to reflect that both refer to the bit length of some entity. This would solve I1, but not I2.Discussion
I think in any case the consistency issue (I1) should be resolved. I'm not sure, if also I2 should be fixed in this course. The main question is, if there should be a differentiation between bit length and byte length in the specification (O1). The disadvantage of O1 would be the increased complexity: Both cases need to be handled correctly, and also a user has to correctly differentiate both cases. For the latter another naming would be better (e.g.,
Size
andByte_Size
instead ofSize
andLength
).The text was updated successfully, but these errors were encountered: