-
Notifications
You must be signed in to change notification settings - Fork 58
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
Named bit string positions with UPER #240
Comments
@usr3-1415 will correct me if I am wrong but I think you are right and this is what I reported in this comment : #196 (comment) |
Thanks for the link, I missed that comment when going through the thread |
New helper functions are now generated that set the appropriate bit in the bit string.
A new set of functions is now generated that help programmer to set the bit string. |
I'm utilizing asn1scc with UPER encodings in C. I can't find the appropriate information in the ITU-T X.691 document about encoding bit strings but examining several different ASN.1 compilers it seems that bit strings are flipped in UPER from how they are defined. E.g. given this definition of a bit string:
this data:
will be encoded to:
0x e0
or0b 1110 0000
My confusion comes from the included bit string names provided by asn1scc (per #196). It will provide something similar to:
which seemingly are unusable for constructing or examining any BitString types because the C library doesn't seem to do any conversions. Is this expected or do I have a misunderstanding somewhere?
The text was updated successfully, but these errors were encountered: