/* ************************************************************* */ /* INCLUDE FILES */ #include #include #include #include #include "vtcoilparam.h" #include "vtcoil.h" #include "vtcoilui.h" /* ************************************************************* */ /* PRIVATE FUNCTIONS */ void vtcoilop_init(void); void vtcoilop_exit(void); /* ************************************************************* */ int main(int argc, char *argv[]) { /* Perform all initialization for the program */ vtcoilop_init(); /* Run the user interface */ RunUserInterface(); /* Exit the coil measurement system */ vtcoilop_exit(); /* Message */ printf("\nDone\n"); /* Done */ return 0; } /* ************************************************************** */ void vtcoilop_init(void) { /* Declare variables */ char log_file[80]; FILE* file_ptr; int board; struct vtcoil_param_struct vtcoil_param; /* Initialize all files */ strcpy(log_file, "testlog.ru1"); file_ptr = fopen(log_file, "w"); if (file_ptr == NULL) return; fclose(file_ptr); /* Initialize the GPIB system */ /* But do it only if the hardware is present */ #ifndef DUMMY_DEVICES //board = ibfind("GPIB0"); //ibsic(board); #endif /* Get VTcoil parameters */ vtcoilparam_fill_param_struct(&vtcoil_param); /* Initialize the integrated voltage system */ vtcoil_init(log_file, vtcoil_param); /* Initialize the user interface */ if (vtcoil_param.show_ui == VTCOIL_TRUE) vtcoilui_init(30, 75, vtcoil_param); if (vtcoil_param.show_ui == VTCOIL_TRUE) vtcoilopui_init(30, 500); /* Set the stdio window parameters */ SetStdioWindowPosition(500, 75); SetStdioWindowSize(220, 700); /* Done */ return; } /* ************************************************************** */ void vtcoilop_exit(void) { /* Exit the coil measurement system */ vtcoil_exit(); /* Done */ return; }