iCub-main
Loading...
Searching...
No Matches
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 class  DiscreteGain {
  val256 = 0 ,
  val128 = 1 ,
  val96 = 2 ,
  val64 = 3 ,
  val48 = 4 ,
  val36 = 5 ,
  val24 = 6 ,
  val20 = 7 ,
  val16 = 8 ,
  val10 = 9 ,
  val08 = 10 ,
  val06 = 11 ,
  val04 = 12 ,
  none = 32 ,
  maxnumberof = 13
}
 

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
val256 
val128 
val96 
val64 
val48 
val36 
val24 
val20 
val16 
val10 
val08 
val06 
val04 
none 
maxnumberof 

Definition at line 128 of file strain.h.

Function Documentation

◆ convert() [1/3]

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

Definition at line 673 of file strain.cpp.

◆ convert() [2/3]

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

Definition at line 683 of file strain.cpp.

◆ convert() [3/3]

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

Definition at line 702 of file strain.cpp.

◆ exampleofuse()

void strain::amplifier::exampleofuse ( void  )

Definition at line 987 of file strain.cpp.

◆ testIT()

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

Definition at line 906 of file strain.cpp.

Variable Documentation

◆ mapofgains

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

Definition at line 668 of file strain.cpp.

◆ maximumOffset

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

Definition at line 141 of file strain.h.

◆ midrangeOffset

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

Definition at line 140 of file strain.h.

◆ minimumOffset

const Offset strain::amplifier::minimumOffset = 0

Definition at line 139 of file strain.h.