Closed anvigo12 closed 3 months ago
I m truly sorry, but I've neither time nor (frankly) desire to wade through the huge ASN.1 files you listed. However:
this is my first project where I want to create a Python library using SWIG from the ASN definition files
Based on the above, you don't have any experience with the work-path you're trying - and yet you chose to dive in the "full project". That's next to hopeless, IMHO.
What I'd recommend is pick a simple ASN.1 file, maybe something like
ImagesModule DEFINITIONS ::= BEGIN
Image ::= SEQUENCE
{
data OCTET STRING (SIZE (40..81920)),
count INTEGER (0..81920),
}
END
and try to work out the flow with that one first.
Also, the normal result of asn1c
is a set of source files plus makefiles that allow you to actually build a library.
Start there, and let's debug your workflow first. Maybe others here could help you with the "big" project.
Thanks a lot @mouse07410 🙏
@anvigo12 you're welcome - and please feel free to post successes and/or problems getting the simplified example above to work. Once you get that figured out and done - the likelihood of success in your "big" project would be much higher.
Thank you for all your great work, this ASN1C project has been invaluable to me so far! however, I am very new to ASN1C and this is my first project where I want to create a Python library using SWIG from the ASN definition files below.
options used to generate code: -pdu=all -fcompound-names -fincludes-quoted -findirect-choice -funnamed-unions -no-gen-XER -no-gen-JER -no-gen-OER -no-gen-example -no-gen-random-fill
ETSI-ITS-CDD.asn (https://forge.etsi.org/rep/ITS/asn1/cdd_ts102894_2/-/blob/v2.1.1/docs/ETSI-ITS-CDD.md#user-content-objectperceptionquality) CPM-OriginatingStationContainers.asn (https://forge.etsi.org/rep/ITS/asn1/cpm_ts103324/-/raw/v2.1.1/asn/CPM-OriginatingStationContainers.asn) CPM-SensorInformationContainer.asn (https://forge.etsi.org/rep/ITS/asn1/cpm_ts103324/-/raw/v2.1.1/asn/CPM-SensorInformationContainer.asn) CPM-PerceptionRegionContainer.asn (https://forge.etsi.org/rep/ITS/asn1/cpm_ts103324/-/raw/v2.1.1/asn/CPM-PerceptionRegionContainer.asn) CPM-PerceivedObjectContainer.asn (https://forge.etsi.org/rep/ITS/asn1/cpm_ts103324/-/raw/v2.1.1/asn/CPM-PerceivedObjectContainer.asn) CPM-PDU-Descriptions.asn (https://forge.etsi.org/rep/ITS/asn1/cpm_ts103324/-/raw/v2.1.1/asn/CPM-PDU-Descriptions.asn)
I used SWIG to create a Python file and a cxx wrap file which I was able to compile into a shared library along with all other C source files generated by this asn1c compiler. The problem is that there are missing symbols in this shared library which I assume need to be resolved during runtime. Missing symbols are for: