Scope
FPGAResonanceScanner_NI5771.h
1 #pragma once
2 
3 #include "FPGAInterface.h"
4 #include "FPGAIO5771.h"
5 #include "NiFpga_AnalogIntegrator_NI5771_Resonance.h"
6 
7 // Forward declaration
8 namespace scope {
9  namespace parameters {
10  class InputsFPGAAnalogIntegrator;
11  }
12 }
13 
14 namespace scope {
15 
19  public FPGAInterface,
20  public FPGAIO5771 {
21 
22 protected:
25 
27  std::array<NiFpga_AnalogIntegrator_NI5771_Resonance_TargetToHostFifoU32, 2> fifos;
28 
29 public:
32 
35 
36  void Initialize(parameters::InputsFPGA* _parameters) override;
37  double SetPixeltime(const uint32_t& _area, const double& _pixeltime) override;
38  double SetLinetime(const uint32_t& _area, const double& _linetime) override;
39  void SetTriggering(const bool& _waitfortrigger) override;
40  void SetContinuousAcquisition(const bool& _cont) override;
41  void SetRequestedPixels(const uint32_t& _area, const uint32_t& _reqpixels) override;
42  void StartAcquisition() override;
43  void StopAcquisition() override;
44 
45  int32_t ReadPixels(DaqChunk& _chunk, const double& _timeout, bool& _timedout) override;
46 
48  void SetChannelProps();
49 
51  void CheckFPGADiagnosis();
52 
54  void ClearFIFOs();
55 };
56 
57 }
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...
Abstract base class for FPGA classes.
Definition: FPGAInterface.h:18
void StartAcquisition() override
Starts the acquisition on the FPGA.
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) ...
void SetTriggering(const bool &_waitfortrigger) override
Sets if the FPGA should wait for a trigger before starting acquisition.
Handels the NI FlexRIO adapter module IO-5771.
Definition: FPGAIO5771.h:11
A DaqChunk contains data from all channels sequentially.
Definition: DaqChunk.h:9
double SetPixeltime(const uint32_t &_area, const double &_pixeltime) override
Sets the time per pixel/dwell time (in seconds)
void SetChannelProps()
Set channel properties as baseline and bitshift.
Wraps an FPGA that does analog pixel integration (with the NI 5771 FlexRIO adapter module http://sine...
std::array< NiFpga_AnalogIntegrator_NI5771_Resonance_TargetToHostFifoU32, 2 > fifos
both fifos for both channels
FPGAResonanceScannerNI5771()
Load the FPGA bitfile, set the IO module's onboard clock and initialize the acquisition.
void StopAcquisition() override
Stops the acquisition on the FPGA.
Parameters for pixel acquisition FPGAAnalogIntegrator.
Definition: IO.h:411
parameters::InputsFPGAAnalogIntegrator * parameters
the parameter set
int32_t ReadPixels(DaqChunk &_chunk, const double &_timeout, bool &_timedout) override
Read only pixels from the FPGA FIFO.
Parameters for pixel acquisition with NI-FPGA.
Definition: IO.h:117
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 ClearFIFOs()
Clears the interloop and ToHost FIFOs.
void CheckFPGADiagnosis()
Checks the status of the FIFOs on the FPGA.
void Initialize(parameters::InputsFPGA *_parameters) override
Set initial parameters.