Class Ina226.Sim
An INA226 that is not there, for a bus with nothing plugged in.
public static class Ina226.Sim
- Inheritance
-
Ina226.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. The part carries TI's manufacturer id and the INA226 die id, and its conversion-ready flag is set, so every conversion reads as finished.
Fields
BusMicrovolts
The bus voltage Part(byte) reports, in microvolts.
public const uint BusMicrovolts = 12000000
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 BusMicrovolts through the shunt a driver starts with.
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 busMicrovolts, 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.
busMicrovoltsuintThe 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.