I have a c# program including a class which calls Matlab functions in their respective .m-files.
I want to create a new enumeration within one of those functions like this one which adds a new constant:
function [res msg] = addVar(handle, name, value)
...
data = Stateflow.Data(chart.Maschine);
%set data properties
data.Scope = 'constant';
data.Name = name;
data.DataType = 'uint8';
data.Props.InitialValue = value;
end
like this:
function [res msg] = addEnum(handle, enumName, arrayEnumValues)
...
data = Stateflow.Data(chart.Maschine);
%set data properties
data.Scope = 'constant';
data.Name = enumName;
data.DataType = 'Enum: ???';
data.Props.InitialValue = arrayEnumValues;
end
Is it possible to set a new enumeration as data object that will afterwards be available for the simulink code like the working function with the constants?