iCub-main
Classes | Typedefs | Enumerations | Functions | Variables
strain::amplifier Namespace Reference

Classes

struct  DiscreteParams
 
struct  Example_strain2_ampl_regs_t
 
class  IFregs
 
class  PGA308
 
struct  WideParams
 

Typedefs

using Gain = float
 
using Offset = std::uint16_t
 

Enumerations

enum  DiscreteGain {
  DiscreteGain::val48 = 0,
  DiscreteGain::val36 = 1,
  DiscreteGain::val24 = 2,
  DiscreteGain::val20 = 3,
  DiscreteGain::val16 = 4,
  DiscreteGain::val10 = 5,
  DiscreteGain::val08 = 6,
  DiscreteGain::val06 = 7,
  DiscreteGain::val04 = 8,
  DiscreteGain::none = 32,
  DiscreteGain::maxnumberof = 9
}
 

Functions

Gain convert (const DiscreteGain dg)
 
bool convert (const Gain g, DiscreteGain &dg)
 
bool convert (const WideParams &wp, DiscreteParams &dp)
 
void testIT (std::string &output)
 
void exampleofuse (void)
 

Variables

static const float mapofgains [static_cast< uint8_t >(DiscreteGain::maxnumberof)]
 
const Offset minimumOffset = 0
 
const Offset midrangeOffset = 32*1024-1
 
const Offset maximumOffset = 64*1024-1
 

Typedef Documentation

◆ Gain

using strain::amplifier::Gain = typedef float

Definition at line 120 of file strain.h.

◆ Offset

using strain::amplifier::Offset = typedef std::uint16_t

Definition at line 121 of file strain.h.

Enumeration Type Documentation

◆ DiscreteGain

Enumerator
val48 
val36 
val24 
val20 
val16 
val10 
val08 
val06 
val04 
none 
maxnumberof 

Definition at line 127 of file strain.h.

Function Documentation

◆ convert() [1/3]

Gain strain::amplifier::convert ( const DiscreteGain  dg)

Definition at line 662 of file strain.cpp.

◆ convert() [2/3]

bool strain::amplifier::convert ( const Gain  g,
DiscreteGain dg 
)

Definition at line 672 of file strain.cpp.

◆ convert() [3/3]

bool strain::amplifier::convert ( const WideParams wp,
DiscreteParams dp 
)

Definition at line 691 of file strain.cpp.

◆ exampleofuse()

void strain::amplifier::exampleofuse ( void  )

Definition at line 976 of file strain.cpp.

◆ testIT()

void strain::amplifier::testIT ( std::string &  output)

Definition at line 895 of file strain.cpp.

Variable Documentation

◆ mapofgains

const float strain::amplifier::mapofgains[static_cast< uint8_t >(DiscreteGain::maxnumberof)]
static
Initial value:
=
{
48, 36, 24, 20, 16, 10, 8, 6, 4
}

Definition at line 657 of file strain.cpp.

◆ maximumOffset

const Offset strain::amplifier::maximumOffset = 64*1024-1

Definition at line 140 of file strain.h.

◆ midrangeOffset

const Offset strain::amplifier::midrangeOffset = 32*1024-1

Definition at line 139 of file strain.h.

◆ minimumOffset

const Offset strain::amplifier::minimumOffset = 0

Definition at line 138 of file strain.h.