Table of Contents

Class Ina226.Sim

Namespace
Pamoja.Sensors
Assembly
Pamoja.Sensors.dll

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

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 BusMicrovolts through the shunt a driver starts with.

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 busMicrovolts, 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.

busMicrovolts 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.