Class Scd4x.Sim
An SCD4x that is not there, for a bus with nothing plugged in.
public static class Scd4x.Sim
- Inheritance
-
Scd4x.Sim
- Inherited Members
Remarks
It answers the serial number, data-ready, and measurement commands, each word with its checksum, and always has a result waiting; starting, stopping, and the settings commands answer with nothing, as the real part's do.
Fields
Celsius
The temperature Part() reports.
public const float Celsius = 22.5
Field Value
Co2Ppm
The carbon dioxide Part() reports, in parts per million.
public const ushort Co2Ppm = 800
Field Value
RelativeHumidity
The relative humidity Part() reports, as a percentage.
public const float RelativeHumidity = 45
Field Value
Serial
The serial number every simulated part reports.
public const ulong Serial = 99286962285375
Field Value
Methods
Part()
Makes a part reading Co2Ppm, Celsius, and RelativeHumidity.
public static CommandPart Part()
Returns
- CommandPart
The part, to put on a simulated bus.
Reporting(ushort, float, float)
Makes a part that reads what it is asked to.
public static CommandPart Reporting(ushort co2Ppm, float celsius, float relativeHumidity)
Parameters
co2PpmushortThe carbon dioxide it reports, in parts per million.
celsiusfloatThe temperature it reports.
relativeHumidityfloatThe humidity it reports, as a percentage.
Returns
- CommandPart
The part, to put on a simulated bus.