Scope
scope::FPGANoiseOutput Class Reference

#include <FPGANoiseOutput.h>

Inherits scope::FPGAInterface.

Public Member Functions

 FPGANoiseOutput ()
 
 ~FPGANoiseOutput ()
 
void Initialize (parameters::InputsFPGA *_parameters) override
 
double SetPixeltime (const uint32_t &_area, const double &_pixeltime) override
 
double SetLinetime (const uint32_t &_area, const double &_linetime) override
 
void SetTriggering (const bool &_waitfortrigger) override
 
void SetContinuousAcquisition (const bool &_cont) override
 
void SetRequestedPixels (const uint32_t &_area, const uint32_t &_reqpixels) override
 
void StartAcquisition () override
 
void StopAcquisition () override
 
int32_t ReadPixels (DaqChunk &_chunk, const double &_timeout, bool &_timedout) override
 
void CheckFPGADiagnosis ()
 
void ClearFIFOs ()
 
- Public Member Functions inherited from scope::FPGAInterface
virtual ~FPGAInterface ()
 
virtual void SetScannerdelay (const uint32_t &_scannerdelay)
 
FPGAStatusSafe CurrentStatus () const
 

Protected Attributes

parameters::InputsFPGANoiseOutputparameters
 
std::array< NiFpga_NoiseOutput_PXIe7962R_TargetToHostFifoU16, 4 > fifos
 
std::array< NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2 > reqpixels
 
std::array< NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2 > smplsperpixel
 
std::array< NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2 > smplsperline
 
- Protected Attributes inherited from scope::FPGAInterface
FPGAStatusSafe status
 
NiFpga_Session session
 
bool initialized
 

Detailed Description

FPGA class for vi that generates random pixel data.

Definition at line 17 of file FPGANoiseOutput.h.

Constructor & Destructor Documentation

scope::FPGANoiseOutput::FPGANoiseOutput ( )

Load the FPGA bitfile, reset, set the IO module's onboard clock and initialize the acquisition.

Definition at line 8 of file FPGANoiseOutput.cpp.

scope::FPGANoiseOutput::~FPGANoiseOutput ( )

Close FPGA session.

Definition at line 42 of file FPGANoiseOutput.cpp.

Member Function Documentation

void scope::FPGANoiseOutput::Initialize ( parameters::InputsFPGA _parameters)
overridevirtual

Set initial parameters.

Derived classes override this and cast _parameters to the appropriate derived type. Derived functions should check if already initialized.

Reimplemented from scope::FPGAInterface.

Definition at line 48 of file FPGANoiseOutput.cpp.

double scope::FPGANoiseOutput::SetPixeltime ( const uint32_t &  _area,
const double &  _pixeltime 
)
overridevirtual

Sets the time per pixel/dwell time (in seconds)

Parameters
[in]_areafor which area
[in]_pixeltimethe pixel dwell time in seconds
Returns
the actual pixel dwell time, can be different than requested due to finite clock rate

Reimplemented from scope::FPGAInterface.

Definition at line 55 of file FPGANoiseOutput.cpp.

double scope::FPGANoiseOutput::SetLinetime ( const uint32_t &  _area,
const double &  _linetime 
)
overridevirtual

Sets the time per line (in seconds) for the generation of the line clock (if implemented)

Parameters
[in]_areafor which area
[in]_linetimethe line time in seconds
Returns
the actual line time, can be different than requested due to finite clock rate

Reimplemented from scope::FPGAInterface.

Definition at line 65 of file FPGANoiseOutput.cpp.

void scope::FPGANoiseOutput::SetTriggering ( const bool &  _waitfortrigger)
overridevirtual

Sets if the FPGA should wait for a trigger before starting acquisition.

Parameters
[in]_waitfortriggertrue if wait for trigger

Reimplemented from scope::FPGAInterface.

Definition at line 75 of file FPGANoiseOutput.cpp.

void scope::FPGANoiseOutput::SetContinuousAcquisition ( const bool &  _cont)
overridevirtual

Sets if the FPGA should acquire data continuously or acquire the number of pixels per channel set with SetRequestedPixels.

Parameters
[in]_contyes or no

Reimplemented from scope::FPGAInterface.

Definition at line 79 of file FPGANoiseOutput.cpp.

void scope::FPGANoiseOutput::SetRequestedPixels ( const uint32_t &  _area,
const uint32_t &  _reqpixels 
)
overridevirtual

Sets the number of pixels per channel the FPGA should acquire, set to -1 for live scanning.

Parameters
[in]_areafor which area
[in]_reqpixelsnumber of pixels the FPGA should acquire before automatically stopping acquisition

Reimplemented from scope::FPGAInterface.

Definition at line 83 of file FPGANoiseOutput.cpp.

void scope::FPGANoiseOutput::StartAcquisition ( )
overridevirtual

Starts the acquisition on the FPGA.

Reimplemented from scope::FPGAInterface.

Definition at line 87 of file FPGANoiseOutput.cpp.

void scope::FPGANoiseOutput::StopAcquisition ( )
overridevirtual

Stops the acquisition on the FPGA.

Reimplemented from scope::FPGAInterface.

Definition at line 126 of file FPGANoiseOutput.cpp.

int32_t scope::FPGANoiseOutput::ReadPixels ( DaqChunk _chunk,
const double &  _timeout,
bool &  _timedout 
)
overridevirtual

Read only pixels from the FPGA FIFO.

Parameters
[in,out]_chunkthe daq chunk to read into, inside _chunk is information about the area for wich to retrieve, the number of pixels per channel to read, and the number of channels
[in]_timeouttime out for reading in seconds
[out]_timedoutset to true if reading timed out
Returns
number of read pixels per channel or -1 on error
Precondition
_channels > 0 && _channels <= 2

Implements scope::FPGAInterface.

Definition at line 92 of file FPGANoiseOutput.cpp.

void scope::FPGANoiseOutput::CheckFPGADiagnosis ( )

Checks the status of the FIFOs on the FPGA.

Definition at line 130 of file FPGANoiseOutput.cpp.

void scope::FPGANoiseOutput::ClearFIFOs ( )

Clears the interloop and ToHost FIFOs.

Definition at line 144 of file FPGANoiseOutput.cpp.

Member Data Documentation

parameters::InputsFPGANoiseOutput* scope::FPGANoiseOutput::parameters
protected

the parameter set

Definition at line 22 of file FPGANoiseOutput.h.

std::array<NiFpga_NoiseOutput_PXIe7962R_TargetToHostFifoU16, 4> scope::FPGANoiseOutput::fifos
protected

both fifos for both channels and areas

Definition at line 25 of file FPGANoiseOutput.h.

std::array<NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2> scope::FPGANoiseOutput::reqpixels
protected

requested pixels for both areas

Definition at line 28 of file FPGANoiseOutput.h.

std::array<NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2> scope::FPGANoiseOutput::smplsperpixel
protected

samples per pixel for both areas

Definition at line 31 of file FPGANoiseOutput.h.

std::array<NiFpga_NoiseOutput_PXIe7962R_ControlU32, 2> scope::FPGANoiseOutput::smplsperline
protected

samples per line for both areas

Definition at line 34 of file FPGANoiseOutput.h.


The documentation for this class was generated from the following files: