Configuring Embedded Coder to Generate Non-Static Initialize Method in C++ Code

조회 수: 11 (최근 30일)
Ghassen
Ghassen 2024년 6월 3일
답변: Mark McBroom 2024년 6월 5일
I'm using Embedded Coder to generate C++ code from a simple model. By default, (if init function is empty) the generated code includes a static initialize function within the class:
// model initialize function
static void initialize();
However, I need the initialize function to be a non-static member of the class, like this:
// model initialize function
void initialize();
How can I configure Embedded Coder to generate the initialize method without the static keyword? I've explored the code generation settings but haven't found an option to modify this behavior. Any guidance on this would be greatly appreciated.

답변 (1개)

Mark McBroom
Mark McBroom 2024년 6월 5일
It sounds like you are not using Embedded Coder ( ert.tlc ). Embedded Coder should generate the public methods Initialize(), step() and terminate()

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by