OneWireContainer42 Class Reference

Inherits com::dalsemi::onewire::container::OneWireContainer, com::dalsemi::onewire::container::TemperatureContainer, and com::dalsemi::onewire::container::SwitchContainer.

List of all members.


Detailed Description

1-Wire® container for a 1-Wire programmable resolution digital thermometer with "sequence detect" and PIO, the DS28EA00. This container encapsulates the functionality of the iButton family type 42 (hex)

Features

Usage

See the temperature usage example in TemperatureContainer for temperature specific operations.

See the switch usage example in SwitchContainer for switch specific operations.

DataSheet

http://www.maxim-ic.com/DS28EA00

See also:
com.dalsemi.onewire.container.TemperatureContainer
Version:
1.00, 15 September 2006
Author:
BH

Public Member Functions

 OneWireContainer42 ()
 Creates an empty OneWireContainer42.
 OneWireContainer42 (DSPortAdapter sourceAdapter, byte[] newAddress)
 Creates a OneWireContainer42 with the provided adapter object and the address of this One-Wire device.
 OneWireContainer42 (DSPortAdapter sourceAdapter, long newAddress)
 Creates a OneWireContainer42 with the provided adapter object and the address of this One-Wire device.
 OneWireContainer42 (DSPortAdapter sourceAdapter, String newAddress)
 Creates a OneWireContainer42 with the provided adapter object and the address of this One-Wire device.
Enumeration getMemoryBanks ()
 Gets an enumeration of memory bank instances that implement one or more of the following interfaces: MemoryBank, PagedMemoryBank, and OTPMemoryBank.
String getName ()
 Retrieves the Maxim Integrated Products part number of this OneWireContainer42 as a String.
String getAlternateNames ()
 Retrieves the alternate Maxim Integrated Products part numbers or names.
String getDescription ()
 Retrieves a short description of the function of this device OneWireContainer42 type.
int getMaxSpeed ()
 Returns the maximum speed this iButton or 1-Wire device can communicate at.
boolean hasTemperatureAlarms ()
 Checks to see if this temperature measuring device has high/low trip alarms.
boolean hasSelectableTemperatureResolution ()
 Checks to see if this device has selectable temperature resolution.
double[] getTemperatureResolutions ()
 Gets an array of available temperature resolutions in Celsius.
double getTemperatureAlarmResolution ()
 Gets the temperature alarm resolution in Celsius.
double getMaxTemperature ()
 Gets the maximum temperature in Celsius.
double getMinTemperature ()
 Gets the minimum temperature in Celsius.
void doTemperatureConvert (byte[] state) throws OneWireIOException, OneWireException
 Performs a temperature conversion on state information.
double getTemperature (byte[] state) throws OneWireIOException
 Gets the temperature value in Celsius from the state data retrieved from the readDevice() method.
double getTemperatureAlarm (int alarmType, byte[] state)
 Gets the specified temperature alarm value in Celsius from the state data retrieved from the readDevice() method.
double getTemperatureResolution (byte[] state)
 Gets the current temperature resolution in Celsius from the state data retrieved from the readDevice() method.
void setTemperatureAlarm (int alarmType, double alarmValue, byte[] state) throws OneWireException, OneWireIOException
 Sets the temperature alarm value in Celsius in the provided state data.
void setTemperatureResolution (double resolution, byte[] state) throws OneWireException
 Sets the current temperature resolution in Celsius in the provided state data.
byte[] readDevice () throws OneWireIOException, OneWireException
 Retrieves this OneWireContainer42 state information.
void writeDevice (byte[] state) throws OneWireIOException, OneWireException
 Writes to this OneWireContainer42 state information that have been changed by 'set' methods.
byte[] readScratchpad () throws OneWireIOException, OneWireException
 Reads the Scratchpad of the DS28EA00.
void writeScratchpad (byte[] data) throws OneWireIOException, OneWireException
 Writes to the Scratchpad of the DS28EA00.
void copyScratchpad () throws OneWireIOException, OneWireException
 Copies the Scratchpad to the E-squared memory of the DS28EA00.
byte[] recallE2 () throws OneWireIOException, OneWireException
 Recalls the DS28EA00 temperature trigger values (ALARM_HIGH and ALARM_LOW) and the configuration register to the scratchpad and reads the scratchpad.
boolean isExternalPowerSupplied () throws OneWireIOException, OneWireException
 Reads the way power is supplied to the DS28EA00.
float convertToFahrenheit (float celsiusTemperature)
 Converts a temperature reading from Celsius to Fahrenheit.
int getNumberChannels (byte[] state)
 Gets the number of channels supported by this switch.
boolean isHighSideSwitch ()
 Checks if the channels of this switch are 'high side' switches.
boolean hasActivitySensing ()
 Checks if the channels of this switch support activity sensing.
boolean hasLevelSensing ()
 Checks if the channels of this switch support level sensing.
boolean hasSmartOn ()
 Checks if the channels of this switch support 'smart on'.
boolean onlySingleChannelOn ()
 Checks if the channels of this switch require that only one channel is on at any one time.
boolean getLevel (int channel, byte[] state)
 Checks the sensed level on the indicated channel.
boolean getLatchState (int channel, byte[] state)
 Checks the latch state of the indicated channel.
boolean getSensedActivity (int channel, byte[] state) throws OneWireException
 This method always returns false for the DS28EA00 (no activity sensing).
void clearActivity () throws OneWireException
 This method does nothing for the DS28EA00 (not needed).
void setLatchState (int channel, boolean latchState, boolean doSmart, byte[] state)
 Sets the latch state of the indicated channel.
void setLatchState (byte set, byte[] state)
 Sets the latch state for all of the channels.
byte[] readRegister () throws OneWireIOException, OneWireException
 This method does nothing for the DS28EA00.
void writeRegister (byte[] register) throws OneWireIOException, OneWireException
 This method does nothing for the DS28EA00.

Static Public Attributes

static final byte WRITE_SCRATCHPAD_COMMAND = ( byte ) 0x4E
 DS28EA00 writes data to scratchpad command.
static final byte READ_SCRATCHPAD_COMMAND = ( byte ) 0xBE
 DS28EA00 reads data from scratchpad command.
static final byte COPY_SCRATCHPAD_COMMAND = ( byte ) 0x48
 DS28EA00 copys data from scratchpad to E-squared memory command.
static final byte CONVERT_TEMPERATURE_COMMAND = ( byte ) 0x44
 DS28EA00 converts temperature command.
static final byte RECALL_E2MEMORY_COMMAND = ( byte ) 0xB8
 DS28EA00 recalls E-squared memory command.
static final byte READ_POWER_SUPPLY_COMMAND = ( byte ) 0xB4
 DS28EA00 read power supply command.
static final byte RESOLUTION_12_BIT = ( byte ) 0x7F
 DS28EA00 12-bit resolution constant for CONFIG byte.
static final byte RESOLUTION_11_BIT = ( byte ) 0x5F
 DS28EA00 11-bit resolution constant for CONFIG byte.
static final byte RESOLUTION_10_BIT = ( byte ) 0x3F
 DS28EA00 10-bit resolution constant for CONFIG byte.
static final byte RESOLUTION_9_BIT = ( byte ) 0x1F
 DS28EA00 9-bit resolution constant for CONFIG byte.
static final byte PIO_ACCESS_READ = ( byte ) 0xF5
 PIO Access read command.
static final byte PIO_ACCESS_WRITE = ( byte ) 0xA5
 PIO Access read command.

Constructor & Destructor Documentation

Creates an empty OneWireContainer42.

Must call setupContainer() before using this new container.

This is one of the methods to construct a OneWireContainer42. The others are through creating a OneWireContainer42 with parameters.

See also:
OneWireContainer42(DSPortAdapter,byte[])

OneWireContainer42(DSPortAdapter,long)

OneWireContainer42(DSPortAdapter,String)

OneWireContainer42 ( DSPortAdapter  sourceAdapter,
byte[]  newAddress 
)

Creates a OneWireContainer42 with the provided adapter object and the address of this One-Wire device.

This is one of the methods to construct a OneWireContainer42. The others are through creating a OneWireContainer42 with different parameters types.

Parameters:
sourceAdapter adapter object required to communicate with this One-Wire device
newAddress address of this One-Wire device
See also:
com.dalsemi.onewire.utils.Address

OneWireContainer42()

OneWireContainer42(DSPortAdapter,long)

OneWireContainer42(DSPortAdapter,String)

OneWireContainer42 ( DSPortAdapter  sourceAdapter,
long  newAddress 
)

Creates a OneWireContainer42 with the provided adapter object and the address of this One-Wire device.

This is one of the methods to construct a OneWireContainer42. The others are through creating a OneWireContainer42 with different parameters types.

Parameters:
sourceAdapter adapter object required to communicate with this One-Wire device
newAddress address of this One-Wire device
See also:
com.dalsemi.onewire.utils.Address

OneWireContainer42()

OneWireContainer42(DSPortAdapter,byte[])

OneWireContainer42(DSPortAdapter,String)

OneWireContainer42 ( DSPortAdapter  sourceAdapter,
String  newAddress 
)

Creates a OneWireContainer42 with the provided adapter object and the address of this One-Wire device.

This is one of the methods to construct a OneWireContainer42. The others are through creating a OneWireContainer42 with different parameters types.

Parameters:
sourceAdapter adapter object required to communicate with this One-Wire device
newAddress address of this One-Wire device
See also:
com.dalsemi.onewire.utils.Address

OneWireContainer42()

OneWireContainer42(DSPortAdapter,byte[])

OneWireContainer42(DSPortAdapter,long)


Member Function Documentation

Enumeration getMemoryBanks (  ) 

Gets an enumeration of memory bank instances that implement one or more of the following interfaces: MemoryBank, PagedMemoryBank, and OTPMemoryBank.

Returns:
Enumeration of memory banks

Reimplemented from OneWireContainer.

String getName (  ) 

Retrieves the Maxim Integrated Products part number of this OneWireContainer42 as a String.

For example 'DS28EA00'.

Returns:
this OneWireContainer42 name

Reimplemented from OneWireContainer.

String getAlternateNames (  ) 

Retrieves the alternate Maxim Integrated Products part numbers or names.

A 'family' of 1-Wire Network devices may have more than one part number depending on packaging. There can also be nicknames such as 'Crypto iButton'.

Returns:
this OneWireContainer42 alternate names

Reimplemented from OneWireContainer.

String getDescription (  ) 

Retrieves a short description of the function of this device OneWireContainer42 type.

Returns:
OneWireContainer42 functional description

Reimplemented from OneWireContainer.

int getMaxSpeed (  ) 

Returns the maximum speed this iButton or 1-Wire device can communicate at.

Returns:
maximum speed
See also:
DSPortAdapter.setSpeed

Reimplemented from OneWireContainer.

boolean hasTemperatureAlarms (  ) 

Checks to see if this temperature measuring device has high/low trip alarms.

Returns:
true if this OneWireContainer42 has high/low trip alarms
See also:
getTemperatureAlarm

setTemperatureAlarm

Implements TemperatureContainer.

boolean hasSelectableTemperatureResolution (  ) 

Checks to see if this device has selectable temperature resolution.

Returns:
true if this OneWireContainer42 has selectable temperature resolution
See also:
getTemperatureResolution

getTemperatureResolutions

setTemperatureResolution

Implements TemperatureContainer.

double [] getTemperatureResolutions (  ) 

Gets an array of available temperature resolutions in Celsius.

Returns:
byte array of available temperature resolutions in Celsius for this OneWireContainer42. The minimum resolution is returned as the first element and maximum resolution as the last element.
See also:
hasSelectableTemperatureResolution

getTemperatureResolution

setTemperatureResolution

Implements TemperatureContainer.

double getTemperatureAlarmResolution (  ) 

Gets the temperature alarm resolution in Celsius.

Returns:
temperature alarm resolution in Celsius for this OneWireContainer42
See also:
hasTemperatureAlarms

getTemperatureAlarm

setTemperatureAlarm

Implements TemperatureContainer.

double getMaxTemperature (  ) 

Gets the maximum temperature in Celsius.

Returns:
maximum temperature in Celsius for this OneWireContainer42
See also:
getMinTemperature

Implements TemperatureContainer.

double getMinTemperature (  ) 

Gets the minimum temperature in Celsius.

Returns:
minimum temperature in Celsius for this OneWireContainer42
See also:
getMaxTemperature

Implements TemperatureContainer.

void doTemperatureConvert ( byte[]  state  )  throws OneWireIOException, OneWireException

Performs a temperature conversion on state information.

Parameters:
state byte array with device state information
Exceptions:
OneWireIOException on a 1-Wire communication error such as reading an incorrect CRC from this OneWireContainer42. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
OneWireException on a communication or setup error with the 1-Wire adapter
See also:
getTemperature

Implements TemperatureContainer.

double getTemperature ( byte[]  state  )  throws OneWireIOException

Gets the temperature value in Celsius from the state data retrieved from the readDevice() method.

Parameters:
state byte array with device state information for this OneWireContainer42
Returns:
temperature in Celsius from the last doTemperatureConvert()
Exceptions:
OneWireIOException on a 1-Wire communication error such as reading an incorrect CRC from this OneWireContainer42. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
See also:
doTemperatureConvert

Implements TemperatureContainer.

double getTemperatureAlarm ( int  alarmType,
byte[]  state 
)

Gets the specified temperature alarm value in Celsius from the state data retrieved from the readDevice() method.

Parameters:
alarmType valid value: ALARM_HIGH or ALARM_LOW
state byte array with device state information
Returns:
temperature alarm trip values in Celsius for this OneWireContainer42
See also:
hasTemperatureAlarms

setTemperatureAlarm

Implements TemperatureContainer.

double getTemperatureResolution ( byte[]  state  ) 

Gets the current temperature resolution in Celsius from the state data retrieved from the readDevice() method.

Parameters:
state byte array with device state information
Returns:
temperature resolution in Celsius for this OneWireContainer42
See also:
RESOLUTION_9_BIT

RESOLUTION_10_BIT

RESOLUTION_11_BIT

RESOLUTION_12_BIT

hasSelectableTemperatureResolution

getTemperatureResolutions

setTemperatureResolution

Implements TemperatureContainer.

void setTemperatureAlarm ( int  alarmType,
double  alarmValue,
byte[]  state 
) throws OneWireException, OneWireIOException

Sets the temperature alarm value in Celsius in the provided state data.

Use the method writeDevice() with this data to finalize the change to the device.

Parameters:
alarmType valid value: ALARM_HIGH or ALARM_LOW
alarmValue alarm trip value in Celsius
state byte array with device state information
See also:
hasTemperatureAlarms

getTemperatureAlarm

Implements TemperatureContainer.

void setTemperatureResolution ( double  resolution,
byte[]  state 
) throws OneWireException

Sets the current temperature resolution in Celsius in the provided state data.

Use the method writeDevice() with this data to finalize the change to the device.

Parameters:
resolution temperature resolution in Celsius. Valid values are RESOLUTION_9_BIT, RESOLUTION_10_BIT, RESOLUTION_11_BIT and RESOLUTION_12_BIT.
state byte array with device state information
See also:
RESOLUTION_9_BIT

RESOLUTION_10_BIT

RESOLUTION_11_BIT

RESOLUTION_12_BIT

hasSelectableTemperatureResolution

getTemperatureResolution

getTemperatureResolutions

Implements TemperatureContainer.

byte [] readDevice (  )  throws OneWireIOException, OneWireException

Retrieves this OneWireContainer42 state information.

The state information is returned as a byte array. Pass this byte array to the 'get' and 'set' methods. If the device state needs to be changed, then call the writeDevice() to finalize the changes.

Returns:
OneWireContainer42 state information. Device state looks like this:
   0 : temperature LSB
   1 : temperature MSB
   2 : trip high
   3 : trip low
   4 : configuration register (for resolution)
   5 : reserved
   6 : reserved
   7 : reserved
   8 : an 8 bit CRC of the previous 8 bytes
   9 : PIO Status bit assignment to write (this is a "don't care" for a read)
   10: PIO Status bit assignment to read
PIO Status Bit Assignment from PIO Access Write [A5H]: b7-b2 = all ones b1=PIOB Pin State b0=PIOA Pin State

 PIO Status Bit Assignment from PIO Access Read [F5H]:
   b7-b4 = Complement of b3 to b0     
   b3= PIOB Output Latch State   
   b2=PIOB Pin State     
   b1=PIOA Output Latch State   
   b0= PIOA Pin State

 

Exceptions:
OneWireIOException on a 1-Wire communication error such as reading an incorrect CRC from this OneWireContainer42. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
OneWireException on a communication or setup error with the 1-Wire adapter
See also:
writeDevice

Implements OneWireSensor.

void writeDevice ( byte[]  state  )  throws OneWireIOException, OneWireException

Writes to this OneWireContainer42 state information that have been changed by 'set' methods.

Only the device's "changed" state information is written to the part. This is done by referencing a field information appended to the state data.

Parameters:
state byte array with device state information from a previous readDevice()
Exceptions:
OneWireIOException on a 1-Wire communication error such as reading an incorrect CRC from this OneWireContainer42. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
OneWireException on a communication or setup error with the 1-Wire adapter
See also:
readDevice

Implements OneWireSensor.

byte [] readScratchpad (  )  throws OneWireIOException, OneWireException

Reads the Scratchpad of the DS28EA00.

Returns:
9-byte buffer representing the scratchpad
Exceptions:
OneWireIOException on a 1-Wire communication error such as reading an incorrect CRC from this OneWireContainer42. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
OneWireException on a communication or setup error with the 1-Wire adapter

void writeScratchpad ( byte[]  data  )  throws OneWireIOException, OneWireException

Writes to the Scratchpad of the DS28EA00.

Parameters:
data data to be written to the scratchpad. First byte of data must be the temperature High Trip Point, the second byte must be the temperature Low Trip Point, and the third must be the Resolution (configuration register).
Exceptions:
OneWireIOException on a 1-Wire communication error such as reading an incorrect CRC from this OneWireContainer42. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
OneWireException on a communication or setup error with the 1-Wire adapter
IllegalArgumentException when data is of invalid length

void copyScratchpad (  )  throws OneWireIOException, OneWireException

Copies the Scratchpad to the E-squared memory of the DS28EA00.

Exceptions:
OneWireIOException on a 1-Wire communication error such as reading an incorrect CRC from this OneWireContainer42. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
OneWireException on a communication or setup error with the 1-Wire adapter

byte [] recallE2 (  )  throws OneWireIOException, OneWireException

Recalls the DS28EA00 temperature trigger values (ALARM_HIGH and ALARM_LOW) and the configuration register to the scratchpad and reads the scratchpad.

Returns:
byte array representing data in the device's scratchpad.
Exceptions:
OneWireIOException on a 1-Wire communication error such as reading an incorrect CRC from this OneWireContainer42. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
OneWireException on a communication or setup error with the 1-Wire adapter

boolean isExternalPowerSupplied (  )  throws OneWireIOException, OneWireException

Reads the way power is supplied to the DS28EA00.

Returns:
true for external power,
false for parasite power
Exceptions:
OneWireIOException on a 1-Wire communication error such as reading an incorrect CRC from this OneWireContainer42. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
OneWireException on a communication or setup error with the 1-Wire adapter

float convertToFahrenheit ( float  celsiusTemperature  ) 

Converts a temperature reading from Celsius to Fahrenheit.

Parameters:
celsiusTemperature temperature value in Celsius
Returns:
the Fahrenheit conversion of the supplied temperature
Deprecated:
Replace with call to com.dalsemi.onewire.utils.Convert.toFahrenheit()
See also:
com.dalsemi.onewire.utils.Convert.toFahrenheit(double)

int getNumberChannels ( byte[]  state  ) 

Gets the number of channels supported by this switch.

Channel specific methods will use a channel number specified by an integer from [0 to (getNumberChannels(byte[]) - 1)]. Note that all devices of the same family will not necessarily have the same number of channels.

Parameters:
state current state of the device returned from readDevice()
Returns:
the number of channels for this device
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

Implements SwitchContainer.

boolean isHighSideSwitch (  ) 

Checks if the channels of this switch are 'high side' switches.

This indicates that when 'on' or true, the switch output is connect to the 1-Wire data. If this method returns false then when the switch is 'on' or true, the switch is connected to ground.

Returns:
true if the switch is a 'high side' switch, false if the switch is a 'low side' switch
See also:
getLatchState(int,byte[])

Implements SwitchContainer.

boolean hasActivitySensing (  ) 

Checks if the channels of this switch support activity sensing.

If this method returns true then the method getSensedActivity(int,byte[]) can be used.

Returns:
true if channels support activity sensing
See also:
getSensedActivity(int,byte[])

clearActivity()

Implements SwitchContainer.

boolean hasLevelSensing (  ) 

Checks if the channels of this switch support level sensing.

If this method returns true then the method getLevel(int,byte[]) can be used.

Returns:
true if channels support level sensing
See also:
getLevel(int,byte[])

Implements SwitchContainer.

boolean hasSmartOn (  ) 

Checks if the channels of this switch support 'smart on'.

Smart on is the ability to turn on a channel such that only 1-Wire device on this channel are awake and ready to do an operation. This greatly reduces the time to discover the device down a branch. If this method returns true then the method setLatchState(int,boolean,boolean,byte[]) can be used with the doSmart parameter true.

Returns:
true if channels support 'smart on'
See also:
setLatchState(int,boolean,boolean,byte[])

Implements SwitchContainer.

boolean onlySingleChannelOn (  ) 

Checks if the channels of this switch require that only one channel is on at any one time.

If this method returns true then the method setLatchState(int,boolean,boolean,byte[]) will not only affect the state of the given channel but may affect the state of the other channels as well to insure that only one channel is on at a time.

Returns:
true if only one channel can be on at a time.
See also:
setLatchState(int,boolean,boolean,byte[])

Implements SwitchContainer.

boolean getLevel ( int  channel,
byte[]  state 
)

Checks the sensed level on the indicated channel.

To avoid an exception, verify that this switch has level sensing with the hasLevelSensing(). Level sensing means that the device can sense the logic level on its PIO pin.

Parameters:
channel channel to execute this operation, in the range [0 to (getNumberChannels(byte[]) - 1)]
state current state of the device returned from readDevice()
Returns:
true if level sensed is 'high' and false if level sensed is 'low'
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

hasLevelSensing()

Implements SwitchContainer.

boolean getLatchState ( int  channel,
byte[]  state 
)

Checks the latch state of the indicated channel.

Parameters:
channel channel to execute this operation, in the range [0 to (getNumberChannels(byte[]) - 1)]
state current state of the device returned from readDevice()
Returns:
true if channel latch is 'on' or conducting and false if channel latch is 'off' and not conducting. Note that the actual output when the latch is 'on' is returned from the isHighSideSwitch() method.
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

isHighSideSwitch()

setLatchState(int,boolean,boolean,byte[])

Implements SwitchContainer.

boolean getSensedActivity ( int  channel,
byte[]  state 
) throws OneWireException

This method always returns false for the DS28EA00 (no activity sensing).

Checks if the indicated channel has experienced activity. This occurs when the level on the PIO pins changes. To clear the activity that is reported, call clearActivity(). To avoid an exception, verify that this device supports activity sensing by calling the method hasActivitySensing().

Parameters:
channel channel to execute this operation, in the range [0 to (getNumberChannels(byte[]) - 1)]
state current state of the device returned from readDevice()
Returns:
true if activity was detected and false if no activity was detected
Exceptions:
OneWireException if this device does not have activity sensing
See also:
hasActivitySensing()

clearActivity()

Implements SwitchContainer.

void clearActivity (  )  throws OneWireException

This method does nothing for the DS28EA00 (not needed).

Clears the activity latches the next time possible. For example, on a DS2406/07, this happens the next time the status is read with readDevice().

Exceptions:
OneWireException if this device does not support activity sensing
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

getSensedActivity(int,byte[])

Implements SwitchContainer.

void setLatchState ( int  channel,
boolean  latchState,
boolean  doSmart,
byte[]  state 
)

Sets the latch state of the indicated channel.

The method writeDevice() must be called to finalize changes to the device. Note that multiple 'set' methods can be called before one call to writeDevice().

Parameters:
channel channel to execute this operation, in the range [0 to (getNumberChannels(byte[]) - 1)]
latchState true to set the channel latch 'on' (conducting) and false to set the channel latch 'off' (not conducting). Note that the actual output when the latch is 'on' is returned from the isHighSideSwitch() method.
doSmart If latchState is 'on'/true then doSmart indicates if a 'smart on' is to be done. To avoid an exception check the capabilities of this device using the hasSmartOn() method.
state current state of the device returned from readDevice()
See also:
hasSmartOn()

getLatchState(int,byte[])

com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

Implements SwitchContainer.

void setLatchState ( byte  set,
byte[]  state 
)

Sets the latch state for all of the channels.

The method writeDevice() must be called to finalize changes to the device. Note that multiple 'set' methods can be called before one call to writeDevice().

Parameters:
set the state to set all of the channels, in the range [0 to (getNumberChannels(byte[]) - 1)]
state current state of the device returned from readDevice()
See also:
getLatchState(int,byte[])

com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

byte [] readRegister (  )  throws OneWireIOException, OneWireException

This method does nothing for the DS28EA00.

Returns:
1-Wire device register mask
Exceptions:
OneWireIOException on a 1-Wire communication error such as reading an incorrect CRC from a 1-Wire device. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
OneWireException on a communication or setup error with the 1-Wire adapter

void writeRegister ( byte[]  register  )  throws OneWireIOException, OneWireException

This method does nothing for the DS28EA00.

Parameters:
register 1-Wire device sensor state
Exceptions:
OneWireIOException on a 1-Wire communication error such as reading an incorrect CRC from a 1-Wire device. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
OneWireException on a communication or setup error with the 1-Wire adapter


Member Data Documentation

final byte READ_POWER_SUPPLY_COMMAND = ( byte ) 0xB4 [static]

DS28EA00 read power supply command.

This command is used to determine if external power is supplied.


The documentation for this class was generated from the following file:

Generated on Thu Aug 28 15:42:37 2008 for 1-Wire API for .NET by  doxygen 1.5.6