Table of Contents

Class Ina219.Sim

Namespace
Pamoja.Sensors
Assembly
Pamoja.Sensors.dll

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

uint

MaxMicroamps

The largest current Part(byte) is sized for, in microamps.

public const uint MaxMicroamps = 3200000

Field Value

uint

Microamps

The current Part(byte) reports, in microamps.

public const int Microamps = 500000

Field Value

int

ShuntMilliohms

The shunt Part(byte) sits across, in milliohms.

public const uint ShuntMilliohms = 100

Field Value

uint

Methods

Part(byte)

Makes a part carrying Microamps at BusMillivolts.

public static WordPart Part(byte address)

Parameters

address byte

The 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

address byte

The address it answers to.

shuntMilliohms uint

The shunt, as the driver is given it.

maxMicroamps uint

The largest current, as the driver is given it.

busMillivolts uint

The bus voltage it reports.

microamps int

The current it reports; negative flows the other way through the shunt.

Returns

WordPart

The part, to put on a simulated bus.