HALDLS
haldls::vx::INA219Status Class Reference

#include <i2c.h>

Classes

struct  BusVoltage
 Bus voltage with linear conversion and LSB = 4mV. More...
 
struct  ShuntVoltage
 Shunt voltage with linear conversion and LSB = 10uV. More...
 
struct  UncalibratedPower
 Uncalibrated power [W]. More...
 

Public Types

typedef halco::hicann_dls::vx::INA219StatusOnBoard coordinate_type
 
typedef std::true_type is_leaf_node
 

Public Member Functions

 INA219Status () SYMBOL_VISIBLE
 Default constructor. More...
 
void decode (std::array< fisch::vx::word_access_type::I2CINA219RoRegister, read_config_size_in_words > const &data) SYMBOL_VISIBLE
 
std::array< fisch::vx::word_access_type::I2CINA219RoRegister, write_config_size_in_wordsencode () const SYMBOL_VISIBLE
 
BusVoltage get_bus_voltage () const SYMBOL_VISIBLE
 Get bus voltage value. More...
 
bool get_bus_voltage_overflow () const SYMBOL_VISIBLE
 Get bus voltage overflow value. More...
 
ShuntVoltage get_shunt_voltage () const SYMBOL_VISIBLE
 Get shunt voltage value. More...
 
bool operator!= (INA219Status const &other) const SYMBOL_VISIBLE
 
bool operator== (INA219Status const &other) const SYMBOL_VISIBLE
 
void set_bus_voltage (BusVoltage value) SYMBOL_VISIBLE
 Set bus voltage value. More...
 
void set_bus_voltage_overflow (bool value) SYMBOL_VISIBLE
 Set bus voltage overflow value. More...
 
void set_shunt_voltage (ShuntVoltage value) SYMBOL_VISIBLE
 Set shunt voltage value. More...
 
UncalibratedPower toUncalibratedPower () const SYMBOL_VISIBLE
 Convert bus and shunt voltage to uncalibrated power value. More...
 

Static Public Member Functions

static std::array< halco::hicann_dls::vx::I2CINA219RoRegisterOnBoard, read_config_size_in_wordsread_addresses (coordinate_type const &coord) SYMBOL_VISIBLE
 
static std::array< halco::hicann_dls::vx::I2CINA219RoRegisterOnBoard, write_config_size_in_wordswrite_addresses (coordinate_type const &coord) SYMBOL_VISIBLE
 

Static Public Attributes

static constexpr size_t read_config_size_in_words = 2
 
constexpr static auto unsupported_read_targets
 
static constexpr size_t write_config_size_in_words = 0
 

Friends

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

Detailed Description

Definition at line 120 of file i2c.h.

Member Typedef Documentation

◆ coordinate_type

typedef halco::hicann_dls::vx::INA219StatusOnBoard haldls::vx::INA219Status::coordinate_type

Definition at line 123 of file i2c.h.

◆ is_leaf_node

Definition at line 124 of file i2c.h.

Constructor & Destructor Documentation

◆ INA219Status()

haldls::vx::INA219Status::INA219Status ( )

Default constructor.

Member Function Documentation

◆ decode()

void haldls::vx::INA219Status::decode ( std::array< fisch::vx::word_access_type::I2CINA219RoRegister, read_config_size_in_words > const &  data)

◆ encode()

std::array<fisch::vx::word_access_type::I2CINA219RoRegister, write_config_size_in_words> haldls::vx::INA219Status::encode ( ) const

◆ get_bus_voltage()

BusVoltage haldls::vx::INA219Status::get_bus_voltage ( ) const

Get bus voltage value.

Returns
Value

◆ get_bus_voltage_overflow()

bool haldls::vx::INA219Status::get_bus_voltage_overflow ( ) const

Get bus voltage overflow value.

Returns
Value

◆ get_shunt_voltage()

ShuntVoltage haldls::vx::INA219Status::get_shunt_voltage ( ) const

Get shunt voltage value.

Returns
Value

◆ operator!=()

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

◆ operator==()

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

◆ read_addresses()

static std::array<halco::hicann_dls::vx::I2CINA219RoRegisterOnBoard, read_config_size_in_words> haldls::vx::INA219Status::read_addresses ( coordinate_type const &  coord)
static

◆ set_bus_voltage()

void haldls::vx::INA219Status::set_bus_voltage ( BusVoltage  value)

Set bus voltage value.

Parameters
valueValue

◆ set_bus_voltage_overflow()

void haldls::vx::INA219Status::set_bus_voltage_overflow ( bool  value)

Set bus voltage overflow value.

Parameters
valueValue

◆ set_shunt_voltage()

void haldls::vx::INA219Status::set_shunt_voltage ( ShuntVoltage  value)

Set shunt voltage value.

Parameters
valueValue

◆ toUncalibratedPower()

UncalibratedPower haldls::vx::INA219Status::toUncalibratedPower ( ) const

Convert bus and shunt voltage to uncalibrated power value.

The voltages are assumed to be correct, the shunt resistance defaults to the expected value of 0.027 Ohm.

◆ write_addresses()

static std::array<halco::hicann_dls::vx::I2CINA219RoRegisterOnBoard, write_config_size_in_words> haldls::vx::INA219Status::write_addresses ( coordinate_type const &  coord)
static

Friends And Related Function Documentation

◆ cereal::access

friend class cereal::access
friend

Definition at line 258 of file i2c.h.

◆ operator<<

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

Member Data Documentation

◆ read_config_size_in_words

constexpr size_t haldls::vx::INA219Status::read_config_size_in_words = 2
staticconstexpr

Definition at line 246 of file i2c.h.

◆ unsupported_read_targets

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

Definition at line 125 of file i2c.h.

◆ write_config_size_in_words

constexpr size_t haldls::vx::INA219Status::write_config_size_in_words = 0
staticconstexpr

Definition at line 245 of file i2c.h.


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