- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 59
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
APER encode-decode round trip fails where other codecs succeed #192
Comments
Thank you for your issue! I don't have the time to investigate further, but I'd be happy to review the fix. The best way to debug this is to sprinkle some My initial guess is the encoder maybe not respecting the constraints of the type inside the sequence of, but that's just a guess. |
Issue is on Technically Is
|
If you're asking me, yes that is the intention. Yes, field error could be a lot better I hope that the #187 would help make it easier to pass context of identifiers. |
This seems rather difficult to solve, if I understand correctly, and I don't have time to do more right now.
It seems that padding should be calculated differently, and with current implementation it is very difficult. Based on the standard, extension field bitmap values / preamble should be noted when calculating the alignment/padding of the length encoding of the first field of the set/sequence. Currently encoding of the fields are calculated first before actual extension bitfield values are calculated, and padding is added between length and value without noting the preamble. |
Correct me if I'm wrong, but I think is solved by updating the |
If there are many nested sequences, somehow we should be able to get the the preamble information for each of them, up to the root, and note it on the first time when We should also know when constructing set/sequence whether it is extensible, while not having any extensible fields, and also all the optional/default fields, up to the root. I could not figure out yet how to get the extensibility information on runtime if the sequence does not have any extensible fields but has the marker. Maybe there is some easy way? |
Shouldn't you be able to do that by checking if |
Thanks, that helped. I just did not understood the code... I was able to fix the problems related to standard test case (ExtensiblePersonnelRecord completes now), but this original issue might need skills I don't have. Is there were to get choice extensible status as well? If there is, then also this can be fixed, but understanding the macros might take too much my time if it needs to be added. |
Actually figured it out, it was |
It's similar |
I thought it was only for enumerated... well I guess the current solution also works. This issue can be closed now I think. |
It appears that in the following example, APER codec fails needing more bits where other codecs succeed:
When I run this example, I get the following error:
Then a lot of snafu backtrace stuff
I believe that I have set my types up correctly and APER should work here, as all of the other codecs do, but there's a chance I'm just using the API incorrectly? If that's the case, I'd argue the error messages could be clearer here
The text was updated successfully, but these errors were encountered: