-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
decode functions PER #1
Comments
Hello! asn1tools is a side project of mine that doesn't have any planning or schedule. Features are added whenever I find the project interesting, and a user request for additional functionality is certainly a good motivator. I wont promise anything, but I might have a look at it soon. Is there any particular feature (as in ASN1 type) that you need? |
Thanks for your answer. Thanks again, Regards, |
There are already a few functions implemented in https://github.com/eerimoq/asn1tools/blob/master/asn1tools/codecs/per.py with tests in https://github.com/eerimoq/asn1tools/blob/master/tests/test_per.py. |
I implemented decode of the enumerated type in per.py. Not very well tested, but might work =) |
Many thanks errimoq. I'll try to use it and let you know if I find anything wrong (even if I'm sure it would work perfectly !) |
Hi, Thanks in advance |
It's aligned PER. Unaligned PER may be implemented eventually, but first I'll finalize aligned PER. |
Okay, I couldn't resist, I started on the UPER codec as well. See https://github.com/eerimoq/asn1tools/blob/master/tests/test_uper.py for tests. |
The UPER decoder now successfully decodes a couple ASN.1 types; SEQUENCE, CHOICE, BIT STRING, OCTET STRING, ENUMERATION, BOOLEAN and INTEGER. The implementation is by no means complete, but should generally work. Would be nice if you can create a pull request with one or more test cases of your ASN.1 specification. It's expected that some of the test cases will fail, and that's fine. Adding test cases will ensure that your types and be encoded and decoded. Add test cases in https://github.com/eerimoq/asn1tools/blob/master/tests/test_uper.py. |
I'll see what I can do |
Dear Eerimoq, I've push a very simple script to test multiple modules case (I'll try to make something more comprehensive soon). It seems that it works here EDIT : my bad, it's quite easy to do what I described above thanks to The others tests I've performed on all types let me think your tools does the job pretty well though ;) PS : I'm not very skilled in github, please let me know if the pull request you have is correct (especially if the syntax in Spec.asn is ok or not) cause I made two requests but I'm not sure if the second one has been taken into account. |
Hello, I think it's a good idea to accept either a single file or a list of files as first argument of I think the pull request (PR) includes your latest changes. I'll make a code review of the PR and eventually merge it. |
I'll make another PR to improve |
I already implemented compile_file() to allow one or more files. I also renamed the function to compile_files(). :) |
Okay, I merged the first PR and styled the code to my liking. Anything else, or should we close this issue and open new issues if there are other features missing? |
Dear eerimoq,
I'd like to use your tool for PER encoding/decoding. Do you know when the corresponding functions will be implemented?
Are you still working on it?
Thanks in advance
The text was updated successfully, but these errors were encountered: