The 1-Wire adapter for the DS18B20 programmable, and software compatible, temperature sensors.
More...
|
| OneWireDevice28 (int port, byte[] serialNumBuffer, owApi.FamilyCodes fc) |
|
override byte[] | Read () |
| Reads this sensor's value. More...
|
|
void | PushScratchpad () |
| Commits scratchpad data to EEPROM on the sensor. More...
|
|
void | PushResolution () |
|
override void | Initialize (OneWire.Configuration.OneWireDeviceConfig config) |
| Lets individual sensor implementations do routines to put the sensor in its expected state, such as setting the number of bits to resolve temperature readings. For this device, we first recall EEPROM contents to the scratchpad, then read the scratchpad contents, determine if they match our configuration, and then, if necessary, change the scratchpad and copy the scratchpad to EEPROM. More...
|
|
abstract void | Initialize (OneWire.Configuration.OneWireDeviceConfig config) |
| Lets individual sensor implementations do routines to put the sensor in its expected state, such as setting the number of bits to resolve temperature readings. Some (many?) sensors will create a no-op method for this message. More...
|
|
override string | ToString () |
|
|
static decimal | DecodeReadingC (byte[] data) |
| Converts the raw data to a temperature in degrees celsius. More...
|
|
static decimal | DecodeReadingF (byte[] data) |
| Converts the raw data to a temperature in degrees fahrenheit. More...
|
|
static ushort | DecodeResolutionBits (byte data) |
|
static OneWireDevice | Create (int port, OneWireDeviceConfig config) |
| Factory method for getting specific 1-Wire device implementations that encapsulate their own communications routines by device type, by using configuration object. More...
|
|
static OneWireDevice | Create (int port, byte[] serialNum) |
| Factory method for getting specific 1-Wire device implementations that encapsulate their own communications routines by device type. More...
|
|
static OneWireDevice | Create (int port, ulong serialNum) |
|
static ulong | DecodeSn (byte[] sn) |
|
static string | GetIdentifier (ulong sn) |
|
|
| OneWireDevice (int port, byte[] serialNumberBuf, owApi.FamilyCodes fc) |
| Creates a new 1-Wire device instance and associates it to the port. More...
|
|
The 1-Wire adapter for the DS18B20 programmable, and software compatible, temperature sensors.
Interfaces with devices:
◆ DecodeReadingC()
static decimal Apac.Dallas.OneWire.OneWireDevice28.DecodeReadingC |
( |
byte[] |
data | ) |
|
|
inlinestatic |
Converts the raw data to a temperature in degrees celsius.
- Parameters
-
data | The raw data from the DS18B20 |
- Returns
- Returns a temperature reading in degrees celsius.
In this routine we receive the whole payload from the bus read, but we only care about bytes indexed at 1 and 2. Index 1 is the least significant byte, and index 2 is the most significant byte.
◆ DecodeReadingF()
static decimal Apac.Dallas.OneWire.OneWireDevice28.DecodeReadingF |
( |
byte[] |
data | ) |
|
|
inlinestatic |
Converts the raw data to a temperature in degrees fahrenheit.
- Parameters
-
data | The raw data from the DS18B20 |
- Returns
- Returns a temperature reading in degrees fahrenheit.
◆ Initialize()
Lets individual sensor implementations do routines to put the sensor in its expected state, such as setting the number of bits to resolve temperature readings. For this device, we first recall EEPROM contents to the scratchpad, then read the scratchpad contents, determine if they match our configuration, and then, if necessary, change the scratchpad and copy the scratchpad to EEPROM.
◆ PushScratchpad()
void Apac.Dallas.OneWire.OneWireDevice28.PushScratchpad |
( |
| ) |
|
|
inline |
Commits scratchpad data to EEPROM on the sensor.
◆ Read()
override byte [] Apac.Dallas.OneWire.OneWireDevice28.Read |
( |
| ) |
|
|
inlinevirtual |
◆ InputResolutionBits
override ushort Apac.Dallas.OneWire.OneWireDevice28.InputResolutionBits |
|
getset |
Gets or sets the input resolution bits.
The input resolution bits.
◆ IsFunctionalSensor
override bool Apac.Dallas.OneWire.OneWireDevice28.IsFunctionalSensor |
|
get |
Gets a value indicating whether this instance is functional sensor.
Always returns true
for this type of sensor.
The documentation for this class was generated from the following file:
- /var/lib/jenkins/workspace/apac/APAC/Apac.Dallas.OneWire/OneWireDevice28.cs