| Compute Discrete Fourier Transform random number test with DiscreteFourierTransformTest Class |
|
|
In this page we are going to show the steps to use DiscreteFourierTransformTest Class in a simple application, it does not show all DiscreteFourierTransformTest class capabilities. If you want a deeper knowledge of the class you can get DiceCheck Random Test Source Code 2.0.0.1 This article is structured in three concepts: - Project Creation - Project Properties - Execution Project Creation Create the project In Microsoft Visual C++ 2008 Professional select File, New, Project..., select Project type Visual C++ CLR Console Application call it UsingDiceChecker for example like in: Add test file Select Solution, right click and select Open Folder in Windows Explorer, copy random number test data.e file (the file can be found in DiceCheck product) in the folder like in: You can insert the file in the project explorer with the folder Resource Files, Add, Existing Item..., and selecting the file. Solution Explorer will look like:
Insert Source Code Edit stdafx.h file and insert the following C++ code:
Edit UsingDiceChecker.cpp file and insert the following C++ code where a DiscreteFourierTransformTest object is instantiated and used to compute Discrete Fourier Transform test with random number test data supplied in data.e file:
DiceChecker DLL Copy DiceChecker.dll dynamic link library file where the Project will create the executable, in our case is under Release folder like in: Project Properties General These are the general properties of the application: C++ General Select Additional Include Directories, to allow the application to find diceChecker.h header file. On our case it is located at "C:\Program Files\DiceLock Security\DiceChecker\include" directory: C++ Compiler Command Line The compiler command line will look like this: The compiler command line options are:
Linker General In the Linker General Section add the directory where DiceChecker.lib is located in the Additional Library Directories option. In our case the directory is "C:\Program Files\DiceLock Security\DiceChecker\lib". Linker Input Once the previous options have been included, go to Linker Input Section and insert in Additional Dependencies the proper library, DiceChecker.lib. Linker Command Line The linker command line will look like this: The linker command line options are:
Execution Once all previous steps have been completed, select Debug option, Start Without Debugging, and the application will be compiled, linked and executed. The command line application executed will look like the following screenshot where you will be able to verify that DiscreteFourierTransformTest class performs as expected. |
|||||||||||||||

