Can I provide custom method/function to be included in c++ class generated by simulink

I would like to add an additional method to the c++ class generated by Simulink.
The use case is that I would like the application that the generated code is part of to provide an interface to a logger method which can be used in the generated code as well.

Antworten (1)

When ‘Model Source’ block is used the code generator adds external code that you specify to the source file (model.c or model.cpp) that it generates.
The documentation for the above mentioned block can be found here.

Diese Frage ist geschlossen.

Produkte

Version

R2019a

Gefragt:

am 4 Sep. 2019

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by