Scope
FPGAResonanceScanner.h
1 #pragma once
2 
3 #include "FPGAInterface.h"
4 #include "FPGAIO5751.h"
5 #include "NiFpga_ResonanceScanner.h"
6 
7 // Forward declaration
8 namespace scope {
9  class DaqChunk;
10  namespace parameters {
11  class InputsFPGAResonanceScanner;
12  }
13 }
14 
15 namespace scope {
16 
20  public FPGAInterface,
21  public FPGAIO5751 {
22 
23 protected:
26 
28  std::array<NiFpga_ResonanceScanner_TargetToHostFifoU32, 2> fifos;
29 
30 public:
33 
36 
37  void Initialize(parameters::InputsFPGA* _parameters) override;
38  double SetPixeltime(const uint32_t& _area, const double& _pixeltime) override;
39  double SetLinetime(const uint32_t& _area, const double& _linetime) override;
40  void SetTriggering(const bool& _waitfortrigger) override;
41  void SetContinuousAcquisition(const bool& _cont) override;
42  void SetRequestedPixels(const uint32_t& _area, const uint32_t& _reqpixels) override;
43  void StartAcquisition() override;
44  void StopAcquisition() override;
45  void SetScannerdelay(const uint32_t& _scannerdelay) override;
46 
47  int32_t ReadPixels(DaqChunk& _chunk, const double& _timeout, bool& _timedout) override;
48 
50  void SetChannelProps();
51 
53  void CheckFPGADiagnosis();
54 
56  void ClearFIFOs();
57 };
58 
59 }
parameters::InputsFPGAResonanceScanner * parameters
the parameter set
Abstract base class for FPGA classes.
Definition: FPGAInterface.h:18
void StartAcquisition() override
Starts the acquisition on the FPGA.
void SetContinuousAcquisition(const bool &_cont) override
Sets if the FPGA should acquire data continuously or acquire the number of pixels per channel set wit...
void StopAcquisition() override
Stops the acquisition on the FPGA.
void CheckFPGADiagnosis()
Checks the status of the FIFOs on the FPGA.
void SetRequestedPixels(const uint32_t &_area, const uint32_t &_reqpixels) override
Sets the number of pixels per channel the FPGA should acquire, set to -1 for live scanning...
Wraps an FPGA that does analog pixel integration (with the NI 5751 FlexRIO adapter module http://sine...
Handels the NI FlexRIO adapter module IO-5751.
Definition: FPGAIO5751.h:11
A DaqChunk contains data from all channels sequentially.
Definition: DaqChunk.h:9
~FPGAResonanceScanner()
Close FPGA session.
int32_t ReadPixels(DaqChunk &_chunk, const double &_timeout, bool &_timedout) override
Read only pixels from the FPGA FIFO.
FPGAResonanceScanner()
Load the FPGA bitfile, set the IO module's onboard clock and initialize the acquisition.
void Initialize(parameters::InputsFPGA *_parameters) override
Set initial parameters.
void SetScannerdelay(const uint32_t &_scannerdelay) override
Sets the scanner delay on the FPGA (used currently for resonance scanners only)
void SetChannelProps()
Set channel properties as baseline and bitshift.
void SetTriggering(const bool &_waitfortrigger) override
Sets if the FPGA should wait for a trigger before starting acquisition.
double SetLinetime(const uint32_t &_area, const double &_linetime) override
Sets the time per line (in seconds) for the generation of the line clock (if implemented) ...
Parameters for pixel acquisition FPGAResonanceScanner.
Definition: IO.h:461
void ClearFIFOs()
Clears the interloop and ToHost FIFOs.
Parameters for pixel acquisition with NI-FPGA.
Definition: IO.h:117
std::array< NiFpga_ResonanceScanner_TargetToHostFifoU32, 2 > fifos
both fifos for both channels
double SetPixeltime(const uint32_t &_area, const double &_pixeltime) override
Sets the time per pixel/dwell time (in seconds)