Custom function call to "initialize function" with a TLC
显示 更早的评论
I create an inlined C-MEX S-function and a TLC file that wraps my get_value() function.
I need to call another init_my_alg() funtion for once for all of the instances of S-function.
It seems that, to put a custom line can be done by writing within %function Start(block, system) Output. This generates my custom line for all instances.
definition of %function BlockTypeSetup(block, system) void is fits for my request but this function does not generates any output.
I checked the following code confiration function lists at the followimg link but could not find a proper fine. "https://www.mathworks.com/help/rtw/tlc/code-configuration-functions.html#responsive_offcanvas"
I just want to generate a code such as below:
void test_model_step(void)
{
//some useful code
}
void test_model_initialize(void)
{
init_my_alg(); // once for all instances of s-functions
}
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!