Hi
Consider this user story: you are interfacing your device against two devices.
The manufacturer of these devices provided you with ACN and ASN1 files, unfortunately both of them came from the same template, so both produce pus3.h and pus3.c files as a result of autogeneration. The source file is not a problem because symbols and data types can be prefixed using the --field-prefix and --type-prefix options. The header file causes a problem because in the final application the first found file will be substituted in the #include <pus3.h> directives. A simple solution would be to place the header files in the include/device1 and include/device2 folders and give the compiler a header search path pointing to the include folder. I currently do this by subjecting autogenerated files to additional processing after generation. It would be easier if the generator accepted an argument such as, say, --include-prefix device1, placed headers under device1 directory and added this directory as a prefix in the include directives #include <device1/pus3.h>.
Please consider adding this or similar option to asn1scc.
Best regards
Hi
Consider this user story: you are interfacing your device against two devices.
The manufacturer of these devices provided you with ACN and ASN1 files, unfortunately both of them came from the same template, so both produce pus3.h and pus3.c files as a result of autogeneration. The source file is not a problem because symbols and data types can be prefixed using the
--field-prefixand--type-prefixoptions. The header file causes a problem because in the final application the first found file will be substituted in the#include <pus3.h>directives. A simple solution would be to place the header files in theinclude/device1andinclude/device2folders and give the compiler a header search path pointing to theincludefolder. I currently do this by subjecting autogenerated files to additional processing after generation. It would be easier if the generator accepted an argument such as, say,--include-prefix device1, placed headers underdevice1directory and added this directory as a prefix in the include directives#include <device1/pus3.h>.Please consider adding this or similar option to asn1scc.
Best regards