-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
42 lines (31 loc) · 950 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <memory>
#include <fstream>
#include <string>
#include "swiftFacade.h"
#include "ScpiCommunicate.h"
using namespace std;
int main(int argc, char* argv[]) {
unique_ptr<swiftFacade> swift = unique_ptr<swiftFacade>(new swiftFacade());
// create a waveform object
swift->newWave();
// parse the commandline options
swift->parseOptions(argc, argv);
// build the desired frequency waveform
swift->doBuildWave();
swift->doWriteOriginalFreqWaveform();
// smooth in frequency space
swift->doSmoothing();
swift->doPhaseModulation();
// Do IFFT, window the time-domain signal, and normalize
swift->doBackwardFFT();
swift->doWriteTimeWaveform();
swift->doWindowing();
swift->doWaveNormalization();
// Write time-domain to the AFG
swift->doWriteAfg();
swift->doWriteWindowedTimeWaveform();
// do FFT and write the waveform, only if the user wants it
swift->doForwardFFT();
swift->doWriteZeroFillWaveform();
return 0;
}