Scope
FPGANoiseOutput.h
1 #pragma once
2 
3 #include "FPGAInterface.h"
4 #include "NiFpga_NoiseOutput_PXIe7962R.h"
5 
6 // Forward declaration
7 namespace scope {
8  namespace parameters {
9  class InputsFPGANoiseOutput;
10  }
11 }
12 
13 namespace scope {
14 
18  : public FPGAInterface {
19 
20 protected:
23 
25  std::array<NiFpga_NoiseOutput_PXIe7962R_TargetToHostFifoU16, 4> fifos;
26 
28  std::array<NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2> reqpixels;
29 
31  std::array<NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2> smplsperpixel;
32 
34  std::array<NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2> smplsperline;
35 
36 public:
39 
42 
43  void Initialize(parameters::InputsFPGA* _parameters) override;
44  double SetPixeltime(const uint32_t& _area, const double& _pixeltime) override;
45  double SetLinetime(const uint32_t& _area, const double& _linetime) override;
46  void SetTriggering(const bool& _waitfortrigger) override;
47  void SetContinuousAcquisition(const bool& _cont) override;
48  void SetRequestedPixels(const uint32_t& _area, const uint32_t& _reqpixels) override;
49  void StartAcquisition() override;
50  void StopAcquisition() override;
51  int32_t ReadPixels(DaqChunk& _chunk, const double& _timeout, bool& _timedout) override;
52 
54  void CheckFPGADiagnosis();
55 
57  void ClearFIFOs();
58 };
59 
60 }
void StopAcquisition() override
Stops the acquisition on the FPGA.
void ClearFIFOs()
Clears the interloop and ToHost FIFOs.
Abstract base class for FPGA classes.
Definition: FPGAInterface.h:18
FPGA class for vi that generates random pixel data.
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...
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 SetTriggering(const bool &_waitfortrigger) override
Sets if the FPGA should wait for a trigger before starting acquisition.
void CheckFPGADiagnosis()
Checks the status of the FIFOs on the FPGA.
Parameters for the noise generating FPGA vi.
Definition: IO.h:137
void Initialize(parameters::InputsFPGA *_parameters) override
Set initial parameters.
double SetPixeltime(const uint32_t &_area, const double &_pixeltime) override
Sets the time per pixel/dwell time (in seconds)
A DaqChunk contains data from all channels sequentially.
Definition: DaqChunk.h:9
FPGANoiseOutput()
Load the FPGA bitfile, reset, set the IO module's onboard clock and initialize the acquisition...
std::array< NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2 > reqpixels
requested pixels for both areas
std::array< NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2 > smplsperpixel
samples per pixel for both areas
void StartAcquisition() override
Starts the acquisition on the FPGA.
~FPGANoiseOutput()
Close FPGA session.
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) ...
std::array< NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2 > smplsperline
samples per line for both areas
parameters::InputsFPGANoiseOutput * parameters
the parameter set
std::array< NiFpga_NoiseOutput_PXIe7962R_TargetToHostFifoU16, 4 > fifos
both fifos for both channels and areas
Parameters for pixel acquisition with NI-FPGA.
Definition: IO.h:117