#include #include /* Needed if linking in external compiler; harmless otherwise */ #include #include "sensor.h" #include "sensorparam.h" #include "senmeas.h" #include "senmeasui.h" #include "senmeasparam.h" int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { /* Declare variables */ char log_file[80]; char dat_file[80]; FILE* file_ptr; struct sensor_param_struct sensor_param; struct senmeas_param_struct senmeas_param; int num_sensor; struct sensor_info_struct sensor_info[SENMEAS_MAX_NUM_SENSOR]; double sensor_meas_val[SENMEAS_MAX_NUM_SENSOR]; /* Initialize the log file */ strcpy(log_file, "testlog.ru1"); file_ptr = fopen(log_file, "w"); if (file_ptr == NULL) return 0; fclose(file_ptr); /* Initialize the dat file */ strcpy(dat_file, "testdat.ru1"); file_ptr = fopen(dat_file, "w"); if (file_ptr == NULL) return 0; fclose(file_ptr); if (InitCVIRTE(hInstance, 0, 0) == 0) /* Needed if linking in external compiler; harmless otherwise */ return -1; /* out of memory */ sensorparam_fill_param_struct(&sensor_param); senmeasparam_fill_param_struct(&senmeas_param); sensor_init(log_file, sensor_param); senmeas_init(log_file, senmeas_param); senmeasui_init(); senmeas_measure_scan_all(&num_sensor, sensor_info, sensor_meas_val); senmeas_dat_measure_all(dat_file, num_sensor, sensor_info, sensor_meas_val); senmeas_dat_measure_all_vs_time(dat_file, num_sensor, sensor_info, sensor_meas_val); RunUserInterface(); return 0; }