2 #include "ScopeDefines.h"
12 enum ControllerReturnStatus {
20 enum FPUMoveDirection {
31 class ScopeDatatypeBase {
38 static std::wstring
NameOf(
const typename T::Mode& _t) {
return T::NameOf(_t); }
41 static std::wstring
NameOf(
const uint32_t& _n) {
return T::NameOf(_n); }
54 for ( uint32_t s = 0 ; s < T::S ; s++ ) {
55 if ( _str == T::NameOf(s) ) {
64 ScopeDatatypeBase& operator=(
const typename T::Mode& _t) { t = _t;
return *
this; }
65 bool operator==(
const ScopeDatatypeBase& _sdb)
const {
return t ==
static_cast<typename T::Mode
>(_sdb); }
66 bool operator==(
const typename T::Mode& _t)
const {
return t == _t; }
67 bool operator!=(
const ScopeDatatypeBase& _sdb)
const {
return !(operator==(_sdb)); }
68 bool operator!=(
const typename T::Mode& _t)
const {
return !(operator==(_t)); }
69 bool operator<(
const ScopeDatatypeBase& _sdb)
const {
return t < static_cast<typename T::Mode>(_sdb); }
70 bool operator>(
const ScopeDatatypeBase& _sdb)
const {
return t >
static_cast<typename T::Mode
>(_sdb); }
71 operator typename T::Mode()
const {
return t; }
72 operator uint32_t()
const {
return static_cast<uint32_t
>(
t); }
73 operator std::wstring()
const {
return T::NameOf(t); }
87 static const uint32_t
S = 2;
90 static std::wstring
NameOf(
const uint32_t& _n) {
91 static std::array<std::wstring, S> names = { L
"ZStage", L
"FastZ" };
97 typedef ScopeDatatypeBase<ZDeviceHelper> ZDevice;
109 static const uint32_t
S = 1;
112 static std::wstring
NameOf(
const uint32_t& _n) {
113 static std::array<std::wstring, S> names = { L
"Gated" };
119 typedef ScopeDatatypeBase<BehaviorModeHelper> BehaviorMode;
133 static const uint32_t
S = 3;
136 static std::wstring
NameOf(
const uint32_t& _n) {
137 static std::array<std::wstring, S> names = { L
"OnboardClock", L
"ReferenceClock", L
"External" };
143 typedef ScopeDatatypeBase<DaqTimingHelper> DaqTiming;
160 static const uint32_t
S = 4;
163 static std::wstring
NameOf(
const uint32_t& _n) {
164 static std::array<std::wstring, S> names = { L
"full", L
"firsthalf", L
"secondhalf", L
"first4096" };
172 typedef ScopeDatatypeBase<Uint16RangeHelper> Uint16Range;
177 uint16_t Uint16LowerBoundary(
const Uint16Range& r);
178 uint16_t Uint16UpperBoundary(
const Uint16Range& r);
193 static const uint32_t
S = 4;
196 static std::wstring
NameOf(
const uint32_t& _n) {
197 static std::array<std::wstring, S> names = { L
"OutputsDAQmx", L
"OutputsDAQmxLineClock", L
"OutputsDAQmxSlave", L
"OutputsDAQmxResonance" };
203 typedef ScopeDatatypeBase<OutputsTypeHelper> OutputsType;
214 InputsFPGADigitalDemultiplexer,
215 InputsFPGAPhotonCounter,
218 InputsFPGAAnalogDemultiplexer,
219 InputsFPGAAnalogIntegrator,
220 InputsFPGAResonanceScanner
224 static const uint32_t
S = 10;
227 static std::wstring
NameOf(
const uint32_t& _n) {
228 static std::array<std::wstring, S> names =
231 , L
"InputsFPGAIO6587"
232 , L
"InputsFPGADigitalDemultiplexer"
233 , L
"InputsFPGAPhotonCounter"
234 , L
"InputsFPGAIO5771"
235 , L
"InputsFPGAIO5751"
236 , L
"InputsFPGAAnalogDemultiplexer"
237 , L
"InputsFPGAAnalogIntegrator"
238 , L
"InputsFPGAResonanceScanner" };
244 typedef ScopeDatatypeBase<InputsTypeHelper> InputsType;
259 static const uint32_t
S = 4;
262 static std::wstring
NameOf(
const uint32_t& _n) {
263 static std::array<std::wstring, S> names =
273 typedef ScopeDatatypeBase<ScannerTypeHelper> ScannerType;
290 static const uint32_t
S = 7;
293 static std::wstring
NameOf(
const uint32_t& _n) {
294 static std::array<std::wstring, S> names =
301 , L
"ResonanceHopper" };
307 typedef ScopeDatatypeBase<ScannerVectorTypeHelper> ScannerVectorType;
338 static const uint32_t
S = 3;
341 static std::wstring
NameOf(
const uint32_t& _n) {
342 static std::array<std::wstring, S> names = { L
"FullframeXYZP", L
"LineXPColumnYZ", L
"LineZP" };
351 typedef ScopeDatatypeBase<ScannerVectorFillTypeHelper> ScannerVectorFillType;
368 static const uint32_t
S = 6;
371 static std::wstring
NameOf(
const uint32_t& _n) {
372 static std::array<std::wstring, S> names = { L
"Stopped", L
"RunningContinuous", L
"RunningSingle", L
"RunningStack", L
"RunningTimeseries", L
"RunningBehavior" };
378 typedef ScopeDatatypeBase<RunStateHelper> RunState;
391 static const uint32_t
S = 2;
394 static std::wstring
NameOf(
const uint32_t& _n) {
395 static std::array<std::wstring, S> names = { L
"continuous", L
"nframes" };
401 typedef ScopeDatatypeBase<DaqModeHelper> DaqMode;
409 SimultaneousSampling,
410 NonSimultaneousSampling
414 static const uint32_t
S = 2;
417 static std::wstring
NameOf(
const uint32_t& _n) {
418 static std::array<std::wstring, S> names = { L
"SimultaneousSampling", L
"NonSimultaneousSampling" };
425 typedef ScopeDatatypeBase<DaqSamplingHelper> DaqSampling;
static const uint32_t S
Number of enumerators.
Wraps hardware connection for signal output to fast z control and pockels cell (for a slave area with...
static bool IsSupported(const ScannerVectorTypeHelper::Mode &_scanmode, const ScannerTypeHelper::Mode &_scannertype=SCOPE_SCANNERTYPE)
Returns true if a given scannervector/scanmode is supported by a given scannertypeDefault scannertype...
Describes the scanner vector types that are supported for a given scanner type.
static std::wstring NameOf(const uint32_t &_n)
static const uint32_t S
Number of enumerators.
static std::wstring NameOf(const uint32_t &_n)
static std::wstring NameOf(const typename T::Mode &_t)
static std::wstring NameOf(const uint32_t &_n)
Mode
Enum for the mode of scanning/acquisition, either continuous or a certain number of frames...
ScopeDatatypeBase(const std::wstring &_str)
Construct from string.
Describes the scanner vector fill type for different parameters::Outputs types :
static std::wstring NameOf(const uint32_t &_n)
static const uint32_t S
Number of enumerators.
Mode
The different types of scanner vector fill types.
Describes the type of scanner.
Mode
The different types of scans.
ScopeDatatypeBase(const typename T::Mode &_t)
Construct from enumerators.
static bool IsBuiltinSupported(const ScannerVectorTypeHelper::Mode &_scanmode)
Returns true if a given scannervector/scanmode is supported by the builtin/hardcoded (see ScopeDefine...
Wraps hardware connection for signal output to scanners, fast z control, and pockels cell with NI-DAQ...
Base class for all Scope datatypes here, provides a uniform interface (and saves typing...).
static const uint32_t S
Number of enumerators.
static const uint32_t S
Number of enumerators.
static const uint32_t S
Number of enumerators.
Wraps hardware connection for signal output to scanners, fast z control, and pockels cell with NI-DAQ...
static std::wstring NameOf(const uint32_t &_n)
static const uint32_t S
Number of enumerators.
T::Mode t
the enum from the template class
static std::wstring NameOf(const uint32_t &_n)
Describes the data acquisiton mode.
Describes the type of signals output to scanners/fast z/Pockels.
How does the animal behavior trigger/gate acquisition?
Mode
Enum for the acquisition sampling type (either simultaneous or not)
static std::wstring NameOf(const uint32_t &_n)
static const uint32_t S
Number of enumerators.
static std::wstring NameOf(const uint32_t &_n)
Wraps hardware connection for signal output to scanners, fast z control, and pockels cell with NI-DAQ...
The type of z control device that is used for a stack.
static std::wstring NameOf(const uint32_t &_n)
static std::wstring NameOf(const uint32_t &_n)
Mode
The different types of scanners.
static std::wstring NameOf(const uint32_t &_n)
Enum for the usable data input range.
Describes the scanner vector type.
Sampling method (depending on card etc), either simultaneous (clock independent of channel number) or...
Mode
The different types of outputs.
Class for the DAQmx timing, either by onboard clock, through a reference clock or by an external cloc...
Mode
Enum for the run state of the scope, stopped, continuously scanning, single scan, stack scan...
static const uint32_t S
Number of enumerators.
static const uint32_t S
Number of enumerators.
Describes the actual state of the scope.
static const uint32_t S
Number of enumerators.
static std::vector< ScannerVectorTypeHelper::Mode > List(const ScannerTypeHelper::Mode &_scannertype=SCOPE_SCANNERTYPE)
Returns a vector with all supported scannervectors for a given scannertype.
static std::wstring NameOf(const uint32_t &_n)