Embedded coder: How to specify enumeration type name.

2 views (last 30 days)
Hank
Hank on 23 Jun 2014
Edited: Hank on 23 Jun 2014
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.

Answers (0)

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!