Wasatch.VCPP 1.0.19
Visual C++ driver for Wasatch Photonics spectrometers
Public Member Functions | Public Attributes | List of all members
WasatchVCPP::Proxy::Spectrometer Class Reference

A proxy customer-facing class providing an object-oriented / STL-based interface to command and control an individual Spectrometer. More...

#include <WasatchVCPP.h>

Public Member Functions

 Spectrometer (int specIndex)
 instantiated by WasatchVCPP::Proxy::openAllSpectrometers
 
bool close ()
 release resources associated with this spectrometer More...
 
bool setIntegrationTimeMS (unsigned long ms)
 set integration time More...
 
bool setLaserEnable (bool flag)
 set laser firing state More...
 
bool setDetectorGain (float value)
 
bool setLaserPowerPerc (float value)
 
bool setLaserPowermW (float value)
 
bool setDetectorGainOdd (float value)
 
bool setDetectorOffset (int16_t value)
 
bool setDetectorOffsetOdd (int16_t value)
 
bool setDetectorTECEnable (bool flag)
 
bool setDetectorTECSetpointDegC (int value)
 
bool setHighGainMode (bool flag)
 
float getDetectorTemperatureDegC ()
 
long getIntegrationTimeMS ()
 
bool getLaserEnable ()
 
float getDetectorGain ()
 
float getDetectorGainOdd ()
 
int getDetectorOffset ()
 
int getDetectorOffsetOdd ()
 
bool getDetectorTECEnable ()
 
int getDetectorTECSetpointDegC ()
 
bool getHighGainModeEnable ()
 
int sendControlMsg (uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint8_t *data, int len)
 
int readControlMsg (uint8_t bRequest, uint16_t wIndex, uint8_t *data, int len)
 
bool setMaxTimeoutMS (int maxTimeoutMS)
 
int getMaxTimeoutMS ()
 
bool cancelOperation (bool blocking=false)
 
std::string getFirmwareVersion ()
 
std::string getFPGAVersion ()
 
std::vector< double > getSpectrum ()
 Retrieve one spectrum from the spectrometer. More...
 
std::vector< uint8_t > getEEPROMPage (int page)
 
std::string getEEPROMFieldName (int index)
 
std::vector< float > getWavecalCoeffs ()
 convenience accessor
 

Public Attributes

int specIndex
 index of this spectrometer
 
int pixels
 number of pixels
 
std::string model
 model name
 
std::string serialNumber
 serial number
 
std::map< std::string, std::string > eepromFields
 a dictionary of EEPROM name-value pairs rendered as strings
 
std::vector< double > wavelengths
 expanded wavecal in nm
 
std::vector< double > wavenumbers
 expanded wavecal in 1/cm (Raman-only)
 
float excitationNM
 configured laser excitation wavelength (Raman-only)
 

Detailed Description

A proxy customer-facing class providing an object-oriented / STL-based interface to command and control an individual Spectrometer.

By default, methods returning a boolean report 'true' on success and 'false' on error unless specified otherwise.

Member Function Documentation

◆ cancelOperation()

bool WasatchVCPP::Proxy::Spectrometer::cancelOperation ( bool  blocking = false)
inline

◆ close()

bool WasatchVCPP::Proxy::Spectrometer::close ( )
inline

release resources associated with this spectrometer

Returns
true on success

◆ getDetectorGain()

float WasatchVCPP::Proxy::Spectrometer::getDetectorGain ( )
inline

◆ getDetectorGainOdd()

float WasatchVCPP::Proxy::Spectrometer::getDetectorGainOdd ( )
inline

◆ getDetectorOffset()

int WasatchVCPP::Proxy::Spectrometer::getDetectorOffset ( )
inline

◆ getDetectorOffsetOdd()

int WasatchVCPP::Proxy::Spectrometer::getDetectorOffsetOdd ( )
inline

◆ getDetectorTECEnable()

bool WasatchVCPP::Proxy::Spectrometer::getDetectorTECEnable ( )
inline

◆ getDetectorTECSetpointDegC()

int WasatchVCPP::Proxy::Spectrometer::getDetectorTECSetpointDegC ( )
inline

◆ getDetectorTemperatureDegC()

float WasatchVCPP::Proxy::Spectrometer::getDetectorTemperatureDegC ( )
inline

◆ getEEPROMFieldName()

std::string WasatchVCPP::Proxy::Spectrometer::getEEPROMFieldName ( int  index)
inline

◆ getEEPROMPage()

std::vector< uint8_t > WasatchVCPP::Proxy::Spectrometer::getEEPROMPage ( int  page)
inline

◆ getFirmwareVersion()

std::string WasatchVCPP::Proxy::Spectrometer::getFirmwareVersion ( )
inline

◆ getFPGAVersion()

std::string WasatchVCPP::Proxy::Spectrometer::getFPGAVersion ( )
inline

◆ getHighGainModeEnable()

bool WasatchVCPP::Proxy::Spectrometer::getHighGainModeEnable ( )
inline

◆ getIntegrationTimeMS()

long WasatchVCPP::Proxy::Spectrometer::getIntegrationTimeMS ( )
inline

◆ getLaserEnable()

bool WasatchVCPP::Proxy::Spectrometer::getLaserEnable ( )
inline

◆ getMaxTimeoutMS()

int WasatchVCPP::Proxy::Spectrometer::getMaxTimeoutMS ( )
inline

◆ getSpectrum()

std::vector< double > WasatchVCPP::Proxy::Spectrometer::getSpectrum ( )
inline

Retrieve one spectrum from the spectrometer.

Sends an ACQUIRE command, then enters BLOCKING read on bulk endpoint. Demarshalls retreived little-endian pixel values. Applies minimal post-processing (see WasatchVCPP::Spectrometer::getSpectrum for details).

Returns
spectrum as vector of doubles

◆ readControlMsg()

int WasatchVCPP::Proxy::Spectrometer::readControlMsg ( uint8_t  bRequest,
uint16_t  wIndex,
uint8_t *  data,
int  len 
)
inline
See also
wp_read_control_msg
Warning
no seriously, you need to follow that link

◆ sendControlMsg()

int WasatchVCPP::Proxy::Spectrometer::sendControlMsg ( uint8_t  bRequest,
uint16_t  wValue,
uint16_t  wIndex,
uint8_t *  data,
int  len 
)
inline
See also
wp_send_control_msg
Warning
no seriously, you need to follow that link

◆ setDetectorGain()

bool WasatchVCPP::Proxy::Spectrometer::setDetectorGain ( float  value)
inline

◆ setDetectorGainOdd()

bool WasatchVCPP::Proxy::Spectrometer::setDetectorGainOdd ( float  value)
inline

◆ setDetectorOffset()

bool WasatchVCPP::Proxy::Spectrometer::setDetectorOffset ( int16_t  value)
inline

◆ setDetectorOffsetOdd()

bool WasatchVCPP::Proxy::Spectrometer::setDetectorOffsetOdd ( int16_t  value)
inline

◆ setDetectorTECEnable()

bool WasatchVCPP::Proxy::Spectrometer::setDetectorTECEnable ( bool  flag)
inline

◆ setDetectorTECSetpointDegC()

bool WasatchVCPP::Proxy::Spectrometer::setDetectorTECSetpointDegC ( int  value)
inline

◆ setHighGainMode()

bool WasatchVCPP::Proxy::Spectrometer::setHighGainMode ( bool  flag)
inline

◆ setIntegrationTimeMS()

bool WasatchVCPP::Proxy::Spectrometer::setIntegrationTimeMS ( unsigned long  ms)
inline

set integration time

Parameters
ms(Input) time in milliseconds
Returns
true on success

◆ setLaserEnable()

bool WasatchVCPP::Proxy::Spectrometer::setLaserEnable ( bool  flag)
inline

set laser firing state

Parameters
flag(Input) desired state (true for firing, false for off)
Returns
true on successful communication (does not represent firing state)

◆ setMaxTimeoutMS()

bool WasatchVCPP::Proxy::Spectrometer::setMaxTimeoutMS ( int  maxTimeoutMS)
inline

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