faa.misc.oneWire
Class oneWireDev

java.lang.Object
  extended by faa.misc.oneWire.oneWireDev
Direct Known Subclasses:
thermoDev

public class oneWireDev
extends java.lang.Object

oneWireDev represents a Dallas Semiconductor One-Wire Device such as the DS1820 thermometer. Source: oneWireDev.java

Version:
$Id: oneWireDev.java,v 3.1 2006/03/14 15:47:35 samf Exp $
Author:
David Lonkart
See Also:
oneWireDev

Field Summary
protected  oneWireBus bus
          The bus to which this device is connected.
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
private  java.lang.String description
          The description of this device
private  int device_type
          The type of this instance
static int DS1820
          The DS1820 One-Wire Thermometer
protected  byte[] ROM_code
          The entire ROM Code for this device [8-bit CRC][48-bit serial no.][8-bit family code]
static int UNKNOWN
          The DS1820 One-Wire Thermometer
 
Constructor Summary
oneWireDev(byte[] ROMcode, oneWireBus bus)
          Construct a new oneWireDev object.
 
Method Summary
 byte getCRC()
          Get the CRC of the ROM Code for this device
 java.lang.String getDescription()
          Get the description of this device
 byte getFamilyCode()
          Get the family code for this device
 byte[] getROMCode()
          Get the ROM Code for this device
 byte[] getSerialNumber()
          Get the serial number for this device
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CVS_VERSION_ID

public static final java.lang.String CVS_VERSION_ID
The CVS Version ID

See Also:
Constant Field Values

DS1820

public static final int DS1820
The DS1820 One-Wire Thermometer

See Also:
Constant Field Values

UNKNOWN

public static final int UNKNOWN
The DS1820 One-Wire Thermometer

See Also:
Constant Field Values

device_type

private int device_type
The type of this instance


ROM_code

protected byte[] ROM_code
The entire ROM Code for this device [8-bit CRC][48-bit serial no.][8-bit family code]


description

private java.lang.String description
The description of this device


bus

protected oneWireBus bus
The bus to which this device is connected.

Constructor Detail

oneWireDev

public oneWireDev(byte[] ROMcode,
                  oneWireBus bus)
Construct a new oneWireDev object.

Parameters:
ROMcode - 8 element byte array of the unique ROM code.
bus - The one-wire bus where the device is located.
Method Detail

getROMCode

public byte[] getROMCode()
Get the ROM Code for this device

Returns:
The 8 byte ROM Code

getCRC

public byte getCRC()
Get the CRC of the ROM Code for this device

Returns:
The 8 bit CRC of the ROM Code

getFamilyCode

public byte getFamilyCode()
Get the family code for this device

Returns:
The 8 bit family code from the ROM Code

getSerialNumber

public byte[] getSerialNumber()
Get the serial number for this device

Returns:
The 6 byte serial number from the ROM Code

getDescription

public java.lang.String getDescription()
Get the description of this device

Returns:
Description of this device.