Open dsabala opened 11 months ago
Hi,
Thank you for your detailed feedback and suggestions regarding the asn1scc arguments and the naming conflicts you've encountered.
I agree that extending the --type-prefix argument to include global, constant variables seems like a viable solution. However, this change could potentially break existing code that relies on the current naming conventions.
@maxime-esa, could you please share your thoughts on this matter? If we proceed with this update, we'll need to consider its impact on existing users. Do you think we should implement this change?
@usr3-1415 that would indeed break existing code (in C), so I do not think it is a good thing to add this option without any mean to disable it.
Alternatively, a new --prefix-with-module-name
option that would be mutually exclusive with --type-prefix
could be introduced (or --type-prefix MODULE
).
All types and constants would be prefixed the module name (Module-Name DEFINITIONS ::= ...
) avoiding all risks of collisions. In essence the idea (as with type prefixes) is to create a level of namespace in C (not needed in Ada as types are grouped in packages named with the namespace already).
However this would probably complicate the String templates quite a bit.
Hi
I am using asn1scc with following arguments:
Types as well as function names are prefixed with
pp_
which solves names conflicts I have due to similarity between two devices asn1 codes. However I still get one name collision between global variables:Related *.asn1
Generated header file
Two issues:
--type-prefix
--type-prefix
help message to include information, that function names are prefixed tooBest regards