2 #include "InputsFPGA.h"
3 #include "fpga\FPGAPhotonCounter.h"
4 #include "fpga\FPGADigitalDemultiplexer.h"
5 #include "fpga\FPGAResonanceScanner_NI5771.h"
6 #include "fpga\FPGAAnalogIntegrator.h"
7 #include "fpga\FPGAResonanceScanner.h"
8 #include "fpga\FPGAAnalogDemultiplexer.h"
9 #include "fpga\FPGANoiseOutput.h"
10 #include "ScopeDefines.h"
13 #include "parameters\IO.h"
14 #include "parameters\Scope.h"
15 #include "helpers\DaqChunk.h"
16 #include "helpers\ScopeException.h"
20 SCOPE_FPGA_T& theFPGA() {
21 static SCOPE_FPGA_T staticFPGA;
27 , laserpulsesperpixel(1000.0) {
30 theFPGA().Initialize(_inputparams);
32 uint32_t samplesperchan = 0;
34 samplesperchan = _params.
areas[
area]->Currentframe().TotalPixels() + _inputparams->
preframelines() * _params.
areas[
area]->Currentframe().XTotalPixels();
36 samplesperchan *= _params.
areas[
area]->daq.requested_frames() * _params.
areas[ThisAreaOrMasterArea(
area)]->daq.averages();
39 DBOUT(L
"Requested pixeltime area " <<
area << L
": " << _params.
areas[
area]->daq.pixeltime());
40 pt = theFPGA().SetPixeltime(
area, _params.
areas[
area]->daq.pixeltime());
41 DBOUT(L
"Real pixeltime area " <<
area << L
": " << pt);
46 DBOUT(L
"Requested pixels " << samplesperchan);
47 theFPGA().SetRequestedPixels(
area, samplesperchan);
51 theFPGA().SetContinuousAcquisition(
true);
53 theFPGA().SetContinuousAcquisition(
false);
63 theFPGA().SetScannerdelay(_params.
areas[
area]->daq.ScannerDelaySamples(
false));
69 InputsFPGA::~InputsFPGA(
void) {
75 theFPGA().StartAcquisition();
81 theFPGA().StopAcquisition();
88 read = theFPGA().ReadPixels(_chunk, _timeout, _timedout);
90 DBOUT(L
"InputsFPGA::Read area " <<
area << L
" timed out");
92 DBOUT(L
"InputsFPGA::Read area " <<
area << L
" read " << read);
93 theFPGA().CheckFPGADiagnosis();
The master parameters class.
std::array< std::unique_ptr< Area >, SCOPE_NAREAS > areas
holds AreaParameters for all areas.
Timeseries timeseries
the TimeseriesParameters
A DaqChunk contains data from all channels sequentially.
This is the include file for standard system include files, or project specific include files that ar...
ScopeValue< DaqMode > requested_mode
requested acquisition mode (see DaqModeHelper)
ScopeNumber< bool > triggered
the current/first repeat is triggered on triggerchannel
In here all declarations for all kinds of datatypes Scope needs.
#define DBOUT(s)
A debug output to the debug console.
void ScopeExceptionHandler(const std::string &_origin, const bool &_log, const bool &_showmessagebox, const bool &_trace, const bool &_rethrow)
Handles all exceptions and does nice logging.
Various helper functions and classes for Scope.