16 namespace duds {
namespace hardware {
namespace devices {
namespace instruments {
35 std::unique_ptr<duds::hardware::interface::Smbus>
com;
57 std::unique_ptr<duds::hardware::interface::Smbus> &c,
93 void vals(std::int16_t &sV, std::int16_t &bV) {
101 #endif // #ifndef INA219_HPP A container for a value and a unit to better describe the value.
duds::data::Quantity shuntVoltage() const
Returns the sampled shunt voltage.
duds::data::Quantity busPower() const
Returns the computed bus power using the sampled bus voltage and the computed bus current...
std::unique_ptr< duds::hardware::interface::Smbus > com
Communication bus.
duds::data::Quantity maxCurrent() const
Returns the maximum current that can be measured by the device.
void vals(std::int16_t &sV, std::int16_t &bV)
duds::data::Quantity shuntResistance() const
Returns the shunt resistance.
std::int16_t busV
The raw data for the sampled bus voltage.
std::int16_t shuntV
The raw data for the sampled shunt voltage.
duds::data::Quantity busVoltage() const
Returns the sampled bus voltage.
INA219(std::unique_ptr< duds::hardware::interface::Smbus > &c, double sr)
double shunt
Shunt resistance; used to compute current.
void sample()
Reads sample data from the device.
Preliminary support for TI's INA219 voltage and current sensor.
duds::data::Quantity busCurrent() const
Returns the computed bus current using the sampled shunt voltage and the shunt resistance.