How to resolve function redefinition and function parameter data type conflicts when adding custom interface functions for SIL testing in Simulink
13 次查看(过去 30 天)
显示 更早的评论
Hello,My model interface uses a GetSet storage class and I added custom functions when generating C code. It compiles fine, but during SIL testing, there are errors of function redefinition and function parameter conflicts:
1、I added my custom interface externally, and when compiling the generated C code, my custom code was successfully compiled into the generated code. However, during SIL testing, the SIL component also generates a function for my interface, which causes a function redefinition error during SIL testing. How can this be resolve?
2、To avoid compiling my custom functions into the SIL file during SIL testing, I only included the header files of my custom functions. This allows the SIL component to generate properly. However, my custom Set function has two parameters: one is an index value and the other is a float value. In the generated C code, the index is defined as SINT32, so I also use SINT32 in my custom function. But in the SIL-generated component, the Set function interface is also defined, and it uses size_t, which causes a function data type conflict. How can this error be resolved?

0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!