Giter VIP home page Giter VIP logo

Comments (15)

eerimoq avatar eerimoq commented on July 22, 2024 3

I already implemented compile_file() to allow one or more files. I also renamed the function to compile_files(). :)

from asn1tools.

eerimoq avatar eerimoq commented on July 22, 2024 1

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.

from asn1tools.

eerimoq avatar eerimoq commented on July 22, 2024

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?

from asn1tools.

ezor1 avatar ezor1 commented on July 22, 2024

Thanks for your answer.
I've tryed to do it by myself but I can't work out how functions works (I'm quite new in Python)
However I could probably find out a solution if you implement one of them (let say the class Enumerate in per.py file for instance). Of course it's up to you.
Anyway, I don't want to be rude by putting pressure on you.

Thanks again,

Regards,

from asn1tools.

eerimoq avatar eerimoq commented on July 22, 2024

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.

from asn1tools.

eerimoq avatar eerimoq commented on July 22, 2024

I implemented decode of the enumerated type in per.py. Not very well tested, but might work =)

from asn1tools.

ezor1 avatar ezor1 commented on July 22, 2024

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 !)

from asn1tools.

ezor1 avatar ezor1 commented on July 22, 2024

Hi,
Could you tell me wether the PER codec is the aligned or unaligned version? Cause I'm using asn1c and what your tools return does not match what I'm supposed to get (even if this is not completely different).

Thanks in advance

from asn1tools.

eerimoq avatar eerimoq commented on July 22, 2024

It's aligned PER. Unaligned PER may be implemented eventually, but first I'll finalize aligned PER.

from asn1tools.

eerimoq avatar eerimoq commented on July 22, 2024

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.

from asn1tools.

ezor1 avatar ezor1 commented on July 22, 2024

I'll see what I can do

from asn1tools.

ezor1 avatar ezor1 commented on July 22, 2024

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
Maybe it will be better/easier to allow compile_file() to use as first argument a list of files, each one containing a module and store all of them temporarily to deals with dependencies (IMPORTS/EXPORT types).

EDIT : my bad, it's quite easy to do what I described above thanks to compile_string().

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.

from asn1tools.

eerimoq avatar eerimoq commented on July 22, 2024

Hello,

I think it's a good idea to accept either a single file or a list of files as first argument of compile_file(). It's probably a common use case.

I think the pull request (PR) includes your latest changes. I'll make a code review of the PR and eventually merge it.

from asn1tools.

ezor1 avatar ezor1 commented on July 22, 2024

I'll make another PR to improve compile_file().

from asn1tools.

eerimoq avatar eerimoq commented on July 22, 2024

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?

from asn1tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.