#define __DLLEXPORT #include "entry.h" #include void init(int out_int[], int out_int_num); void Set_Data(double in[], int in_num); void Get_Data(double out[], int out_num); void Sim(void); // in[0] = value1 // in[1] = value2 // in[2] = value3 // in[3] = input4 // out[0] = output1 // out[1] = output2 int input4 = 0; int output1 = 0; int output2 = 0; typedef struct { double value1; double value2; double value3; } Buffer; static Buffer buffer; double entry(double in[], int in_num, double out[], int out_num, int out_int[], int out_int_num) { static int counter = 0; Set_Data(&in[0], in_num); if (counter++ > 5) { if (buffer.value1 >= buffer.value2) { output1 = 1; } } Sim(); Get_Data(&out[0], out_num); return 0.0; } void init(int out_int[], int out_int_num) { } void Set_Data(double in[], int in_num) { double buffer.value1 = in[0]; // input double buffer.value2 = in[1]; // input double buffer.value3 = in[2]; // input double input4 = in[3]; // input } void Get_Data(double out[], int out_num) { out[0] = output1; out[1] = output2; } void Sim(void) { }