P1sec / pycrate

A Python library to ease the development of encoders and decoders for various protocols and file formats; contains ASN.1 and CSN.1 compilers.
GNU Lesser General Public License v2.1
381 stars 132 forks source link

Creating sample messages of ASN1 objects #188

Closed kbaccar closed 11 months ago

kbaccar commented 2 years ago

Im trying to create sample messages for all of the RRC NR existing objects without having the binary format of the object. I checked the docs and the only way possible is to incrementally set the values of the objects with the set_val_at method. This is not very efficient given the complexity of the specification, is there a way around this ?

p1-bmu commented 2 years ago

You have different methods to set appropriate values into ASN.1 object : set_val(), set_val_at(), as explained in the wiki. There is nothing more provided. Each ASN.1 protocol has its own specificity, which may require dedicated routines for easing the setting of values. This is up to you to build your own for the RRC NR one, I believe.

p1-bmu commented 2 years ago

It seems maybe a similar effort was intended by another user, without feedback unfortunately: https://github.com/P1sec/pycrate/issues/104