Package com.dalsemi.onewire.container
Class OneWireContainer42
java.lang.Object
com.dalsemi.onewire.container.OneWireContainer
com.dalsemi.onewire.container.OneWireContainer42
- All Implemented Interfaces:
OneWireSensor
,SwitchContainer
,TemperatureContainer
public class OneWireContainer42
extends OneWireContainer
implements TemperatureContainer, SwitchContainer
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
- Standard and Overdrive 1-Wire speed
- Improved 1-Wire interface with hysteresis and glitch filter
- Two general-purpose IO pins
- Chain function sharing the IO pins to detect physical sequence of devices in network
- Can be powered from data line. Power supply range is 3.0V to 5.5V
- Measures temperatures from -40 C to +85 C
- @htmlonly ± @endhtmlonly 0.5 C accuracy from -10 C to +85 C
- @htmlonly ± @endhtmlonly 2 C accuracy from -40 C to +85 C
- Thermometer resolution is user-selectable from 9 to 12 bits
- Converts temperature to 12-bit digital word in 750ms (max.)
- User-definable nonvolatile (NV) alarm threshold settings/user bytes
- Alarm search command to quickly identify devices whose temperature is outside of programmed limits
- Software-compatible and pin-compatible with the DS28EA00
Usage
- See the temperature usage example in
TemperatureContainer
for temperature specific operations.
- See the switch usage example in
SwitchContainer
for switch specific operations.
DataSheet
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
DS28EA00 converts temperature commandstatic final byte
DS28EA00 copies data from scratchpad to E-squared memory commandstatic final byte
PIO Access read commandstatic final byte
PIO Access read commandstatic final byte
DS28EA00 read power supply command.static final byte
DS28EA00 reads data from scratchpad commandstatic final byte
DS28EA00 recalls E-squared memory commandstatic final byte
DS28EA00 10-bit resolution constant for CONFIG bytestatic final byte
DS28EA00 11-bit resolution constant for CONFIG bytestatic final byte
DS28EA00 12-bit resolution constant for CONFIG bytestatic final byte
DS28EA00 9-bit resolution constant for CONFIG bytestatic final byte
DS28EA00 writes data to scratchpad commandFields inherited from class com.dalsemi.onewire.container.OneWireContainer
adapter, address, speed, speedFallBackOK
Fields inherited from interface com.dalsemi.onewire.container.TemperatureContainer
ALARM_HIGH, ALARM_LOW
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an emptyOneWireContainer42
.OneWireContainer42
(DSPortAdapter sourceAdapter, byte[] newAddress) Creates aOneWireContainer42
with the provided adapter object and the address of this One-Wire device.OneWireContainer42
(DSPortAdapter sourceAdapter, long newAddress) Creates aOneWireContainer42
with the provided adapter object and the address of this One-Wire device.OneWireContainer42
(DSPortAdapter sourceAdapter, String newAddress) Creates aOneWireContainer42
with the provided adapter object and the address of this One-Wire device. -
Method Summary
Modifier and TypeMethodDescriptionvoid
This method does nothing for the DS28EA00 (not needed).void
Copies the Scratchpad to the E-squared memory of the DS28EA00.void
doTemperatureConvert
(byte[] state) Performs a temperature conversion onstate
information.Retrieves the alternate Maxim Integrated Products part numbers or names.Retrieves a short description of the function of this deviceOneWireContainer42
type.boolean
getLatchState
(int channel, byte[] state) Checks the latch state of the indicated channel.boolean
getLevel
(int channel, byte[] state) Checks the sensed level on the indicated channel.int
Returns the maximum speed this iButton or 1-Wire device can communicate at.double
Gets the maximum temperature in Celsius.Gets an enumeration of memory bank instances that implement one or more of the following interfaces:MemoryBank
,PagedMemoryBank
, andOTPMemoryBank
.double
Gets the minimum temperature in Celsius.getName()
Retrieves the Maxim Integrated Products part number of thisOneWireContainer42
as aString
.int
getNumberChannels
(byte[] state) Gets the number of channels supported by this switch.boolean
getSensedActivity
(int channel, byte[] state) This method always returns false for the DS28EA00 (no activity sensing).double
getTemperature
(byte[] state) Gets the temperature value in Celsius from thestate
data retrieved from thereadDevice()
method.double
getTemperatureAlarm
(int alarmType, byte[] state) Gets the specified temperature alarm value in Celsius from thestate
data retrieved from thereadDevice()
method.double
Gets the temperature alarm resolution in Celsius.double
getTemperatureResolution
(byte[] state) Gets the current temperature resolution in Celsius from thestate
data retrieved from thereadDevice()
method.double[]
Gets an array of available temperature resolutions in Celsius.boolean
Checks if the channels of this switch support activity sensing.boolean
Checks if the channels of this switch support level sensing.boolean
Checks to see if this device has selectable temperature resolution.boolean
Checks if the channels of this switch support 'smart on'.boolean
Checks to see if this temperature measuring device has high/low trip alarms.boolean
Reads the way power is supplied to the DS28EA00.boolean
Checks if the channels of this switch are 'high side' switches.boolean
Checks if the channels of this switch require that only one channel is on at any one time.byte[]
Retrieves thisOneWireContainer42
state information.byte[]
This method does nothing for the DS28EA00.byte[]
Reads the Scratchpad of the DS28EA00.byte[]
recallE2()
Recalls the DS28EA00 temperature trigger values (ALARM_HIGH
andALARM_LOW
) and the configuration register to the scratchpad and reads the scratchpad.void
setLatchState
(byte set, byte[] state) Sets the latch state for all of the channels.void
setLatchState
(int channel, boolean latchState, boolean doSmart, byte[] state) Sets the latch state of the indicated channel.void
setTemperatureAlarm
(int alarmType, double alarmValue, byte[] state) Sets the temperature alarm value in Celsius in the providedstate
data.void
setTemperatureResolution
(double resolution, byte[] state) Sets the current temperature resolution in Celsius in the providedstate
data.void
writeDevice
(byte[] state) Writes to thisOneWireContainer42
state
information that have been changed by 'set
' methods.void
writeRegister
(byte[] register) This method does nothing for the DS28EA00.void
writeScratchpad
(byte[] data) Writes to the Scratchpad of the DS28EA00.Methods inherited from class com.dalsemi.onewire.container.OneWireContainer
doSpeed, equals, getAdapter, getAddress, getAddressAsLong, getAddressAsString, hashCode, isAlarming, isPresent, setSpeed, setupContainer, setupContainer, setupContainer, toString
-
Field Details
-
WRITE_SCRATCHPAD_COMMAND
public static final byte WRITE_SCRATCHPAD_COMMANDDS28EA00 writes data to scratchpad command- See Also:
-
READ_SCRATCHPAD_COMMAND
public static final byte READ_SCRATCHPAD_COMMANDDS28EA00 reads data from scratchpad command- See Also:
-
COPY_SCRATCHPAD_COMMAND
public static final byte COPY_SCRATCHPAD_COMMANDDS28EA00 copies data from scratchpad to E-squared memory command- See Also:
-
CONVERT_TEMPERATURE_COMMAND
public static final byte CONVERT_TEMPERATURE_COMMANDDS28EA00 converts temperature command- See Also:
-
RECALL_E2MEMORY_COMMAND
public static final byte RECALL_E2MEMORY_COMMANDDS28EA00 recalls E-squared memory command- See Also:
-
READ_POWER_SUPPLY_COMMAND
public static final byte READ_POWER_SUPPLY_COMMANDDS28EA00 read power supply command. This command is used to determine if external power is supplied.- See Also:
-
RESOLUTION_12_BIT
public static final byte RESOLUTION_12_BITDS28EA00 12-bit resolution constant for CONFIG byte- See Also:
-
RESOLUTION_11_BIT
public static final byte RESOLUTION_11_BITDS28EA00 11-bit resolution constant for CONFIG byte- See Also:
-
RESOLUTION_10_BIT
public static final byte RESOLUTION_10_BITDS28EA00 10-bit resolution constant for CONFIG byte- See Also:
-
RESOLUTION_9_BIT
public static final byte RESOLUTION_9_BITDS28EA00 9-bit resolution constant for CONFIG byte- See Also:
-
PIO_ACCESS_READ
public static final byte PIO_ACCESS_READPIO Access read command- See Also:
-
PIO_ACCESS_WRITE
public static final byte PIO_ACCESS_WRITEPIO Access read command- See Also:
-
-
Constructor Details
-
OneWireContainer42
public OneWireContainer42()Creates an emptyOneWireContainer42
. Must callsetupContainer()
before using this new container.This is one of the methods to construct a
OneWireContainer42
. The others are through creating aOneWireContainer42
with parameters. -
OneWireContainer42
Creates aOneWireContainer42
with the provided adapter object and the address of this One-Wire device. This is one of the methods to construct aOneWireContainer42
. The others are through creating aOneWireContainer42
with different parameters types.- Parameters:
sourceAdapter
- adapter object required to communicate with this One-Wire devicenewAddress
- address of this One-Wire device- See Also:
-
OneWireContainer42
Creates aOneWireContainer42
with the provided adapter object and the address of this One-Wire device. This is one of the methods to construct aOneWireContainer42
. The others are through creating aOneWireContainer42
with different parameters types.- Parameters:
sourceAdapter
- adapter object required to communicate with this One-Wire devicenewAddress
- address of this One-Wire device- See Also:
-
OneWireContainer42
Creates aOneWireContainer42
with the provided adapter object and the address of this One-Wire device. This is one of the methods to construct aOneWireContainer42
. The others are through creating aOneWireContainer42
with different parameters types.- Parameters:
sourceAdapter
- adapter object required to communicate with this One-Wire devicenewAddress
- address of this One-Wire device- See Also:
-
-
Method Details
-
getMemoryBanks
Gets an enumeration of memory bank instances that implement one or more of the following interfaces:MemoryBank
,PagedMemoryBank
, andOTPMemoryBank
.- Overrides:
getMemoryBanks
in classOneWireContainer
- Returns:
Enumeration
of memory banks- See Also:
-
getName
Retrieves the Maxim Integrated Products part number of thisOneWireContainer42
as aString
. For example 'DS28EA00'.- Overrides:
getName
in classOneWireContainer
- Returns:
- this
OneWireContainer42
name
-
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'.- Overrides:
getAlternateNames
in classOneWireContainer
- Returns:
- this
OneWireContainer42
alternate names
-
getDescription
Retrieves a short description of the function of this deviceOneWireContainer42
type.- Overrides:
getDescription
in classOneWireContainer
- Returns:
OneWireContainer42
functional description
-
getMaxSpeed
public int getMaxSpeed()Returns the maximum speed this iButton or 1-Wire device can communicate at.- Overrides:
getMaxSpeed
in classOneWireContainer
- Returns:
- maximum speed
- See Also:
-
hasTemperatureAlarms
public boolean hasTemperatureAlarms()Checks to see if this temperature measuring device has high/low trip alarms.- Specified by:
hasTemperatureAlarms
in interfaceTemperatureContainer
- Returns:
true
if thisOneWireContainer42
has high/low trip alarms- See Also:
-
hasSelectableTemperatureResolution
public boolean hasSelectableTemperatureResolution()Checks to see if this device has selectable temperature resolution.- Specified by:
hasSelectableTemperatureResolution
in interfaceTemperatureContainer
- Returns:
true
if thisOneWireContainer42
has selectable temperature resolution- See Also:
-
getTemperatureResolutions
public double[] getTemperatureResolutions()Gets an array of available temperature resolutions in Celsius.- Specified by:
getTemperatureResolutions
in interfaceTemperatureContainer
- 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:
-
getTemperatureAlarmResolution
public double getTemperatureAlarmResolution()Gets the temperature alarm resolution in Celsius.- Specified by:
getTemperatureAlarmResolution
in interfaceTemperatureContainer
- Returns:
- temperature alarm resolution in Celsius for this
OneWireContainer42
- See Also:
-
getMaxTemperature
public double getMaxTemperature()Gets the maximum temperature in Celsius.- Specified by:
getMaxTemperature
in interfaceTemperatureContainer
- Returns:
- maximum temperature in Celsius for this
OneWireContainer42
- See Also:
-
getMinTemperature
public double getMinTemperature()Gets the minimum temperature in Celsius.- Specified by:
getMinTemperature
in interfaceTemperatureContainer
- Returns:
- minimum temperature in Celsius for this
OneWireContainer42
- See Also:
-
doTemperatureConvert
Performs a temperature conversion onstate
information.- Specified by:
doTemperatureConvert
in interfaceTemperatureContainer
- Parameters:
state
- byte array with device state information- Throws:
OneWireIOException
- on a 1-Wire communication error such as reading an incorrect CRC from thisOneWireContainer42
. 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
Gets the temperature value in Celsius from thestate
data retrieved from thereadDevice()
method.- Specified by:
getTemperature
in interfaceTemperatureContainer
- Parameters:
state
- byte array with device state information for thisOneWireContainer42
- Returns:
- temperature in Celsius from the last
doTemperatureConvert()
- Throws:
OneWireIOException
- on a 1-Wire communication error such as reading an incorrect CRC from thisOneWireContainer42
. 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:
-
getTemperatureAlarm
public double getTemperatureAlarm(int alarmType, byte[] state) Gets the specified temperature alarm value in Celsius from thestate
data retrieved from thereadDevice()
method.- Specified by:
getTemperatureAlarm
in interfaceTemperatureContainer
- Parameters:
alarmType
- valid value:ALARM_HIGH
orALARM_LOW
state
- byte array with device state information- Returns:
- temperature alarm trip values in Celsius for this
OneWireContainer42
- See Also:
-
getTemperatureResolution
public double getTemperatureResolution(byte[] state) Gets the current temperature resolution in Celsius from thestate
data retrieved from thereadDevice()
method.- Specified by:
getTemperatureResolution
in interfaceTemperatureContainer
- Parameters:
state
- byte array with device state information- Returns:
- temperature resolution in Celsius for this
OneWireContainer42
- See Also:
-
setTemperatureAlarm
public void setTemperatureAlarm(int alarmType, double alarmValue, byte[] state) throws OneWireException, OneWireIOException Sets the temperature alarm value in Celsius in the providedstate
data. Use the methodwriteDevice()
with this data to finalize the change to the device.- Specified by:
setTemperatureAlarm
in interfaceTemperatureContainer
- Parameters:
alarmType
- valid value:ALARM_HIGH
orALARM_LOW
alarmValue
- alarm trip value in Celsiusstate
- byte array with device state information- Throws:
OneWireException
- Device does not support temperature alarmsOneWireIOException
- See Also:
-
setTemperatureResolution
Sets the current temperature resolution in Celsius in the providedstate
data. Use the methodwriteDevice()
with this data to finalize the change to the device.- Specified by:
setTemperatureResolution
in interfaceTemperatureContainer
- Parameters:
resolution
- temperature resolution in Celsius. Valid values areRESOLUTION_9_BIT
,RESOLUTION_10_BIT
,RESOLUTION_11_BIT
andRESOLUTION_12_BIT
.state
- byte array with device state information- Throws:
OneWireException
- Device does not support selectable temperature resolution- See Also:
-
readDevice
Retrieves thisOneWireContainer42
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 thewriteDevice()
to finalize the changes.- Specified by:
readDevice
in interfaceOneWireSensor
- 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
- Throws:
OneWireIOException
- on a 1-Wire communication error such as reading an incorrect CRC from thisOneWireContainer42
. 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
Writes to thisOneWireContainer42
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.- Specified by:
writeDevice
in interfaceOneWireSensor
- Parameters:
state
- byte array with device state information from a previous readDevice()- Throws:
OneWireIOException
- on a 1-Wire communication error such as reading an incorrect CRC from thisOneWireContainer42
. 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:
-
readScratchpad
Reads the Scratchpad of the DS28EA00.- Returns:
- 9-byte buffer representing the scratchpad
- Throws:
OneWireIOException
- on a 1-Wire communication error such as reading an incorrect CRC from thisOneWireContainer42
. 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
-
writeScratchpad
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).- Throws:
OneWireIOException
- on a 1-Wire communication error such as reading an incorrect CRC from thisOneWireContainer42
. 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 adapterIllegalArgumentException
- when data is of invalid length
-
copyScratchpad
Copies the Scratchpad to the E-squared memory of the DS28EA00.- Throws:
OneWireIOException
- on a 1-Wire communication error such as reading an incorrect CRC from thisOneWireContainer42
. 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
-
recallE2
Recalls the DS28EA00 temperature trigger values (ALARM_HIGH
andALARM_LOW
) and the configuration register to the scratchpad and reads the scratchpad.- Returns:
- byte array representing data in the device's scratchpad.
- Throws:
OneWireIOException
- on a 1-Wire communication error such as reading an incorrect CRC from thisOneWireContainer42
. 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
-
isExternalPowerSupplied
Reads the way power is supplied to the DS28EA00.- Returns:
true
for external power,
false
for parasite power- Throws:
OneWireIOException
- on a 1-Wire communication error such as reading an incorrect CRC from thisOneWireContainer42
. 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
-
getNumberChannels
public 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.- Specified by:
getNumberChannels
in interfaceSwitchContainer
- Parameters:
state
- current state of the device returned fromreadDevice()
- Returns:
- the number of channels for this device
- See Also:
-
isHighSideSwitch
public boolean isHighSideSwitch()Checks if the channels of this switch are 'high side' switches. This indicates that when 'on' ortrue
, the switch output is connect to the 1-Wire data. If this method returnsfalse
then when the switch is 'on' ortrue
, the switch is connected to ground.- Specified by:
isHighSideSwitch
in interfaceSwitchContainer
- Returns:
true
if the switch is a 'high side' switch,false
if the switch is a 'low side' switch- See Also:
-
hasActivitySensing
public boolean hasActivitySensing()Checks if the channels of this switch support activity sensing. If this method returnstrue
then the methodgetSensedActivity(int,byte[])
can be used.- Specified by:
hasActivitySensing
in interfaceSwitchContainer
- Returns:
true
if channels support activity sensing- See Also:
-
hasLevelSensing
public boolean hasLevelSensing()Checks if the channels of this switch support level sensing. If this method returnstrue
then the methodgetLevel(int,byte[])
can be used.- Specified by:
hasLevelSensing
in interfaceSwitchContainer
- Returns:
true
if channels support level sensing- See Also:
-
hasSmartOn
public 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 returnstrue
then the methodsetLatchState(int,boolean,boolean,byte[])
can be used with thedoSmart
parametertrue
.- Specified by:
hasSmartOn
in interfaceSwitchContainer
- Returns:
true
if channels support 'smart on'- See Also:
-
onlySingleChannelOn
public boolean onlySingleChannelOn()Checks if the channels of this switch require that only one channel is on at any one time. If this method returnstrue
then the methodsetLatchState(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.- Specified by:
onlySingleChannelOn
in interfaceSwitchContainer
- Returns:
true
if only one channel can be on at a time.- See Also:
-
getLevel
public 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 thehasLevelSensing()
. Level sensing means that the device can sense the logic level on its PIO pin.- Specified by:
getLevel
in interfaceSwitchContainer
- Parameters:
channel
- channel to execute this operation, in the range [0 to (getNumberChannels(byte[])
- 1)]state
- current state of the device returned fromreadDevice()
- Returns:
true
if level sensed is 'high' andfalse
if level sensed is 'low'- See Also:
-
getLatchState
public boolean getLatchState(int channel, byte[] state) Checks the latch state of the indicated channel.- Specified by:
getLatchState
in interfaceSwitchContainer
- Parameters:
channel
- channel to execute this operation, in the range [0 to (getNumberChannels(byte[])
- 1)]state
- current state of the device returned fromreadDevice()
- Returns:
true
if channel latch is 'on' or conducting andfalse
if channel latch is 'off' and not conducting. Note that the actual output when the latch is 'on' is returned from theisHighSideSwitch()
method.- See Also:
-
getSensedActivity
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, callclearActivity()
. To avoid an exception, verify that this device supports activity sensing by calling the methodhasActivitySensing()
.- Specified by:
getSensedActivity
in interfaceSwitchContainer
- Parameters:
channel
- channel to execute this operation, in the range [0 to (getNumberChannels(byte[])
- 1)]state
- current state of the device returned fromreadDevice()
- Returns:
true
if activity was detected andfalse
if no activity was detected- Throws:
OneWireException
- if this device does not have activity sensing- See Also:
-
clearActivity
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 withreadDevice()
.- Specified by:
clearActivity
in interfaceSwitchContainer
- Throws:
OneWireException
- if this device does not support activity sensing- See Also:
-
setLatchState
public void setLatchState(int channel, boolean latchState, boolean doSmart, byte[] state) Sets the latch state of the indicated channel. The methodwriteDevice()
must be called to finalize changes to the device. Note that multiple 'set' methods can be called before one call towriteDevice()
.- Specified by:
setLatchState
in interfaceSwitchContainer
- Parameters:
channel
- channel to execute this operation, in the range [0 to (getNumberChannels(byte[])
- 1)]latchState
-true
to set the channel latch 'on' (conducting) andfalse
to set the channel latch 'off' (not conducting). Note that the actual output when the latch is 'on' is returned from theisHighSideSwitch()
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 thehasSmartOn()
method.state
- current state of the device returned fromreadDevice()
- See Also:
-
setLatchState
public void setLatchState(byte set, byte[] state) Sets the latch state for all of the channels. The methodwriteDevice()
must be called to finalize changes to the device. Note that multiple 'set' methods can be called before one call towriteDevice()
.- 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 fromreadDevice()
- See Also:
-
readRegister
This method does nothing for the DS28EA00.- Returns:
- 1-Wire device register mask
- Throws:
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
-
writeRegister
This method does nothing for the DS28EA00.- Parameters:
register
- 1-Wire device sensor state- Throws:
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
-