// Analyser_ExternalTrigger.cpp : Defines the entry point for the console application. // #include #include #include "stdafx.h" extern "C" { #include "AnalyserC.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("Opening the AnalyserC library...\n"); ana_AnalyserC(); // // Read configuration and data file // printf("Reading configuration and data file...\n"); ana_ReadConfFileAnalyser("..\\cfg_files\\analyser_trigger.cfg", true); // // Send the data to the device // printf("Running the job...\n"); int NrOfSamples = 1000000; ana_AnalyserRun(NrOfSamples, false, true); // // Get the captured data // short Data; printf("First 10 samples:\n"); for (int i=0; i<10; i++) { ana_GetCapturedData(i, &Data); printf("\t0x%04x\n", Data); } // // Close the library // ana_Terminate(); // // Wait for user input to close the window // printf("Press any key...\n", 1); int ch = _getch(); return 0; }