For example, I have a C external function that returns a structure. Is it possible to return the structure to Modelica?
struct point{
double x;
double y;
}
struct point return_Struct(double a, double b){
struct point pt;
pt.x = a;
pt.y = b;
return pt;
};
In Modelica,
function structReturn
input Real x;
input Real y;
output ??????;
external"C" ????? = return_Struct(x,y)
annotation (Include="#include <cStructReturn.c>");
end structReturn;