HALDLS
haldls::vx::INA219Config Class Reference

#include <i2c.h>

Public Types

enum class  ADCMode {
  bits9 = 0 , bits10 = 1 , bits11 = 2 , bits12 = 3 ,
  bits12_samples1 = 4 , bits12_samples2 = 5 , bits12_samples4 = 6 , bits12_samples8 = 7 ,
  bits12_samples16 = 8 , bits12_samples32 = 9 , bits12_samples64 = 10 , bits12_samples128 = 11
}
 ADC resolution and number of samples. More...
 
typedef halco::hicann_dls::vx::INA219ConfigOnBoard coordinate_type
 
typedef std::true_type is_leaf_node
 

Public Member Functions

 INA219Config () SYMBOL_VISIBLE
 Default constructor. More...
 
void decode (std::array< fisch::vx::word_access_type::I2CINA219RwRegister, config_size_in_words > const &data) SYMBOL_VISIBLE
 
std::array< fisch::vx::word_access_type::I2CINA219RwRegister, config_size_in_wordsencode () const SYMBOL_VISIBLE
 
ADCMode get_bus_adc_mode () const SYMBOL_VISIBLE
 Get bus ADC mode value. More...
 
ADCMode get_shunt_adc_mode () const SYMBOL_VISIBLE
 Get shunt ADC mode value. More...
 
bool operator!= (INA219Config const &other) const SYMBOL_VISIBLE
 
bool operator== (INA219Config const &other) const SYMBOL_VISIBLE
 
void set_bus_adc_mode (ADCMode value) SYMBOL_VISIBLE
 Set bus ADC mode value. More...
 
void set_shunt_adc_mode (ADCMode value) SYMBOL_VISIBLE
 Set shunt ADC mode value. More...
 

Static Public Member Functions

static std::array< halco::hicann_dls::vx::I2CINA219RwRegisterOnBoard, config_size_in_wordsaddresses (coordinate_type const &coord) SYMBOL_VISIBLE
 

Static Public Attributes

static constexpr size_t config_size_in_words = 1
 
constexpr static auto unsupported_read_targets
 

Friends

class cereal::access
 
std::ostream & operator<< (std::ostream &os, INA219Config const &config) SYMBOL_VISIBLE
 

Detailed Description

Definition at line 26 of file i2c.h.

Member Typedef Documentation

◆ coordinate_type

typedef halco::hicann_dls::vx::INA219ConfigOnBoard haldls::vx::INA219Config::coordinate_type

Definition at line 29 of file i2c.h.

◆ is_leaf_node

Definition at line 30 of file i2c.h.

Member Enumeration Documentation

◆ ADCMode

ADC resolution and number of samples.

Enumerator
bits9 
bits10 
bits11 
bits12 
bits12_samples1 
bits12_samples2 
bits12_samples4 
bits12_samples8 
bits12_samples16 
bits12_samples32 
bits12_samples64 
bits12_samples128 

Definition at line 35 of file i2c.h.

Constructor & Destructor Documentation

◆ INA219Config()

haldls::vx::INA219Config::INA219Config ( )

Default constructor.

Member Function Documentation

◆ addresses()

static std::array<halco::hicann_dls::vx::I2CINA219RwRegisterOnBoard, config_size_in_words> haldls::vx::INA219Config::addresses ( coordinate_type const &  coord)
static

◆ decode()

void haldls::vx::INA219Config::decode ( std::array< fisch::vx::word_access_type::I2CINA219RwRegister, config_size_in_words > const &  data)

◆ encode()

std::array<fisch::vx::word_access_type::I2CINA219RwRegister, config_size_in_words> haldls::vx::INA219Config::encode ( ) const

◆ get_bus_adc_mode()

ADCMode haldls::vx::INA219Config::get_bus_adc_mode ( ) const

Get bus ADC mode value.

Returns
Value

◆ get_shunt_adc_mode()

ADCMode haldls::vx::INA219Config::get_shunt_adc_mode ( ) const

Get shunt ADC mode value.

Returns
Value

◆ operator!=()

bool haldls::vx::INA219Config::operator!= ( INA219Config const &  other) const

◆ operator==()

bool haldls::vx::INA219Config::operator== ( INA219Config const &  other) const

◆ set_bus_adc_mode()

void haldls::vx::INA219Config::set_bus_adc_mode ( ADCMode  value)

Set bus ADC mode value.

Parameters
valueValue

◆ set_shunt_adc_mode()

void haldls::vx::INA219Config::set_shunt_adc_mode ( ADCMode  value)

Set shunt ADC mode value.

Parameters
valueValue

Friends And Related Function Documentation

◆ cereal::access

friend class cereal::access
friend

Definition at line 98 of file i2c.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
INA219Config const &  config 
)
friend

Member Data Documentation

◆ config_size_in_words

constexpr size_t haldls::vx::INA219Config::config_size_in_words = 1
staticconstexpr

Definition at line 88 of file i2c.h.

◆ unsupported_read_targets

constexpr static auto haldls::vx::INA219Config::unsupported_read_targets
staticconstexpr
Initial value:
= {
hxcomm::vx::Target::simulation}

Definition at line 31 of file i2c.h.


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