Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
strain.h File Reference
#include <cmath>
#include <cstdint>
#include <cstring>
#include <string>
#include <vector>
+ Include dependency graph for strain.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  strain::dsp::q15::matrix
struct  strain::amplifier::DiscreteParams
struct  strain::amplifier::WideParams
class  strain::amplifier::IFregs
class  strain::amplifier::PGA308
class  strain::amplifier::PGA308::Registers
struct  strain::regulation::Analog1
struct  strain::regulation::Analog
struct  strain::regulation::Digital
struct  strain::regulation::Set1
struct  strain::regulation::Set
struct  strain::regulation::FullRegulation1
struct  strain::regulation::FullRegulation




using strain::dsp::FSC = std::uint16_t
using strain::dsp::Q15 = std::int16_t
using strain::dsp::Q15result = std::int32_t
using strain::amplifier::Gain = float
using strain::amplifier::Offset = std::uint16_t


enum  strain::Board {
  strain::Board::strain1 = 1,
  strain::Board::strain2 = 2
enum  strain::amplifier::DiscreteGain {
  strain::amplifier::DiscreteGain::val256 = 0,
  strain::amplifier::DiscreteGain::val128 = 1,
  strain::amplifier::DiscreteGain::val96 = 2,
  strain::amplifier::DiscreteGain::val64 = 3,
  strain::amplifier::DiscreteGain::val48 = 4,
  strain::amplifier::DiscreteGain::val36 = 5,
  strain::amplifier::DiscreteGain::val24 = 6,
  strain::amplifier::DiscreteGain::val20 = 7,
  strain::amplifier::DiscreteGain::val16 = 8,
  strain::amplifier::DiscreteGain::val10 = 9,
  strain::amplifier::DiscreteGain::val08 = 10,
  strain::amplifier::DiscreteGain::val06 = 11,
  strain::amplifier::DiscreteGain::val04 = 12,
  strain::amplifier::DiscreteGain::none = 32,
  strain::amplifier::DiscreteGain::maxnumberof = 13
enum  strain::regulation::Version {
  strain::regulation::Version::two = 2,
  strain::regulation::Version::three = 3,
  strain::regulation::Version::four = 4


FSC strain::dsp::fsc::convert (const double v, bool &saturated)
double strain::dsp::fsc::convert (const FSC v)
bool strain::dsp::fsc::convert (const std::vector< double > &in, std::vector< FSC > &out)
bool strain::dsp::fsc::convert (const std::vector< FSC > &in, std::vector< double > &out)
Q15 strain::dsp::q15::convert (const double v, bool &saturated)
double strain::dsp::q15::convert (const Q15 v)
bool strain::dsp::q15::convert (const std::vector< double > &in, std::vector< Q15 > &out)
bool strain::dsp::q15::convert (const std::vector< Q15 > &in, std::vector< double > &out)
Q15 strain::dsp::q15::U16toQ15 (const std::uint16_t valU16)
std::uint16_t strain::dsp::q15::Q15toU16 (const Q15 valQ15)
Q15 strain::dsp::q15::opposite (const Q15 v)
Q15 strain::dsp::q15::saturate (const Q15result x, bool &saturated)
Q15 strain::dsp::q15::add (const Q15 a, const Q15 b)
Q15 strain::dsp::q15::add (const Q15 a, const Q15 b, bool &saturated)
Q15 strain::dsp::q15::sub (const Q15 a, const Q15 b)
Q15 strain::dsp::q15::mul (const Q15 a, const Q15 b)
Q15 strain::dsp::q15::mul (const Q15 a, const Q15 b, bool &saturated)
Q15 strain::dsp::q15::div (const Q15 a, const Q15 b, bool &saturated)
bool strain::dsp::q15::multiply (const matrix &m1, const matrix &m2, matrix &res, bool &saturated)
bool strain::dsp::q15::add (const matrix &m1, const matrix &m2, matrix &res, bool &saturated)
Gain strain::amplifier::convert (const DiscreteGain dg)
bool strain::amplifier::convert (const Gain g, DiscreteGain &dg)
bool strain::amplifier::convert (const WideParams &wp, DiscreteParams &dp)
void strain::amplifier::testIT (std::string &output)
bool strain::regulation::read (const std::string fname, FullRegulation &reg)
bool strain::regulation::write (const std::string filename, const FullRegulation &reg)
bool strain::regulation::apply (cDownloader *down, const FullRegulation &reg)


const std::uint8_t strain::numberofchannels = 6
const FSC strain::dsp::fsc::max = 64*1024-1
const FSC strain::dsp::fsc::min = 0
const Q15 strain::dsp::q15::negOne = 0x8000
const Q15 strain::dsp::q15::negOneNearly = 0x8001
const Q15 strain::dsp::q15::negOneHalf = 0xC000
const Q15 strain::dsp::q15::negOneFourth = 0xE000
const Q15 strain::dsp::q15::negOneEigth = 0xF000
const Q15 strain::dsp::q15::negEPSILON = 0xFFFF
const Q15 strain::dsp::q15::zero = 0
const Q15 strain::dsp::q15::posEPSILON = 0x0001
const Q15 strain::dsp::q15::posOneHalf = 0x4000
const Q15 strain::dsp::q15::posOneFourth = 0x2000
const Q15 strain::dsp::q15::posOneEigth = 0x4000
const Q15 strain::dsp::q15::posOneNearly = 0x7FFF
const Offset strain::amplifier::minimumOffset = 0
const Offset strain::amplifier::midrangeOffset = 32*1024-1
const Offset strain::amplifier::maximumOffset = 64*1024-1
const std::uint8_t strain::regulation::maxSets = 3