Comments (15)
I already implemented compile_file() to allow one or more files. I also renamed the function to compile_files(). :)
from asn1tools.
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.
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.
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.
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.
I implemented decode of the enumerated type in per.py. Not very well tested, but might work =)
from asn1tools.
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.
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.
It's aligned PER. Unaligned PER may be implemented eventually, but first I'll finalize aligned PER.
from asn1tools.
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.
I'll see what I can do
from asn1tools.
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.
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.
I'll make another PR to improve compile_file()
.
from asn1tools.
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)
- Why asn1tool will give tag 'a0' HOT 1
- asn parsing HOT 2
- Missing support for BCDString in BER HOT 1
- asn1tools.codecs.ber.DecodeTagError: HOT 2
- GSER decoding is not implemented
- Support for CLASS HOT 1
- Generate C source: Unsupported type 'BIT STRING' HOT 3
- Unsupported type 'BIT STRING' error in generate C source uper HOT 3
- python asn1tools BitString uper encoded wrong value HOT 1
- Objects set members are not parsed at all HOT 2
- ASN1Tools Fails to Compile 3GPP Release 16 ASN.1 HOT 3
- Expected enumeration index 0, 1 or 2, but got 3
- Generated C OER decoder fails to decode fixed-length sequences with lengths of more than 255
- Decode successfully ignores extra bytes HOT 2
- encode_message() fails to validate ASN.1 BIT STRING SIZE constraints
- how to parse the "CONTAING SEQUENCE" msg immediately HOT 1
- Compile nrppa using PER fail
- How to view encoded values
- Test failures with pyparsing 3.1.1 HOT 4
- oer c code generation fails when addition contains a sequence with enums (type error) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asn1tools.