Embedded coder: How to specify enumeration type name.

2 次查看(过去 30 天)
I specified an enumeration like this:
classdef (Enumeration) blabla < int32
enumeration
blabla0(0)
blabla1(1)
blabla2(2)
end
end
I put this in a subdirectory "veryLongDirectoryName", and use it MatLab code as follows:
veryLongDirectoryName.blabla.blabla0
When I use this type in MatLab code for C code generation, the type of the enumeration includes the directory name. I don't want that. I expected the enumeration type in C to be "blabla", not "veryLongDirectoryName_blabla". The result was that the identifier became too long and the coder truncates it to something not very readable.
(I know about removing the type name from the enumeration members, but that is not what I mean.)
How can I specify the type name of the enumeration in C code ? Just like coder.cstructname(), but then for enumerations.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by