#include #include /* Needed if linking in external compiler; harmless otherwise */ #include #include "testparam.h" #include "imag.h" #include "imagparam.h" #include "vmag.h" #include "vmagparam.h" #include "tmag.h" #include "tmagparam.h" #include "xmag.h" #include "xmagparam.h" #include "ambient.h" #include "ambientparam.h" int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { /* Declare variables */ struct imag_param_struct imag_param; struct vmag_param_struct vmag_param; struct tmag_param_struct tmag_param; struct xmag_param_struct xmag_param; struct ambient_param_struct ambient_param; char log_file[80]; FILE* file_ptr; int num_test_param; char test_param_name[TESTPARAM_MAX_NUM_TEST_PARAM][TESTPARAM_MAX_NAME_LENGTH]; double test_param_value[TESTPARAM_MAX_NUM_TEST_PARAM]; /* Initialize all files */ strcpy(log_file, "testlog.ru1"); file_ptr = fopen(log_file, "w"); if (file_ptr == NULL) return 0; fclose(file_ptr); /* Fill system parameter structures */ imagparam_fill_param_struct(&imag_param); vmagparam_fill_param_struct(&vmag_param); tmagparam_fill_param_struct(&tmag_param); xmagparam_fill_param_struct(&xmag_param); ambientparam_fill_param_struct(&ambient_param); /* Initialize the measurement systems */ testparam_init(log_file, log_file, log_file); imag_init(log_file, imag_param); vmag_init(log_file, vmag_param); tmag_init(log_file, log_file, tmag_param); xmag_init(log_file, xmag_param); ambient_init(log_file, log_file, ambient_param); /* Measure */ testparam_meas(&num_test_param, test_param_name, test_param_value); /* Save the results */ testparam_dat_meas(num_test_param, test_param_name, test_param_value); testparam_plt_meas(num_test_param, test_param_name, test_param_value); /* Exit */ testparam_exit(); /* Done */ return 0; }