Scope
FPGAAnalogDemultiplexerResonance.h
1 #pragma once
2 
3 #include "FPGAInterface.h"
4 #include "FPGAIO5771.h"
5 #include "NiFpga_AnalogDemultiplexer_NI5771_Resonance.h"
6 
7 // Forward declaration
8 namespace scope {
9  namespace parameters {
10  class InputsFPGAAnalogDemultiplexer;
11  }
12 }
13 
14 namespace scope {
15 
19  public FPGAInterface,
20  public FPGAIO5771 {
21 
22 protected:
25 
27  std::array<NiFpga_AnalogDemultiplexer_NI5771_Resonance_TargetToHostFifoU64, 2> fifos;
28 
30  std::array<NiFpga_AnalogDemultiplexer_NI5771_Resonance_ControlU32, 2> reqpixels;
31 
33  NiFpga_AnalogDemultiplexer_NI5771_Resonance_ControlU16 smplsperpixel;
34 
35 public:
38 
41 
42  void Initialize(parameters::InputsFPGA* _parameters) override;
43  double SetPixeltime(const uint32_t& _area, const double& _pixeltime) override;
44  double SetLinetime(const uint32_t& _area, const double& _linetime) override;
45  void SetTriggering(const bool& _waitfortrigger) override;
46  void SetContinuousAcquisition(const bool& _cont) override;
47  void SetRequestedPixels(const uint32_t& _area, const uint32_t& _reqpixels) override;
48  void StartAcquisition() override;
49  void StopAcquisition() override;
50 
51  int32_t ReadPixels(DaqChunk& _chunk, const double& _timeout, bool& _timedout) override;
52 
54  void CheckFPGADiagnosis();
55 
57  void SetChannelProps();
58 
60  void ClearFIFOs();
61 };
62 
63 }
NiFpga_AnalogDemultiplexer_NI5771_Resonance_ControlU16 smplsperpixel
samples per pixel for both areas
void SetTriggering(const bool &_waitfortrigger) override
Sets if the FPGA should wait for a trigger before starting acquisition.
Abstract base class for FPGA classes.
Definition: FPGAInterface.h:18
std::array< NiFpga_AnalogDemultiplexer_NI5771_Resonance_TargetToHostFifoU64, 2 > fifos
all FIFOs for both areas
int32_t ReadPixels(DaqChunk &_chunk, const double &_timeout, bool &_timedout) override
Read only pixels from the FPGA FIFO.
void SetContinuousAcquisition(const bool &_cont) override
Sets if the FPGA should acquire data continuously or acquire the number of pixels per channel set wit...
Parameters for pixel acquisition FPGAAnalogDemultiplexer.
Definition: IO.h:355
Wraps an FPGA that does two area demultiplexing and analog integration with the NI 5771 FlexRio adapt...
double SetPixeltime(const uint32_t &_area, const double &_pixeltime) override
Sets the time per pixel/dwell time (in seconds)
Handels the NI FlexRIO adapter module IO-5771.
Definition: FPGAIO5771.h:11
A DaqChunk contains data from all channels sequentially.
Definition: DaqChunk.h:9
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...
void StartAcquisition() override
Starts the acquisition on the FPGA.
void CheckFPGADiagnosis()
Checks the status of the FIFOs on the FPGA.
void StopAcquisition() override
Stops the acquisition on the FPGA.
parameters::InputsFPGAAnalogDemultiplexer * parameters
the parameter set
std::array< NiFpga_AnalogDemultiplexer_NI5771_Resonance_ControlU32, 2 > reqpixels
requested pixels for both areas
void ClearFIFOs()
Clears the interloop and ToHost FIFOs.
Parameters for pixel acquisition with NI-FPGA.
Definition: IO.h:117
FPGAAnalogDemultiplexerResonance()
Load the FPGA bitfile, set the IO module's onboard clock and initialize the acquisition.
void SetChannelProps()
Set channel properties as baseline cutoff and bitshift.
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 Initialize(parameters::InputsFPGA *_parameters) override
Set initial parameters.