Class Opt3001.Sim
An OPT3001 that is not there, for a bus with nothing plugged in.
public static class Opt3001.Sim
- Inheritance
-
Opt3001.Sim
- Inherited Members
Remarks
Its configuration register keeps the flags the part sets for itself whatever a driver writes, with the conversion-ready flag set, so every conversion reads as finished.
Fields
Lux
The illuminance Part(byte) reports.
public const float Lux = 380
Field Value
Methods
Part(byte)
Makes a part reading Lux.
public static WordPart Part(byte address)
Parameters
addressbyteThe address it answers to.
Returns
- WordPart
The part, to put on a simulated bus.
Reporting(byte, float)
Makes a part that reads what it is asked to.
public static WordPart Reporting(byte address, float lux)
Parameters
addressbyteThe address it answers to.
luxfloatThe illuminance it reports, which lands on the nearest step its exponent and mantissa represent.
Returns
- WordPart
The part, to put on a simulated bus.