フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Enumerators from C++ to generated Code Simulink

1 回表示 (過去 30 日間)
Álvaro Salcedo
Álvaro Salcedo 2018 年 9 月 17 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi to all,
First of all thanks a lot for helping me.
I have an enum in "test.h".
I would like to use this enum in "matlab function block" in simulink and then generate code and in that code use enum in "test.h"
The way that I have found is the next:
1- Create a class in matlab like:
classdef(Enumeration) TEST_ENUM < Simulink.IntEnumType
enumeration
On(0)
Off(1)
end
methods (Static = true)
function retVal = getHeaderFile()
retVal = 'test.h';
end
end
end
2- Enum in test.h is:
enum NAVIGATION_COMMAND
{
On = 0,
Off = 1
};
My question is, Have I to change classdef in Matlab if I change enum values in "test.h"?
Thanks a lot.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by