AP&C API Reference
Classes | Public Types | Public Member Functions | Static Public Member Functions | Properties | List of all members
Apac.Dallas.OneWire.OneWireDevice26 Class Reference

The 1-Wire adapter for the iButtonLink MS-TH (multisensor, temperature + humidity). See: http://www.homechip.com/catalog/documents/iButtonLink/MultiSensor_Manual_V051010.pdf http://www.datanab.com/docs/sensors/1WTH_SMnt_RJ45_CommDetails.pdf More...

Inheritance diagram for Apac.Dallas.OneWire.OneWireDevice26:
Apac.Dallas.OneWire.OneWireDevice

Classes

class  RelativeHumidity
 
class  TempCalculatorC
 
class  TempCalculatorF
 

Public Types

enum class  ProbeType { WS_TH , TH_MINIPROBE }
 

Public Member Functions

 OneWireDevice26 (int port, byte[] serialNumBuffer, owApi.FamilyCodes fc)
 Initializes a new instance of the OneWireDevice26 class. More...
 
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. More...
 
override byte[] Read ()
 Reads this sensor's value. More...
 
void PushConfiguration ()
 Ensures the status/configuration register in page 0 is set properly for the device. More...
 
- Public Member Functions inherited from Apac.Dallas.OneWire.OneWireDevice
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 Public Member Functions

static decimal DecodeTemperatureC (OneWireDevice26 owd, byte[] data)
 Converts the raw data to a temperature in degrees celsius. More...
 
static decimal DecodeTemperatureF (OneWireDevice26 owd, byte[] data)
 Converts the raw data to a temperature in degrees fahrenheit. More...
 
static decimal DecodeRelativeHumidity (OneWireDevice26 owd, byte[] data, bool compensateForTemp)
 Converts the raw data to a relative humidity, and compensates for temperature if required. More...
 
- Static Public Member Functions inherited from Apac.Dallas.OneWire.OneWireDevice
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)
 

Properties

override ushort InputResolutionBits [get, set]
 Gets or sets the input resolution bits. More...
 
override bool IsFunctionalSensor [get]
 Gets a value indicating whether this instance is functional sensor. More...
 
- Properties inherited from Apac.Dallas.OneWire.OneWireDevice
abstract ushort InputResolutionBits [get, set]
 Gets the input resolution bits. More...
 
abstract bool IsFunctionalSensor [get]
 Gets a value indicating whether this instance is functional sensor. More...
 
byte[] Buffer [get, protected set]
 Gets the last buffer of raw data retrieved from the device using Read. More...
 
ulong SerialNumber [get]
 Gets the unique 1-Wire identifier for this device. More...
 
byte[] RawSerialNumber [get]
 Gets the unique 1-Wire identifier for this device in binary format. More...
 
string Identifier [get]
 The SerialNumber as a hex string. More...
 
owApi.FamilyCodes FamilyCode [get]
 Gets the family code that is decoded from the SerialNumber . More...
 
string FamilyDescription [get, protected set]
 Gets a description that goes with FamilyCode . More...
 
string[] PartIds [get, protected set]
 Gets the list of part identifiers that apply to this family of devices. More...
 
int Port [get, set]
 Gets or sets the number for the port used to communicate with this device. More...
 
OneWireDeviceConfig Config [get]
 Gets or sets (protected) the configuration for this OneWireDevice. More...
 
log4net.ILog Log [get]
 Gets the log. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Apac.Dallas.OneWire.OneWireDevice
 OneWireDevice (int port, byte[] serialNumberBuf, owApi.FamilyCodes fc)
 Creates a new 1-Wire device instance and associates it to the port. More...
 

Detailed Description

The 1-Wire adapter for the iButtonLink MS-TH (multisensor, temperature + humidity). See: http://www.homechip.com/catalog/documents/iButtonLink/MultiSensor_Manual_V051010.pdf http://www.datanab.com/docs/sensors/1WTH_SMnt_RJ45_CommDetails.pdf

Constructor & Destructor Documentation

◆ OneWireDevice26()

Apac.Dallas.OneWire.OneWireDevice26.OneWireDevice26 ( int  port,
byte[]  serialNumBuffer,
owApi.FamilyCodes  fc 
)
inline

Initializes a new instance of the OneWireDevice26 class.

Parameters
portThe port.
serialNumBufferThe serial num buffer.
fcThe fc.

Member Function Documentation

◆ DecodeRelativeHumidity()

static decimal Apac.Dallas.OneWire.OneWireDevice26.DecodeRelativeHumidity ( OneWireDevice26  owd,
byte[]  data,
bool  compensateForTemp 
)
inlinestatic

Converts the raw data to a relative humidity, and compensates for temperature if required.

Parameters
dataThe raw data from the DS2438.
compensateForTemp
Returns

◆ DecodeTemperatureC()

static decimal Apac.Dallas.OneWire.OneWireDevice26.DecodeTemperatureC ( OneWireDevice26  owd,
byte[]  data 
)
inlinestatic

Converts the raw data to a temperature in degrees celsius.

Parameters
dataThe raw data from the DS2438.
Returns
Returns a temperature reading in degrees celsius.

◆ DecodeTemperatureF()

static decimal Apac.Dallas.OneWire.OneWireDevice26.DecodeTemperatureF ( OneWireDevice26  owd,
byte[]  data 
)
inlinestatic

Converts the raw data to a temperature in degrees fahrenheit.

Parameters
dataThe raw data from the DS2438
Returns
Returns a temperature reading in degrees fahrenheit.

◆ Initialize()

override void Apac.Dallas.OneWire.OneWireDevice26.Initialize ( OneWire.Configuration.OneWireDeviceConfig  config)
inline

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.

◆ PushConfiguration()

void Apac.Dallas.OneWire.OneWireDevice26.PushConfiguration ( )
inline

Ensures the status/configuration register in page 0 is set properly for the device.

◆ Read()

override byte [] Apac.Dallas.OneWire.OneWireDevice26.Read ( )
inlinevirtual

Reads this sensor's value.

Returns
Returns the byte[] with the data from the device.

Implements Apac.Dallas.OneWire.OneWireDevice.

Property Documentation

◆ InputResolutionBits

override ushort Apac.Dallas.OneWire.OneWireDevice26.InputResolutionBits
getset

Gets or sets the input resolution bits.

The input resolution bits.

◆ IsFunctionalSensor

override bool Apac.Dallas.OneWire.OneWireDevice26.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: