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

Internal class providing methods for reading and writing individual fields within the EEPROM. More...

#include <ParseData.h>

Static Public Member Functions

static bool toBool (const std::vector< uint8_t > &buf, int index=0)
 
static uint8_t toUInt8 (const std::vector< uint8_t > &buf, int index=0)
 
static int16_t toInt16 (const std::vector< uint8_t > &buf, int index=0, bool bigEndian=false)
 assumes little endian
 
static uint16_t toUInt16 (const std::vector< uint8_t > &buf, int index=0, bool bigEndian=false)
 assumes little endian
 
static uint32_t toUInt24 (const std::vector< uint8_t > &buf, int index=0, bool bigEndian=false)
 integration time is a 24-bit value
 
static int32_t toInt32 (const std::vector< uint8_t > &buf, int index=0, bool bigEndian=false)
 assumes little endian
 
static uint32_t toUInt32 (const std::vector< uint8_t > &buf, int index=0, bool bigEndian=false)
 assumes little endian
 
static uint64_t toUInt40 (const std::vector< uint8_t > &buf, int index=0, bool bigEndian=false)
 used for laser modulation
 
static float toFloat (const std::vector< uint8_t > &buf, int index=0)
 
static std::string toString (const std::vector< uint8_t > &buf, int index=0, int len=0)
 
static bool writeBool (bool value, std::vector< uint8_t > &buf, int index)
 
static bool writeUInt8 (uint8_t value, std::vector< uint8_t > &buf, int index)
 
static bool writeUInt16 (uint16_t value, std::vector< uint8_t > &buf, int index)
 
static bool writeInt16 (int16_t value, std::vector< uint8_t > &buf, int index)
 
static bool writeUInt32 (uint32_t value, std::vector< uint8_t > &buf, int index)
 
static bool writeInt32 (int32_t value, std::vector< uint8_t > &buf, int index)
 
static bool writeFloat (float value, std::vector< uint8_t > &buf, int index)
 
static bool writeString (const std::string &value, std::vector< uint8_t > &buf, int index, int maxLen)
 null-pad any remaining space within "maxLen" which is not covered by "value", up to the limit of the buffer
 

Detailed Description

Internal class providing methods for reading and writing individual fields within the EEPROM.


It is used by EEPROM.parse() and EEPROM.write() (generally with non-zero values for index). However, this class is also used to demarsharl little-endian gettors from WasatchVCPP::Spectrometer.

Note
all serialized data is presumed little-endian unless specified otherwise

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