Generating a C code DLL for an S-function with continuous states

조회 수: 3 (최근 30일)
Vighnesh
Vighnesh 2023년 5월 4일
I'm trying to generate a DLL from an S-function (via Embedded Coder) which has continous states and then call the respective functions via a C# script. I have written a tlc file and the DLL has been succesfully generated.
One of the functions generated is of the following template:
static void rt_ertODEUpdateContinuousStates(RTWSolverInfo *si, RT_MODEL_mav_dynamics0_T *const mav_dynamics0_M, real_T mav_dynamics0_U_forces_and_moments[6], real_T mav_dynamics0_Y_x[12])
However, the data type RTWSolverInfo isn't defined anywhere. Many other functions have been called inside the function definition as well such as rtsiGetT(), rtsiGetSolverStopTime(), rtsiGetStepSize(), rtsiGetContStates() and rtsiGetSolverData() which have not been defined anywhere.
Even the step function uses a structure variable as a parameter. One of the members of that structure is a variable of data type RTWSolverInfo, which has not been defined anywhere.
Has anybody encountered this issue before? Could you show me how I can define this data type in C# or any way to work around this so I can succesfully use this DLL in C#?

답변 (0개)

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by