// ADWG_AutoReArm.cpp : Defines the entry point for the console application. // #include #include #include #include #include "stdafx.h" extern "C" { #include "ADWGC.h" } int _tmain(int argc, _TCHAR* argv[]) { // // Go to the work directory // printf("\nGoing to the work directory...\n"); #ifdef _DEBUG _chdir("..\\debug"); #else _chdir("..\\release"); #endif; // // Open library // printf("\nOpening the ADWGC library...\n"); adwg_ADWGC(); // // Read configuration and data file // printf("Reading configuration and data file...\n"); adwg_ReadConfAndDataFile("..\\cfg_files\\adwg_auto_rearm.cfg", true); // // Send the data to the device // int NrSamples = adwg_GetNrSamples(); printf("Starting the job...\n"); adwg_AdwgRunLoop(NrSamples, false, true); // // Running for 5 seconds // printf("Running for 5 seconds"); for (int i=0; i<5; i++) { printf("."); Sleep(1000); } printf("\n"); // // Abort run // printf("Aborting...\n"); adwg_Abort(); // // Close the library // adwg_Terminate(); // // Wait for user input to close the window // printf("Press any key...\n", 1); int ch = _getch(); return 0; }