Scope
IO.h
1 #pragma once
2 
3 #include "ScopeDefines.h"
4 #include "ScopeDatatypes.h"
5 #include "helpers/ScopeNumber.h"
6 #include "helpers/ScopeString.h"
7 #include "helpers/helpers.h"
8 #include "Base.h"
9 
10 namespace scope {
11 
13 namespace parameters {
14 
15 using boost::property_tree::wptree;
16 
18 class Inputs
19  : public Base {
20 
21 public:
22  Inputs();
23 
25  virtual std::unique_ptr<Inputs> Clone() const = 0;
26 
28  static std::unique_ptr<Inputs> Factory(const InputsType& _type);
29 
32 
35 
38 
41 
43  virtual double MinimumPixeltime() const { return 1.0; }
44 
46  virtual double MaximumPixeltime() const { return 15.0; }
47 
49  virtual double CoercedPixeltime(const double& _pixeltime) const { return _pixeltime; }
50 
51  void Load(const wptree& pt) override;
52  void Save(wptree& pt) const override;
53  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
54 
55 };
56 
59  : public Inputs {
60 
61 public:
62  InputsDAQmx();
63 
65  static std::unique_ptr<Inputs> Create() { return std::unique_ptr<Inputs>(new InputsDAQmx()); }
66 
67  std::unique_ptr<Inputs> Clone() const override { return std::unique_ptr<Inputs>(new InputsDAQmx(*this)); }
68 
71 
74 
77 
80 
84 
87 
90 
93 
95  struct Diagnosis {
98 
99  Diagnosis()
100  : daqmxversion(L"", L"DAQmxVersion") {
101  }
102  };
103 
106 
107  double MinimumPixeltime() const override;
108 
109  double CoercedPixeltime(const double& _pixeltime) const override;
110 
111  void Load(const wptree& pt) override;
112  void Save(wptree& pt) const override;
113  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
114 };
115 
118  : public Inputs {
119 public:
120  InputsFPGA();
121 
123  static std::unique_ptr<Inputs> Create() { return std::unique_ptr<Inputs>(new InputsFPGA()); }
124 
125  std::unique_ptr<Inputs> Clone() const override { return std::unique_ptr<Inputs>(new InputsFPGA(*this)); }
126 
127  double MinimumPixeltime() const override;
128 
129  double CoercedPixeltime(const double& _pixeltime) const override;
130 
131  void Load(const wptree& pt) override;
132  void Save(wptree& pt) const override;
133  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
134 };
135 
138  : public InputsFPGA {
139 public:
141 
143  static std::unique_ptr<Inputs> Create() { return std::unique_ptr<Inputs>(new InputsFPGANoiseOutput()); }
144 
145  std::unique_ptr<Inputs> Clone() const override { return std::unique_ptr<Inputs>(new InputsFPGANoiseOutput(*this)); }
146 
148  struct Diagnosis {
151  ScopeNumber<bool> ToHostOverflowA1Ch1;
152  ScopeNumber<bool> ToHostOverflowA1Ch2;
153  ScopeNumber<bool> ToHostOverflowA2Ch1;
154  ScopeNumber<bool> ToHostOverflowA2Ch2;
158 
159  Diagnosis()
160  : ToHostOverflowA1Ch1(false, false, true, L"ToHostOverflowA1Ch1")
161  , ToHostOverflowA1Ch2(false, false, true, L"ToHostOverflowA1Ch2")
162  , ToHostOverflowA2Ch1(false, false, true, L"ToHostOverflowA1Ch1")
163  , ToHostOverflowA2Ch2(false, false, true, L"ToHostOverflowA1Ch2")
164  , Acquiring(false, false, true, L"Acquiring") {
165  }
166  };
167 
170 };
171 
174  : public InputsFPGA {
175 public:
177 
179  static std::unique_ptr<Inputs> Create() { return std::unique_ptr<Inputs>(new InputsFPGAIO6587()); }
180 
181  std::unique_ptr<Inputs> Clone() const override { return std::unique_ptr<Inputs>(new InputsFPGAIO6587(*this)); }
182 
185 
186  double MinimumPixeltime() const override;
187 
188  double CoercedPixeltime(const double& _pixeltime) const override;
189 
190  void Load(const wptree& pt) override;
191  void Save(wptree& pt) const override;
192  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
193 };
194 
197  : public InputsFPGAIO6587 {
198 public:
200 
202  static std::unique_ptr<Inputs> Create() { return std::unique_ptr<Inputs>(new InputsFPGADigitalDemultiplexer()); }
203 
204  std::unique_ptr<Inputs> Clone() const override { return std::unique_ptr<Inputs>(new InputsFPGADigitalDemultiplexer(*this)); }
205 
208 
210  struct Diagnosis {
213  ScopeNumber<bool> ToHostOverflowA1Ch1;
214  ScopeNumber<bool> ToHostOverflowA1Ch2;
215  ScopeNumber<bool> ToHostOverflowA2Ch1;
216  ScopeNumber<bool> ToHostOverflowA2Ch2;
217  ScopeNumber<bool> InterloopOverflow;
218  ScopeNumber<bool> InterloopTimeout;
224 
225  Diagnosis()
226  : ToHostOverflowA1Ch1(false, false, true, L"ToHostOverflowA1Ch1")
227  , ToHostOverflowA1Ch2(false, false, true, L"ToHostOverflowA1Ch2")
228  , ToHostOverflowA2Ch1(false, false, true, L"ToHostOverflowA2Ch1")
229  , ToHostOverflowA2Ch2(false, false, true, L"ToHostOverflowA2Ch2")
230  , InterloopOverflow(false, false, true, L"InterloopOverflow")
231  , InterloopTimeout(false, false, true, L"InterloopTimeout")
232  , Acquiring(false, false, true, L"Acquiring")
233  , MeasuredLaserFreq(0.0, 0.0, 1E10, L"MeasuredLaserFrequency_Hz") {
234  }
235  };
236 
239 
240  void Load(const wptree& pt) override;
241  void Save(wptree& pt) const override;
242  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
243 };
244 
247  : public InputsFPGAIO6587 {
248 public:
250 
252  static std::unique_ptr<Inputs> Create() { return std::unique_ptr<Inputs>(new InputsFPGAPhotonCounter()); }
253 
254  std::unique_ptr<Inputs> Clone() const override { return std::unique_ptr<Inputs>(new InputsFPGAPhotonCounter(*this)); }
255 
258 
260  struct Diagnosis {
263  ScopeNumber<bool> ToHostOverflowCh1;
264  ScopeNumber<bool> ToHostOverflowCh2;
265  ScopeNumber<bool> InterloopOverflow;
266  ScopeNumber<bool> InterloopTimeout;
270 
273 
274  Diagnosis()
275  : ToHostOverflowCh1(false, false, true, L"ToHostOverflowCh1")
276  , ToHostOverflowCh2(false, false, true, L"ToHostOverflowCh2")
277  , InterloopOverflow(true, false, true, L"InterloopOverflow")
278  , InterloopTimeout(false, false, true, L"InterloopTimeout")
279  , Acquiring(false, false, true, L"Acquiring")
280  , CountingMode(true, false, true, L"CountingMode") {
281  }
282  };
283 
286 
287  void Load(const wptree& pt) override;
288  void Save(wptree& pt) const override;
289  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
290 };
291 
294  : public InputsFPGA {
295 public:
297 
299  static std::unique_ptr<Inputs> Create() { return std::unique_ptr<Inputs>(new InputsFPGAIO5771()); }
300 
301  std::unique_ptr<Inputs> Clone() const override { return std::unique_ptr<Inputs>(new InputsFPGAIO5771(*this)); }
302 
305 
308 
311 
314 
315  double MinimumPixeltime() const override;
316 
317  double CoercedPixeltime(const double& _pixeltime) const override;
318 
319  void Load(const wptree& pt) override;
320  void Save(wptree& pt) const override;
321  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
322 };
323 
326  : public InputsFPGA {
327 public:
329 
331  static std::unique_ptr<Inputs> Create() { return std::unique_ptr<Inputs>(new InputsFPGAIO5751()); }
332 
333  std::unique_ptr<Inputs> Clone() const override { return std::unique_ptr<Inputs>(new InputsFPGAIO5751(*this)); }
334 
337 
340 
343 
344  double MinimumPixeltime() const override;
345  double MaximumPixeltime() const override;
346 
347  double CoercedPixeltime(const double& _pixeltime) const override;
348 
349  void Load(const wptree& pt) override;
350  void Save(wptree& pt) const override;
351  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
352 };
353 
356  : public InputsFPGAIO5771 {
357 public:
359 
361  static std::unique_ptr<Inputs> Create() { return std::unique_ptr<Inputs>(new InputsFPGAAnalogDemultiplexer()); }
362 
363  std::unique_ptr<Inputs> Clone() const override { return std::unique_ptr<Inputs>(new InputsFPGAAnalogDemultiplexer(*this)); }
364 
367 
370 
373 
376 
378  struct Diagnosis {
381  ScopeNumber<bool> ToHostOverflowA1;
382  ScopeNumber<bool> ToHostOverflowA2;
383  ScopeNumber<bool> InterloopOverflow;
384  ScopeNumber<bool> InterloopTimeout;
388 
391 
392  Diagnosis()
393  : ToHostOverflowA1(false, false, true, L"ToHostOverflowA1")
394  , ToHostOverflowA2(false, false, true, L"ToHostOverflowA2")
395  , InterloopOverflow(false, false, true, L"InterloopOverflow")
396  , InterloopTimeout(false, false, true, L"InterloopTimeout")
397  , Acquiring(false, false, true, L"Acquiring")
398  , AIOverRange(false, false, true, L"AIOverRange") {
399  }
400  };
401 
404 
405  void Load(const wptree& pt) override;
406  void Save(wptree& pt) const override;
407  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
408 };
409 
412  : public InputsFPGAIO5771 {
413 public:
415 
417  static std::unique_ptr<Inputs> Create() { return std::unique_ptr<Inputs>(new InputsFPGAAnalogIntegrator()); }
418 
419  std::unique_ptr<Inputs> Clone() const override { return std::unique_ptr<Inputs>(new InputsFPGAAnalogIntegrator(*this)); }
420 
423 
426 
428  struct Diagnosis {
431  ScopeNumber<bool> ToHostOverflowCh1;
432  ScopeNumber<bool> ToHostOverflowCh2;
433  ScopeNumber<bool> InterloopOverflow;
434  ScopeNumber<bool> InterloopTimeout;
438 
441 
442  Diagnosis()
443  : ToHostOverflowCh1(false, false, true, L"ToHostOverflowCh1")
444  , ToHostOverflowCh2(false, false, true, L"ToHostOverflowCh2")
445  , InterloopOverflow(false, false, true, L"InterloopOverflow")
446  , InterloopTimeout(false, false, true, L"InterloopTimeout")
447  , Acquiring(false, false, true, L"Acquiring")
448  , AIOverRange(false, false, true, L"AIOverRange") {
449  }
450  };
451 
454 
455  void Load(const wptree& pt) override;
456  void Save(wptree& pt) const override;
457  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
458 };
459 
462  : public InputsFPGAIO5751 {
463 public:
465 
467  static std::unique_ptr<Inputs> Create() { return std::unique_ptr<Inputs>(new InputsFPGAResonanceScanner()); }
468 
469  std::unique_ptr<Inputs> Clone() const override { return std::unique_ptr<Inputs>(new InputsFPGAResonanceScanner(*this)); }
470 
473 
476 
478  struct Diagnosis {
481  ScopeNumber<bool> ToHostOverflowCh1;
482  ScopeNumber<bool> ToHostOverflowCh2;
483  ScopeNumber<bool> InterloopOverflow;
484  ScopeNumber<bool> InterloopTimeout;
488 
491 
492  Diagnosis()
493  : ToHostOverflowCh1(false, false, true, L"ToHostOverflowCh1")
494  , ToHostOverflowCh2(false, false, true, L"ToHostOverflowCh2")
495  , InterloopOverflow(false, false, true, L"InterloopOverflow")
496  , InterloopTimeout(false, false, true, L"InterloopTimeout")
497  , Acquiring(false, false, true, L"Acquiring")
498  , AIOverRange(false, false, true, L"AIOverRange") {
499  }
500  };
501 
504 
505  void Load(const wptree& pt) override;
506  void Save(wptree& pt) const override;
507  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
508 };
509 
511 class Outputs
512  : public Base {
513 
514 public:
515  Outputs();
516 
517 
520  virtual std::unique_ptr<Outputs> Clone() const = 0;
521 
523  static std::unique_ptr<Outputs> Factory(const OutputsType& _type);
524 
527 
530 
533 
536 
539 
541  virtual double CoercedPixeltime(const double& _pixeltime) const { return _pixeltime; }
542 
544  virtual double MinimumPixeltime() const { return 1.0; }
545 
546  void Load(const wptree& pt) override;
547  void Save(wptree& pt) const override;
548  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
549 };
550 
553  : public Outputs {
554 
555 public:
556  OutputsDAQmx();
557 
558  std::unique_ptr<Outputs> Clone() const override { return std::unique_ptr<Outputs>(new OutputsDAQmx(*this)); }
559 
561  static std::unique_ptr<Outputs> Create() { return std::unique_ptr<Outputs>(new OutputsDAQmx()); }
562 
565 
568 
571 
574 
578 
581 
584 
585  double CoercedPixeltime(const double& _pixeltime) const override;
586 
587  double MinimumPixeltime() const override;
588 
589  void Load(const wptree& pt) override;
590  void Save(wptree& pt) const override;
591  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
592 };
593 
597  : public Outputs {
598 
599 public:
601 
602  std::unique_ptr<Outputs> Clone() const override { return std::unique_ptr<Outputs>(new OutputsDAQmxLineClock(*this)); }
603 
605  static std::unique_ptr<Outputs> Create() { return std::unique_ptr<Outputs>(new OutputsDAQmxLineClock()); }
606 
609 
612 
615 
618 
623 
626 
629 
633 
637 
640 
643 
644  double CoercedPixeltime(const double& _pixeltime) const override;
645 
646  double MinimumPixeltime() const override;
647 
648  void Load(const wptree& pt) override;
649  void Save(wptree& pt) const override;
650  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
651 };
652 
657  : public Outputs {
658 
659 public:
661 
662  std::unique_ptr<Outputs> Clone() const override { return std::unique_ptr<Outputs>(new OutputsDAQmxSlave(*this)); }
663 
665  static std::unique_ptr<Outputs> Create() { return std::unique_ptr<Outputs>(new OutputsDAQmxSlave()); }
666 
669 
672 
675 
678 
682 
685 
686  double CoercedPixeltime(const double& _pixeltime) const override;
687 
688  double MinimumPixeltime() const override;
689 
690  void Load(const wptree& pt) override;
691  void Save(wptree& pt) const override;
692  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
693 };
694 
697  : public Outputs {
698 
699 public:
701 
702  std::unique_ptr<Outputs> Clone() const override { return std::unique_ptr<Outputs>(new OutputsDAQmxResonance(*this)); }
703 
705  static std::unique_ptr<Outputs> Create() { return std::unique_ptr<Outputs>(new OutputsDAQmxResonance()); }
706 
709 
712 
715 
718 
721 
724 
728 
731 
734 
735  double CoercedPixeltime(const double& _pixeltime) const override;
736 
737  double MinimumPixeltime() const override;
738 
739  void Load(const wptree& pt) override;
740  void Save(wptree& pt) const override;
741  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
742 };
743 
747 class Daq
748  : public Base {
749 
750 public:
752  Daq(const bool& _isslave);
753 
755  Daq(const Daq& _daq);
756 
758  Daq& operator=(const Daq& _daq);
759 
761  const bool isslave;
762 
764  std::unique_ptr<Inputs> inputs;
765 
767  std::unique_ptr<Outputs> outputs;
768 
771 
774 
777 
780 
783 
786 
789 
792 
794  int32_t ScannerDelaySamples(const bool& _respectoversampling) const;
795 
796  void Load(const wptree& pt) override;
797  void Save(wptree& pt) const override;
798  void SetReadOnlyWhileScanning(const RunState& _runstate) override;
799 
800 protected:
802  void CoercePixeltime();
803 };
804 
805 
806 }
807 
808 }
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:260
ScopeNumber< uint32_t > preframelines
number of lines to acquire before each frame, e.g.
Definition: IO.h:40
ScopeNumber< double > range
Input range of the ADC.
Definition: IO.h:73
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:213
ScopeNumber< double > referenceclockrate
rate in Hertz of the reference clock.
Definition: IO.h:727
static std::unique_ptr< Inputs > Create()
Create method for factory.
Definition: IO.h:65
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:203
ScopeNumber< uint8_t > BitshiftCh2
Number of bits to shift U32 right before casting to U16 (channel 2)
Definition: IO.h:425
Parameters for x/y-scanner/fast z/Pockels signal generation with NI-DAQmx where all output channels (...
Definition: IO.h:552
static std::unique_ptr< Outputs > Create()
Create function for factory.
Definition: IO.h:561
ScopeValue< DaqSampling > sampling
simultaneous sampling or not
Definition: IO.h:92
ScopeString referenceclocksource
source terminal of the reference clock
Definition: IO.h:79
ScopeNumber< bool > countmode
Type of photon counting.
Definition: IO.h:257
std::unique_ptr< Outputs > outputs
the output parameters
Definition: IO.h:767
double CoercedPixeltime(const double &_pixeltime) const override
Definition: IO.cpp:518
ScopeString pixel_referenceclocksource
source terminal of the reference clock for pixel sampling clock
Definition: IO.h:625
std::unique_ptr< Inputs > Clone() const override
Clone method to clone into a pointer.
Definition: IO.h:125
ScopeNumber< double > samplingrate
Sampling rate of the IO modules clock (which is double the clock rate of the FPGA acquisition loop) i...
Definition: IO.h:184
ScopeNumber< uint32_t > requested_frames
number of frames to acquire
Definition: IO.h:788
ScopeNumber< bool > CountingMode
Switch for counting mode.
Definition: IO.h:272
ScopeString zoomchannelstring
the digital channel to use for the resonance scanner zoom factor
Definition: IO.h:714
ScopeNumber< bool > AIOverRange
indicator if input is over the ADC range
Definition: IO.h:440
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:426
double MinimumPixeltime() const override
Definition: IO.cpp:566
Some diagnosis parameters, more useful for FPGAs ...
Definition: IO.h:95
double MinimumPixeltime() const override
Definition: IO.cpp:470
ScopeNumber< uint32_t > BaselineCh1
Baseline U16 value to set zero in channel 1.
Definition: IO.h:336
static std::unique_ptr< Inputs > Create()
Create function for factory.
Definition: IO.h:361
ScopeNumber< double > pixeltime
pixel dwell time in microseconds, this is also the analog out sampling interval
Definition: IO.h:779
ScopeNumber< bool > oversampling
if yes acquisition with maximum rate allowed by device (1/MinimumPixelTime(), calculated from maxrate...
Definition: IO.h:34
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:478
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:210
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:21
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:359
ScopeNumber< double > referenceclockrate
rate in Hertz of the reference clock.
Definition: IO.h:577
ScopeNumber< double > maxrateaggregate
maximum aggregate sampling rate (divide this by number of channels to get per channel rate for non-si...
Definition: IO.h:89
double CoercedPixeltime(const double &_pixeltime) const override
Definition: IO.cpp:418
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:373
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:526
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:474
static std::unique_ptr< Inputs > Create()
Create function for factory.
Definition: IO.h:202
ScopeNumber< double > minimumpixeltime
Minimum sample time for 2 channel output.
Definition: IO.h:622
ScopeString daqmxversion
DAQmx library version number
Definition: IO.h:97
ScopeNumber< double > minoutputpockels
minimum output voltage for scaling of the pockels signal
Definition: IO.h:535
static std::unique_ptr< Outputs > Create()
Create function for factory.
Definition: IO.h:605
ScopeString externalclocksource
source terminal of an external clock for sampling clock (could be e.g.
Definition: IO.h:684
ScopeValue< DaqTiming > line_timing
where to get the line sampling clock from? Onboard, from external reference clock, or from external source
Definition: IO.h:617
ScopeNumber< double > referenceclockrate
rate in Hertz of the reference clock.
Definition: IO.h:83
std::unique_ptr< Outputs > Clone() const override
Abstract clone method to clone into a pointer.
Definition: IO.h:602
ScopeNumber< uint8_t > BitshiftA1Ch2
Number of bits to shift U32 right before casting to U16 (area 1 channel 2)
Definition: IO.h:369
ScopeNumber< uint32_t > resonance_frequency
frequency of the resonance scanner used, which is especially the frequency of the synchronization sig...
Definition: IO.h:791
Parameters for pixel acquisition with FPGADigitalDemultiplexer.
Definition: IO.h:196
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:141
ScopeNumber< uint8_t > BitshiftCh2
Number of bits to shift U32 right before casting to U16 (channel 2)
Definition: IO.h:475
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:489
ScopeNumber< bool > Acquiring
and the Acquiring indicator
Definition: IO.h:157
double CoercedPixeltime(const double &_pixeltime) const override
Definition: IO.cpp:161
virtual double CoercedPixeltime(const double &_pixeltime) const
Definition: IO.h:49
Parameters for pixel acquisition FPGAAnalogDemultiplexer.
Definition: IO.h:355
std::unique_ptr< Outputs > Clone() const override
Abstract clone method to clone into a pointer.
Definition: IO.h:558
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:35
ScopeNumber< double > minimumpixeltime
Minimum sample time for 4 channel output.
Definition: IO.h:720
All parameters for scanner data generation and pixel acquisition If you add/remove parameters or deri...
Definition: IO.h:747
double MinimumPixeltime() const override
Definition: IO.cpp:422
All parameter classes derive from this.
Definition: Base.h:21
ScopeNumber< bool > AIOverRange
indicator if input is over the ADC range
Definition: IO.h:390
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:536
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:233
ScopeNumber< uint32_t > BaselineCh2
Baseline U16 value to set zero in channel 2.
Definition: IO.h:339
ScopeNumber< double > referenceclockrate
rate in Hertz of the reference clock for sampling clock.
Definition: IO.h:681
ScopeString shutterline
digital output line of the shutter
Definition: IO.h:770
std::unique_ptr< Inputs > Clone() const override
Clone method to clone into a pointer.
Definition: IO.h:181
ScopeString referenceclocksource
source terminal of the reference clock
Definition: IO.h:573
double CoercedPixeltime(const double &_pixeltime) const override
Definition: IO.cpp:228
double MinimumPixeltime() const override
Definition: IO.cpp:85
static std::unique_ptr< Inputs > Create()
Create function for factory.
Definition: IO.h:179
ScopeString channelsstring
How many input channels (if sampling non-simulataneous this influences the available sampling rates) ...
Definition: IO.h:70
static std::unique_ptr< Inputs > Create()
Create function for factory.
Definition: IO.h:331
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:273
virtual double CoercedPixeltime(const double &_pixeltime) const
Definition: IO.h:541
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:208
Diagnosis diagnosis
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:285
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:662
Parameters for pixel acquisition, base class.
Definition: IO.h:18
static std::unique_ptr< Inputs > Create()
Create function for factory.
Definition: IO.h:143
Base class for all Scope datatypes here, provides a uniform interface (and saves typing...).
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:325
ScopeNumber< uint8_t > BitshiftCh1
Number of bits to shift U32 right before casting to U16 (channel 1)
Definition: IO.h:422
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:176
ScopeNumber< uint8_t > BitshiftA2Ch1
Number of bits to shift U32 right before casting to U16 (area 2 channel 1)
Definition: IO.h:372
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:185
ScopeNumber< double > MeasuredLaserFreq
Measured laser frequency, calculated from counted laserpulses per pixel.
Definition: IO.h:223
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:331
virtual double MaximumPixeltime() const
Definition: IO.h:46
std::unique_ptr< Inputs > Clone() const override
Clone method to clone into a pointer.
Definition: IO.h:67
Parameters for pixel acquisition with FPGAPhotonCounter.
Definition: IO.h:246
ScopeString scanveclength
the length of the scanner vector (per channel)
Definition: IO.h:711
double CoercedPixeltime(const double &_pixeltime) const override
Definition: IO.cpp:466
ScopeString exportpixelclockterminal
terminal to which the pixel/sampleclock is exported
Definition: IO.h:733
ScopeNumber< uint8_t > BaselineCh2
Baseline U8 value to set zero in channel 2 (NI5771 reads ~ -1..+1V as unsigned 8 bit number...
Definition: IO.h:307
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:113
ScopeValue< DaqTiming > daq_timing
where to get the sampling clock from? Onboard, from external reference clock, or from external source...
Definition: IO.h:567
Parameters for scanner data generation, base class.
Definition: IO.h:511
ScopeString zoomresonanceline
digital output line of the zoom factor for a resonance scanner
Definition: IO.h:776
double CoercedPixeltime(const double &_pixeltime) const override
Definition: IO.cpp:562
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:546
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:692
ScopeString externalclocksource
source terminal of an external clock
Definition: IO.h:580
Parameters for the noise generating FPGA vi.
Definition: IO.h:137
ScopeString externalclocksource
source terminal of an external clock
Definition: IO.h:730
ScopeNumber< double > minimumpixeltime
Minimum sample time for 2 channel output.
Definition: IO.h:674
ScopeValue< Uint16Range > rangetype
which part of the uint16_t range is used for valid input signals
Definition: IO.h:37
ScopeString referenceclocksource
source terminal of the reference clock
Definition: IO.h:723
ScopeNumber< uint8_t > CutoffCh2
Cutoff U8 value to set zero in channel 2 (NI5771 reads ~ -1..+1V as unsigned 8 bit number...
Definition: IO.h:313
static std::unique_ptr< Outputs > Create()
Create function for factory.
Definition: IO.h:665
virtual std::unique_ptr< Outputs > Clone() const =0
Abstract clone method to clone into a pointer.
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:149
static std::unique_ptr< Inputs > Create()
Create function for factory.
Definition: IO.h:299
std::unique_ptr< Inputs > Clone() const override
Clone method to clone into a pointer.
Definition: IO.h:204
ScopeNumber< uint32_t > channels
number of channels to acquire
Definition: IO.h:31
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:378
ScopeNumber< uint8_t > BitshiftA2Ch2
Number of bits to shift U32 right before casting to U16 (area 2 channel 2)
Definition: IO.h:375
int32_t ScannerDelaySamples(const bool &_respectoversampling) const
Definition: IO.cpp:655
ScopeNumber< DaqTiming > daq_timing
where to get the sampling clock from? Onboard, from external reference clock, or from external source...
Definition: IO.h:717
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:347
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:570
double MinimumPixeltime() const override
Definition: IO.cpp:224
ScopeValue< DaqTiming > pixel_timing
where to get the pixel sampling clock from? Onboard, from external reference clock, or from external source
Definition: IO.h:614
static std::unique_ptr< Inputs > Create()
Create function for factory.
Definition: IO.h:417
In here all declarations for all kinds of datatypes Scope needs.
ScopeValue< DaqTiming > daq_timing
where to get the sampling clock from? Onboard, from external reference clock, or from external source...
Definition: IO.h:76
std::unique_ptr< Inputs > Clone() const override
Clone method to clone into a pointer.
Definition: IO.h:254
static std::unique_ptr< Inputs > Create()
Create function for factory.
Definition: IO.h:467
static std::unique_ptr< Inputs > Factory(const InputsType &_type)
Factory method to generate parameter sets for different scan types and put them into a ScannerVectorF...
Definition: IO.cpp:38
static std::unique_ptr< Inputs > Create()
Create function for factory.
Definition: IO.h:252
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:166
ScopeString channelsstring
the four analog output channels to use for x, y, z, Pockels
Definition: IO.h:708
ScopeNumber< double > pixel_referenceclockrate
rate in Hertz of the reference clock for pixel clock.
Definition: IO.h:632
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:514
Daq & operator=(const Daq &_daq)
Supply assignment operator because of the unique_ptrs to base class.
Definition: IO.cpp:633
static std::unique_ptr< Outputs > Create()
Create function for factory.
Definition: IO.h:705
double CoercedPixeltime(const double &_pixeltime) const override
Definition: IO.cpp:92
std::unique_ptr< Inputs > Clone() const override
Clone method to clone into a pointer.
Definition: IO.h:333
ScopeString channelsstring
the four analog output channels to use for x, y, z, Pockels
Definition: IO.h:564
virtual double MinimumPixeltime() const
Definition: IO.h:43
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:381
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:299
ScopeNumber< bool > Acquiring
and the Acquiring indicator
Definition: IO.h:221
ScopeString line_referenceclocksource
source terminal of the reference clock for line sampling clock
Definition: IO.h:628
const bool isslave
true if belongs to a slave area
Definition: IO.h:761
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:389
std::unique_ptr< Outputs > Clone() const override
Abstract clone method to clone into a pointer.
Definition: IO.h:702
ScopeNumber< bool > Acquiring
and the Acquiring indicator
Definition: IO.h:387
ScopeString exportpixelclockterminal
terminal to which the pixel/sampleclock is exported
Definition: IO.h:583
Parameters for pixel acquisition using the NI FlexRIO 5771 IO adapter module (high-speed 8-bit digiti...
Definition: IO.h:293
double MinimumPixeltime() const override
Definition: IO.cpp:133
Diagnosis diagnosis
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:238
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:241
ScopeNumber< bool > Acquiring
and the Acquiring indicator
Definition: IO.h:487
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:148
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:582
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:353
double MinimumPixeltime() const override
Definition: IO.cpp:260
virtual double MinimumPixeltime() const
Definition: IO.h:544
Parameters for pixel acquisition FPGAAnalogIntegrator.
Definition: IO.h:411
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:280
Parameters for pixel acquisition with NI-DAQmx.
Definition: IO.h:58
ScopeString externalclocksource
source terminal of an external clock
Definition: IO.h:86
std::unique_ptr< Inputs > inputs
the input parameters
Definition: IO.h:764
A templated class for a thread-safe value, with signals to GUI or other stuff that are called on valu...
Definition: ScopeValue.h:11
double MinimumPixeltime() const override
Definition: IO.cpp:157
ScopeNumber< uint32_t > averages
number of images to average
Definition: IO.h:785
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:287
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:676
ScopeNumber< bool > countmode
Type of photon counting.
Definition: IO.h:207
std::unique_ptr< Inputs > Clone() const override
Clone method to clone into a pointer.
Definition: IO.h:419
double CoercedPixeltime(const double &_pixeltime) const override
Definition: IO.cpp:268
Parameters for pixel acquisition using the NI FlexRIO 5751 IO adapter module (14-bit digitizer) ...
Definition: IO.h:325
A templated class for a thread-safe std::wstring, with signals that are called on value changes...
Definition: ScopeString.h:8
ScopeNumber< double > line_referenceclockrate
rate in Hertz of the reference clock for line clock.
Definition: IO.h:636
std::unique_ptr< Inputs > Clone() const override
Clone method to clone into a pointer.
Definition: IO.h:363
ScopeNumber< double > range
Output range of the DAC to use for all outputs.
Definition: IO.h:526
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:337
ScopeString yzout
Analog output channel for y-scanner and fast z device (clocked by line clock)
Definition: IO.h:611
ScopeValue< DaqTiming > timing
where to get the sampling clock from? Onboard, from external reference clock, or from external source...
Definition: IO.h:671
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:190
Diagnosis diagnosis
Some diagnosis parameters, more useful for FPGAs ...
Definition: IO.h:105
ScopeNumber< double > minimumpixeltime
Minimum sample time for 4 channel output.
Definition: IO.h:570
Daq(const bool &_isslave)
Constructor.
Definition: IO.cpp:599
ScopeString pixel_externalclocksource
source terminal of an external clock for x and p pixel clock
Definition: IO.h:639
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:28
double CoercedPixeltime(const double &_pixeltime) const override
Definition: IO.cpp:137
ScopeNumber< bool > Acquiring
and the Acquiring indicator
Definition: IO.h:437
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:594
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:145
double MaximumPixeltime() const override
Definition: IO.cpp:264
ScopeNumber< uint8_t > BitshiftCh1
Number of bits to shift U32 right before casting to U16 (channel 1)
Definition: IO.h:472
Parameters for pixel acquisition FPGAResonanceScanner.
Definition: IO.h:461
ScopeString switchresonanceline
digital output line turning the resonance scanner on and off
Definition: IO.h:773
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:315
std::unique_ptr< Inputs > Clone() const override
Clone method to clone into a pointer.
Definition: IO.h:469
std::unique_ptr< Inputs > Clone() const override
Clone method to clone into a pointer.
Definition: IO.h:145
ScopeNumber< uint8_t > BaselineCh1
Baseline U8 value to set zero in channel 1 (NI5771 reads ~ -1..+1V as unsigned 8 bit number...
Definition: IO.h:304
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:125
double MinimumPixeltime() const override
Definition: IO.cpp:522
ScopeNumber< double > AcquisitionClockRate
Frequency in Hz of the clock used in the FPGA VI for the acquisition.
Definition: IO.h:342
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:448
Parameters for fastz/Pockels signal generation with NI-DAQmx where zp are driven by a pixel clock fro...
Definition: IO.h:656
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:437
Diagnosis diagnosis
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:169
Diagnosis diagnosis
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:453
Various helper functions and classes for Scope.
ScopeNumber< double > maxoutputpockels
maximum output voltage for scaling of the pockels signal
Definition: IO.h:538
Parameters for pixel acquisition with NI-FPGA.
Definition: IO.h:117
Diagnosis diagnosis
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:503
ScopeNumber< uint8_t > CutoffCh1
Cutoff U8 value to set zero in channel 1 (NI5771 reads ~ -1..+1V as unsigned 8 bit number...
Definition: IO.h:310
ScopeNumber< bool > Acquiring
and the Acquiring indicator
Definition: IO.h:269
Parameters for signal generation for y scanner and digital zoom with NI-DAQmx when the x scanner is a...
Definition: IO.h:696
static std::unique_ptr< Outputs > Factory(const OutputsType &_type)
Factory method to generate parameter sets for different scan types and put them into a ScannerVectorF...
Definition: IO.cpp:393
ScopeString line_externalclocksource
source terminal of an external clock for y and z line clock
Definition: IO.h:642
Parameters for x/y-scanner/fast z/Pockels signal generation with NI-DAQmx where xp are driven by a pi...
Definition: IO.h:596
ScopeString zpout
Analog output channel for fast z and Pockels cell (clocked by a pixel clock)
Definition: IO.h:668
Diagnosis diagnosis
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:403
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:249
ScopeString referenceclocksource
source terminal of the reference clock for the sampling clock
Definition: IO.h:677
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:307
std::unique_ptr< Outputs > Clone() const override
Abstract clone method to clone into a pointer.
Definition: IO.h:662
ScopeNumber< uint8_t > BitshiftA1Ch1
Number of bits to shift U32 right before casting to U16 (area 1 channel 1)
Definition: IO.h:366
ScopeNumber< double > scannerdelay
compensate, by waiting, the time that scanners lag behind the command voltage, in microseconds ...
Definition: IO.h:782
std::unique_ptr< Inputs > Clone() const override
Clone method to clone into a pointer.
Definition: IO.h:301
ScopeString xpout
Analog output channel for x-scanner and Pockels cell (clocked by pixel clock)
Definition: IO.h:608
Parameters for pixel acquisition using the NI FlexRIO 6587 IO adapter module (high-speed LVDS digital...
Definition: IO.h:173
virtual std::unique_ptr< Inputs > Clone() const =0
Clone method to clone into a pointer.
ScopeNumber< double > minoutputscanner
minimum output voltage for scaling of the scanner signal
Definition: IO.h:529
Keeps the LEDs/ScopeNumber for FPGA diagnosis together.
Definition: IO.h:428
void Load(const wptree &pt) override
load parameters from a boost::property_tree
Definition: IO.cpp:101
ScopeNumber< bool > AIOverRange
indicator if input is over the ADC range
Definition: IO.h:490
ScopeNumber< double > maxoutputscanner
maximum output voltage for scaling of the scanner signal
Definition: IO.h:532
void Save(wptree &pt) const override
save parameters into a boost:property_tree
Definition: IO.cpp:171
static std::unique_ptr< Inputs > Create()
Create function for factory.
Definition: IO.h:123
void SetReadOnlyWhileScanning(const RunState &_runstate) override
set values that must not be changed to read-only during scanning.
Definition: IO.cpp:195
void CoercePixeltime()
Coerces pixeltime to a value that both inputs and outputs support.
Definition: IO.cpp:719