Class Ina219.Sim
An INA219 that is not there, for a bus with nothing plugged in.
public static class Ina219.Sim
- Inheritance
-
Ina219.Sim
- Inherited Members
Remarks
A monitor's current and power registers count in steps the calibration sets, so Reporting(byte, uint, uint, uint, int) takes the same shunt and largest current a driver is given, and Part(byte) is the common breakout carrying 500 mA at 12 V through the 100 milliohm shunt a driver starts with.
Fields
BusMillivolts
The bus voltage Part(byte) reports, in millivolts.
public const uint BusMillivolts = 12000
Field Value
MaxMicroamps
The largest current Part(byte) is sized for, in microamps.
public const uint MaxMicroamps = 3200000
Field Value
Microamps
The current Part(byte) reports, in microamps.
public const int Microamps = 500000
Field Value
ShuntMilliohms
The shunt Part(byte) sits across, in milliohms.
public const uint ShuntMilliohms = 100
Field Value
Methods
Part(byte)
Makes a part carrying Microamps at BusMillivolts.
public static WordPart Part(byte address)
Parameters
addressbyteThe address it answers to.
Returns
- WordPart
The part, to put on a simulated bus.
Reporting(byte, uint, uint, uint, int)
Makes a part that reads what it is asked to.
public static WordPart Reporting(byte address, uint shuntMilliohms, uint maxMicroamps, uint busMillivolts, int microamps)
Parameters
addressbyteThe address it answers to.
shuntMilliohmsuintThe shunt, as the driver is given it.
maxMicroampsuintThe largest current, as the driver is given it.
busMillivoltsuintThe bus voltage it reports.
microampsintThe current it reports; negative flows the other way through the shunt.
Returns
- WordPart
The part, to put on a simulated bus.