2 #include "ScopeDefines.h"
4 #include "devices/Inputs.h"
5 #include "devices/InputsDAQmx.h"
6 #include "devices/InputsFPGA.h"
7 #include "devices/Outputs.h"
8 #include "devices/OutputsDAQmx.h"
9 #include "devices/OutputsDAQmxLineClock.h"
10 #include "devices/OutputsDAQmxResonance.h"
11 #include "devices/OutputsDAQmxSlave.h"
12 #include "gui/DAQmxPage.h"
13 #include "gui/FPGANoiseOutputPage.h"
14 #include "gui/FPGAAnalogDemultiplexerPage.h"
15 #include "gui/FPGAAnalogIntegratorPage.h"
16 #include "gui/FPGAResonanceScannerPage.h"
17 #include "gui/FPGAResonanceScanner_NI5771Page.h"
18 #include "gui/FPGADigitalDemultiplexerPage.h"
19 #include "gui/FPGAPhotonCounterPage.h"
20 #include "parameters/IO.h"
24 bool ThisIsSlaveArea(
const uint32_t& _a) {
25 #ifdef SCOPE_NBEAM_SETUP
32 uint32_t ThisAreaOrMasterArea(
const uint32_t& _a) {
33 return ThisIsSlaveArea(_a)?0:_a;
36 void CheckScopeDefines() {
37 static_assert( (SCOPE_SCANNERTYPE == ScannerTypeHelper::Mode::Regular) || (SCOPE_SCANNERTYPE == ScannerTypeHelper::Mode::Resonance),
"Only regular and resonance scanner type supported right now");
39 static_assert( (SCOPE_USE_FPGA) ? std::is_same<SCOPE_INPUTS_T, InputsFPGA>::value :
true,
"You have to use InputsFPGA if you use an FPGA");
41 static_assert( (!SCOPE_USE_FPGA)? !std::is_same<SCOPE_INPUTS_T, InputsFPGA>::value :
true,
"You cannot use InputsFPGA if you do not use an FPGA");
43 static_assert( (SCOPE_NAREAS>1) ? !std::is_same<SCOPE_FPGA_T, FPGAPhotonCounter>::value :
true,
"You cannot use FPGAPhotonCounter for multiple areas");
45 static_assert( (SCOPE_NAREAS>1) ? !std::is_same<SCOPE_FPGA_T, FPGAAnalogIntegrator>::value :
true,
"You cannot use FPGAAnalogIntegrator for multiple areas");
47 static_assert( (SCOPE_NAREAS>1) ? !std::is_same<SCOPE_FPGA_T, FPGAResonanceScanner>::value :
true,
"You cannot use FPGAAnalogIntegrator for multiple areas");
49 static_assert( (SCOPE_NAREAS>1) ? !std::is_same<SCOPE_FPGA_T, FPGAResonanceScannerNI5771>::value :
true,
"You cannot use FPGAAnalogIntegrator for multiple areas");
51 static_assert( (SCOPE_NAREAS>1) ? SCOPE_USE_FPGA :
true,
"You have to use an FPGA for a multi-area configuration");
53 static_assert( (std::is_same<SCOPE_FPGA_T, FPGAPhotonCounter>::value&&SCOPE_USE_FPGA) ? std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGAPhotonCounter>::value :
true,
"The inputs parameters type must match the FPGA type");
55 static_assert( (std::is_same<SCOPE_FPGA_T, FPGADigitalDemultiplexer>::value&&SCOPE_USE_FPGA) ? std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGADigitalDemultiplexer>::value :
true,
"The inputs parameters type must match the FPGA type");
57 static_assert( (std::is_same<SCOPE_FPGA_T, FPGAAnalogIntegrator>::value&&SCOPE_USE_FPGA) ? std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGAAnalogIntegrator>::value :
true,
"The inputs parameters type must match the FPGA type");
59 static_assert( (std::is_same<SCOPE_FPGA_T, FPGAResonanceScanner>::value&&SCOPE_USE_FPGA) ? std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGAResonanceScanner>::value :
true,
"The inputs parameters type must match the FPGA type");
61 static_assert( (std::is_same<SCOPE_FPGA_T, FPGAResonanceScannerNI5771>::value&&SCOPE_USE_FPGA) ? std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGAAnalogIntegrator>::value :
true,
"The inputs parameters type must match the FPGA type");
63 static_assert( (std::is_same<SCOPE_FPGA_T, FPGAAnalogDemultiplexer>::value&&SCOPE_USE_FPGA) ? std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGAAnalogDemultiplexer>::value :
true,
"The inputs parameters type must match the FPGA type");
65 static_assert( (std::is_same<SCOPE_FPGA_T, FPGANoiseOutput>::value&&SCOPE_USE_FPGA) ? std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGANoiseOutput>::value :
true,
"The inputs parameters type must match the FPGA type");
67 static_assert( !SCOPE_USE_FPGA ? std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsDAQmx>::value :
true,
"The inputs parameters type must be InputsDAQmx for DAQmx inputs");
69 static_assert( (std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsDAQmx>::value && std::is_same<gui::SCOPE_INPUTSINFOPAGE_T, gui::CDAQmxPage>::value)
70 || (std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGAAnalogDemultiplexer>::value && std::is_same<gui::SCOPE_INPUTSINFOPAGE_T, gui::CFPGAAnalogDemultiplexerPage>::value)
71 || (std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGAAnalogIntegrator>::value && std::is_same<gui::SCOPE_INPUTSINFOPAGE_T, gui::CFPGAAnalogIntegratorPage>::value)
72 || (std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGAResonanceScanner>::value && std::is_same<gui::SCOPE_INPUTSINFOPAGE_T, gui::CFPGAResonanceScannerPage>::value)
73 || (std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGAAnalogIntegrator>::value && std::is_same<gui::SCOPE_INPUTSINFOPAGE_T, gui::CFPGAResonanceScannerNI5771Page>::value)
74 || (std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGADigitalDemultiplexer>::value && std::is_same<gui::SCOPE_INPUTSINFOPAGE_T, gui::CFPGADigitalDemultiplexerPage>::value)
75 || (std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGAPhotonCounter>::value && std::is_same<gui::SCOPE_INPUTSINFOPAGE_T, gui::CFPGAPhotonCounterPage>::value)
76 || (std::is_same<parameters::SCOPE_INPUTS_PARAMETERS_T, parameters::InputsFPGANoiseOutput>::value && std::is_same<gui::SCOPE_INPUTSINFOPAGE_T, gui::CFPGANoiseOutputPage>::value),
"The inputs information page must match the inputs type");
78 static_assert(SCOPE_NAREAS > 0,
"Come on!");
80 static_assert( (std::is_same<SCOPE_OUTPUTS_T, OutputsDAQmx>::value && (SCOPE_MASTERFRAMEVECTORFILL == ScannerVectorFillTypeHelper::Mode::FullframeXYZP))
81 || (std::is_same<SCOPE_OUTPUTS_T, OutputsDAQmxLineClock>::value && (SCOPE_MASTERFRAMEVECTORFILL == ScannerVectorFillTypeHelper::Mode::LineXPColumnYZ))
82 || (std::is_same<SCOPE_OUTPUTS_T, OutputsDAQmxResonance>::value && (SCOPE_MASTERFRAMEVECTORFILL == ScannerVectorFillTypeHelper::Mode::FullframeXYZP)),
"You have to use the correct scanner vector fill type for your choosen Outputs type");
84 static_assert( (std::is_same<SCOPE_OUTPUTS_T, OutputsDAQmx>::value && std::is_same<SCOPE_ZEROOUTPUTS_T, ZeroOutputsDAQmx>::value)
85 || (std::is_same<SCOPE_OUTPUTS_T, OutputsDAQmxLineClock>::value && std::is_same<SCOPE_ZEROOUTPUTS_T, ZeroOutputsDAQmxLineClock>::value)
86 || (std::is_same<SCOPE_OUTPUTS_T, OutputsDAQmxResonance>::value && std::is_same<SCOPE_ZEROOUTPUTS_T, ZeroOutputsDAQmxResonance>::value),
"You have to use the ZeroOutputs type corresponding to your choosen Outputs type");
88 static_assert( std::is_same<SCOPE_SLAVEOUTPUTS_T, OutputsDAQmxSlave>::value && (SCOPE_SLAVEFRAMEVECTORFILL == ScannerVectorFillTypeHelper::Mode::LineZP),
"You have to use the correct scanner vector fill type for your choosen slave Outputs type");
90 static_assert( (SCOPE_MAXCHANNELS <=4 ) && (SCOPE_MAXCHANNELS > 0),
"Buttons etc are only included for up to 4 channels. If you need more, add the appropriate resource to the CChannelFrame menu etc.!");
This is the include file for standard system include files, or project specific include files that ar...
In here all declarations for all kinds of datatypes Scope needs.