OneWireContainer04 Class Reference

Inherits com::dalsemi::onewire::container::OneWireContainer, and com::dalsemi::onewire::container::ClockContainer.

List of all members.


Detailed Description

1-Wire container for 512 byte memory iButton Plus Time, DS1994 and 1-Wire Chip, DS2404. This container encapsulates the functionality of the iButton family type 04 (hex)

This iButton is primarily used as a read/write portable memory device with real-time-clock, timer and experation features.

Features

Appended to the clock page data retrieved with 'readDevice' are 4 bytes that represent a bitmap of changed bytes. These bytes are used in the 'writeDevice' method in conjuction with the 'set' methods to only write back the changed clock register bytes. The 'readDevice' method will clear any pending alarms.

WARNING: If write-protect alarm options have been set prior to a call to 'writeDevice' then the operation is non-reversable.

Alternate Names

Memory

The memory can be accessed through the objects that are returned from the getMemoryBanks method.

The following is a list of the MemoryBank instances that are returned:

Clock

The clock methods can be organized into the following categories. Note that methods that are implemented for the ClockContainer interface are marked with (*):

Usage

See the usage examples in ClockContainer for basic clock operations. See the usage example in OneWireContainer to enumerate the MemoryBanks. See the usage examples in MemoryBank and PagedMemoryBank for bank specific operations.

DataSheets

http://pdfserv.maxim-ic.com/arpdf/DS1992-DS1994.pdf http://pdfserv.maxim-ic.com/arpdf/DS2404.pdf http://pdfserv.maxim-ic.com/arpdf/DS1427.pdf

See also:
com.dalsemi.onewire.container.MemoryBank

com.dalsemi.onewire.container.PagedMemoryBank

com.dalsemi.onewire.container.ClockContainer

Version:
0.00, 28 Aug 2000
Author:
DS

Public Member Functions

 OneWireContainer04 ()
 Create an empty container that is not complete until after a call to setupContainer.
 OneWireContainer04 (DSPortAdapter sourceAdapter, byte[] newAddress)
 Create a container with the provided adapter instance and the address of the iButton or 1-Wire device.
 OneWireContainer04 (DSPortAdapter sourceAdapter, long newAddress)
 Create a container with the provided adapter instance and the address of the iButton or 1-Wire device.
 OneWireContainer04 (DSPortAdapter sourceAdapter, String newAddress)
 Create a container with the provided adapter instance and the address of the iButton or 1-Wire device.
String getName ()
 Get the Maxim Integrated Products part number of the iButton or 1-Wire Device as a string.
String getAlternateNames ()
 Get the alternate Maxim Integrated Products part numbers or names.
String getDescription ()
 Get a short description of the function of this iButton or 1-Wire Device type.
Enumeration getMemoryBanks ()
 Get an enumeration of memory bank instances that implement one or more of the following interfaces: MemoryBank, PagedMemoryBank, and OTPMemoryBank.
boolean hasClockAlarm ()
 Query to see if the clock has an alarm feature.
boolean canDisableClock ()
 Query to see if the clock can be disabled.
long getClockResolution ()
 Query to get the clock resolution in milliseconds.
byte[] readDevice () throws OneWireIOException, OneWireException
 Retrieves the 1-Wire device sensor state.
void writeDevice (byte[] state) throws OneWireIOException, OneWireException
 Writes the 1-Wire device sensor state that have been changed by 'set' methods.
long getClock (byte[] state)
 Extracts the Real-Time clock value in milliseconds.
long getClockAlarm (byte[] state) throws OneWireException
 Extracts the clock alarm value for the Real-Time clock.
boolean isClockAlarming (byte[] state)
 Checks if the clock alarm flag has been set.
boolean isClockAlarmEnabled (byte[] state)
 Checks if the clock alarm is enabled.
boolean isClockRunning (byte[] state)
 Checks if the device's oscillator is enabled.
long getIntervalTimer (byte[] state)
 Get the Interval Timer Value in milliseconds.
long getCycleCounter (byte[] state)
 Get the power cycle count value.
long getIntervalTimerAlarm (byte[] state)
 Get the Interval Timer Alarm Value.
long getCycleCounterAlarm (byte[] state)
 Get the cycle count Alarm Value.
boolean isIntervalTimerAlarming (byte[] state)
 Check if the Interval Timer Alarm flag has been set.
boolean isCycleCounterAlarming (byte[] state)
 Check if the Cycle Alarm flag has been set.
boolean isIntervalTimerAlarmEnabled (byte[] state)
 Check if the Interval Timer Alarm is enabled.
boolean isCycleCounterAlarmEnabled (byte[] state)
 Check if the Cycle Alarm is enabled.
boolean isClockWriteProtected (byte[] state)
 Check if the Real-Time clock/Alarm is write protected.
boolean isIntervalTimerWriteProtected (byte[] state)
 Check if the Interval Timer and Interval Timer Alarm register is write protected.
boolean isCycleCounterWriteProtected (byte[] state)
 Check if the Cycle Counter and Alarm is write protected.
boolean canReadAfterExpire (byte[] state)
 Check if the device can be read after a write protected alarm has occured.
boolean isIntervalTimerAutomatic (byte[] state)
 Checks if the Interval timer is automatic or manual.
boolean isIntervalTimerStopped (byte[] state)
 Check if the Interval timer is stopped.
boolean isAutomaticDelayLong (byte[] state)
 Checks if the automatic delay for the Inteval Timer and the Cycle counter is either 3.5ms (regular) or 123ms (long).
void setClock (long time, byte[] state)
 Sets the Real-Time clock.
void setClockAlarm (long time, byte[] state) throws OneWireException
 Sets the clock alarm.
void setClockRunEnable (boolean runEnable, byte[] state) throws OneWireException
 Enables or disables the oscillator, turning the clock 'on' and 'off'.
void setClockAlarmEnable (boolean alarmEnable, byte[] state) throws OneWireException
 Enables or disables the clock alarm.
void setIntervalTimer (long time, byte[] state)
 Sets the Interval Timer.
void setCycleCounter (long cycles, byte[] state)
 Sets power Cycle Counter.
void setIntervalTimerAlarm (long time, byte[] state)
 Sets the Interval Timer Alarm.
void setCycleCounterAlarm (long cycles, byte[] state)
 Sets the power Cycle Count Alarm.
void writeProtectClock (byte[] state)
 Sets the write protect options for the Real-Time clock/Alarm.
void writeProtectIntervalTimer (byte[] state)
 Sets the write protect options for Interval Timer and Interval Timer Alarm register.
void writeProtectCycleCounter (byte[] state)
 Sets the write protect options for the Cycle Counter and Alarm register.
void setReadAfterExpire (boolean readAfter, byte[] state)
 Sets the read state of the device after a write protected alarm has occured.
void setIntervalTimerAutomatic (boolean autoTimer, byte[] state)
 Sets the Interval timer to automatic or manual mode.
void setIntervalTimerRunState (boolean runState, byte[] state)
 Sets the Interval timer run/stop mode.
void setAutomaticDelayLong (boolean delayLong, byte[] state)
 Sets the automatic delay for the Inteval Timer and the Cycle counter to either 123ms (long) or 3.5ms (regular).
void setIntervalTimerAlarmEnable (boolean alarmEnable, byte[] state)
 Sets the Interval Timer Alarm enable.
void setCycleCounterAlarmEnable (boolean alarmEnable, byte[] state)
 Sets the Cycle counter Alarm enable.

Static Protected Attributes

static final int BITMAP_OFFSET = 32
 Offset of BITMAP in array returned from read registers.
static final int STATUS_OFFSET = 0
 Offset of status register from read registers.
static final int CONTROL_OFFSET = 1
 Offset of control register from read registers.
static final int RTC_OFFSET = 2
 Offset of real-time-clock in array returned from read registers.
static final int INTERVAL_OFFSET = 7
 Offset of inverval-counter in array returned from read registers.
static final int COUNTER_OFFSET = 12
 Offset of counter in array returned from read registers.
static final int RTC_ALARM_OFFSET = 16
 Offset of real-time-clock-alarm in array returned from read registers.
static final int INTERVAL_ALARM_OFFSET = 21
 Offset of inverval-counter-alarm in array returned from read registers.
static final int COUNTER_ALARM_OFFSET = 26
 Offset of counter-alarm in array returned from read registers.

Constructor & Destructor Documentation

Create an empty container that is not complete until after a call to setupContainer.

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

See also:
setupContainer(com.dalsemi.onewire.adapter.DSPortAdapter,byte[]) super.setupContainer()

OneWireContainer04 ( DSPortAdapter  sourceAdapter,
byte[]  newAddress 
)

Create a container with the provided adapter instance and the address of the iButton or 1-Wire device.

This is one of the methods to construct a container. The other is through creating a OneWireContainer with NO parameters.

Parameters:
sourceAdapter adapter instance used to communicate with this iButton
newAddress Address of this 1-Wire device
See also:
OneWireContainer04() OneWireContainer04

com.dalsemi.onewire.utils.Address utils.Address

OneWireContainer04 ( DSPortAdapter  sourceAdapter,
long  newAddress 
)

Create a container with the provided adapter instance and the address of the iButton or 1-Wire device.

This is one of the methods to construct a container. The other is through creating a OneWireContainer with NO parameters.

Parameters:
sourceAdapter adapter instance used to communicate with this 1-Wire device
newAddress Address of this 1-Wire device
See also:
OneWireContainer04() OneWireContainer04

com.dalsemi.onewire.utils.Address utils.Address

OneWireContainer04 ( DSPortAdapter  sourceAdapter,
String  newAddress 
)

Create a container with the provided adapter instance and the address of the iButton or 1-Wire device.

This is one of the methods to construct a container. The other is through creating a OneWireContainer with NO parameters.

Parameters:
sourceAdapter adapter instance used to communicate with this 1-Wire device
newAddress Address of this 1-Wire device
See also:
OneWireContainer04() OneWireContainer04

com.dalsemi.onewire.utils.Address utils.Address


Member Function Documentation

String getName (  ) 

Get the Maxim Integrated Products part number of the iButton or 1-Wire Device as a string.

For example 'DS1992'.

Returns:
iButton or 1-Wire device name

Reimplemented from OneWireContainer.

String getAlternateNames (  ) 

Get 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:
1-Wire device alternate names

Reimplemented from OneWireContainer.

String getDescription (  ) 

Get a short description of the function of this iButton or 1-Wire Device type.

Returns:
device description

Reimplemented from OneWireContainer.

Enumeration getMemoryBanks (  ) 

Get 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.

boolean hasClockAlarm (  ) 

Query to see if the clock has an alarm feature.

Returns:
true if the Real-Time clock has an alarm
See also:
getClockAlarm(byte[])

isClockAlarmEnabled(byte[])

isClockAlarming(byte[])

setClockAlarm(long,byte[])

setClockAlarmEnable(boolean,byte[])

Implements ClockContainer.

boolean canDisableClock (  ) 

Query to see if the clock can be disabled.

Returns:
true if the clock can be enabled and disabled
See also:
isClockRunning(byte[])

setClockRunEnable(boolean,byte[])

Implements ClockContainer.

long getClockResolution (  ) 

Query to get the clock resolution in milliseconds.

Returns:
the clock resolution in milliseconds

Implements ClockContainer.

byte [] readDevice (  )  throws OneWireIOException, OneWireException

Retrieves the 1-Wire device sensor state.

This state 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:
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

Implements OneWireSensor.

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

Writes the 1-Wire device sensor state that have been changed by 'set' methods.

Only the state registers that changed are updated. This is done by referencing a field information appended to the state data.

Parameters:
state 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

Implements OneWireSensor.

long getClock ( byte[]  state  ) 

Extracts the Real-Time clock value in milliseconds.

Parameters:
state current state of the device returned from readDevice()
Returns:
the time represented in this clock in milliseconds since 1970
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

setClock(long,byte[])

Implements ClockContainer.

long getClockAlarm ( byte[]  state  )  throws OneWireException

Extracts the clock alarm value for the Real-Time clock.

Parameters:
state current state of the device returned from readDevice()
Returns:
milliseconds since 1970 that the clock alarm is set to
Exceptions:
OneWireException if this device does not have clock alarms
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

hasClockAlarm()

isClockAlarmEnabled(byte[])

isClockAlarming(byte[])

setClockAlarm(long,byte[])

setClockAlarmEnable(boolean,byte[])

Implements ClockContainer.

boolean isClockAlarming ( byte[]  state  ) 

Checks if the clock alarm flag has been set.

This will occur when the value of the Real-Time clock equals the value of the clock alarm.

Parameters:
state current state of the device returned from readDevice()
Returns:
true if the Real-Time clock is alarming
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

hasClockAlarm()

isClockAlarmEnabled(byte[])

getClockAlarm(byte[])

setClockAlarm(long,byte[])

setClockAlarmEnable(boolean,byte[])

Implements ClockContainer.

boolean isClockAlarmEnabled ( byte[]  state  ) 

Checks if the clock alarm is enabled.

Parameters:
state current state of the device returned from readDevice()
Returns:
true if clock alarm is enabled
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

hasClockAlarm()

isClockAlarming(byte[])

getClockAlarm(byte[])

setClockAlarm(long,byte[])

setClockAlarmEnable(boolean,byte[])

Implements ClockContainer.

boolean isClockRunning ( byte[]  state  ) 

Checks if the device's oscillator is enabled.

The clock will not increment if the clock oscillator is not enabled.

Parameters:
state current state of the device returned from readDevice()
Returns:
true if the clock is running
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

canDisableClock()

setClockRunEnable(boolean,byte[])

Implements ClockContainer.

long getIntervalTimer ( byte[]  state  ) 

Get the Interval Timer Value in milliseconds.

Parameters:
state current state of the device returned from readDevice()
Returns:
time in milliseconds that have occured since the interval counter was started
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

setIntervalTimer(long,byte[])

long getCycleCounter ( byte[]  state  ) 

Get the power cycle count value.

This is the total number of power cycles that the DS1994 has seen since the counter was reset.

Parameters:
state current state of the device returned from readDevice()
Returns:
power cycle count
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

setCycleCounter(long,byte[]) setCycleCounter

long getIntervalTimerAlarm ( byte[]  state  ) 

Get the Interval Timer Alarm Value.

Parameters:
state current state of the device returned from readDevice()
Returns:
time in milliseconds that have the interval timer alarm is set to
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

setIntervalTimerAlarm(long,byte[]) setIntervalTimerAlarm

long getCycleCounterAlarm ( byte[]  state  ) 

Get the cycle count Alarm Value.

Parameters:
state current state of the device returned from readDevice()
Returns:
total number of power cycles that the DS1994 has to to see before the alarm will be triggered
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

setCycleCounterAlarm(long,byte[]) setCycleCounterAlarm

boolean isIntervalTimerAlarming ( byte[]  state  ) 

Check if the Interval Timer Alarm flag has been set.

Parameters:
state current state of the device returned from readDevice()
Returns:
true if interval timer is alarming
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

isIntervalTimerAlarmEnabled(byte[]) isIntervalTimerAlarmEnabled

setIntervalTimerAlarmEnable(boolean,byte[]) setIntervalTimerAlarmEnable

boolean isCycleCounterAlarming ( byte[]  state  ) 

Check if the Cycle Alarm flag has been set.

Parameters:
state current state of the device returned from readDevice()
Returns:
true if cycle counter is alarming
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

isCycleCounterAlarmEnabled(byte[]) isCycleCounterAlarmEnabled

setCycleCounterAlarmEnable(boolean,byte[]) setCycleCounterAlarmEnable

boolean isIntervalTimerAlarmEnabled ( byte[]  state  ) 

Check if the Interval Timer Alarm is enabled.

Parameters:
state current state of the device returned from readDevice()
Returns:
true if interval timer alarm is enabled
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

isIntervalTimerAlarming(byte[]) isIntervalTimerAlarming

setIntervalTimerAlarmEnable(boolean,byte[]) setIntervalTimerAlarmEnable

boolean isCycleCounterAlarmEnabled ( byte[]  state  ) 

Check if the Cycle Alarm is enabled.

Parameters:
state current state of the device returned from readDevice()
Returns:
true true if cycle counter alarm is enabled
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

isCycleCounterAlarming(byte[]) isCycleCounterAlarming

setCycleCounterAlarmEnable(boolean,byte[]) setCycleCounterAlarmEnable

boolean isClockWriteProtected ( byte[]  state  ) 

Check if the Real-Time clock/Alarm is write protected.

Parameters:
state current state of the device returned from readDevice()
Returns:
true if real time clock/alarm is write protected
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

writeProtectClock(byte[]) writeProtectClock

boolean isIntervalTimerWriteProtected ( byte[]  state  ) 

Check if the Interval Timer and Interval Timer Alarm register is write protected.

Parameters:
state current state of the device returned from readDevice()
Returns:
true if interval timer and interval timer alarm is write protected
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

writeProtectIntervalTimer(byte[]) writeProtectIntervalTimer

boolean isCycleCounterWriteProtected ( byte[]  state  ) 

Check if the Cycle Counter and Alarm is write protected.

Parameters:
state current state of the device returned from readDevice()
Returns:
true if cycle counter/alarm is write protected
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

writeProtectCycleCounter(byte[]) writeProtectCycleCounter

boolean canReadAfterExpire ( byte[]  state  ) 

Check if the device can be read after a write protected alarm has occured.

Parameters:
state current state of the device returned from readDevice()
Returns:
true if the device can be read after a write protected alarm has occured
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

setReadAfterExpire(boolean, byte[]) setReadAfterExpire

boolean isIntervalTimerAutomatic ( byte[]  state  ) 

Checks if the Interval timer is automatic or manual.

If it is automatic then the interval counter will increment while the devices I/O line is high after the delay select period has elapsed (either 3.5 or 123 ms, see the isAutomaticDelayLong() method).

Parameters:
state current state of the device returned from readDevice()
Returns:
true if the interval timer is set to automatic mode
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

setIntervalTimerAutomatic(boolean, byte[]) setIntervalTimerAutomatic

boolean isIntervalTimerStopped ( byte[]  state  ) 

Check if the Interval timer is stopped.

This only has meaning if the interval timer is in manual mode (not isIntervalTimerAutomatic).

Parameters:
state current state of the device returned from readDevice()
Returns:
true if the interval timer is stopped
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

isIntervalTimerAutomatic(byte[]) isIntervalTimerAutomatic

setIntervalTimerAutomatic(boolean, byte[]) setIntervalTimerAutomatic

setIntervalTimerRunState(boolean, byte[]) setIntervalTimerRunState

boolean isAutomaticDelayLong ( byte[]  state  ) 

Checks if the automatic delay for the Inteval Timer and the Cycle counter is either 3.5ms (regular) or 123ms (long).

Parameters:
state current state of the device returned from readDevice()
Returns:
true if the automatic interval/cycle counter delay is in the long (123ms) mode, else it is 3.5ms
See also:
com.dalsemi.onewire.container.OneWireSensor.readDevice()

setAutomaticDelayLong(boolean,byte[]) setAutomaticDelayLong

void setClock ( long  time,
byte[]  state 
)

Sets the Real-Time clock.

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

Parameters:
time new value for the Real-Time clock, in milliseconds since January 1, 1970
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

getClock(byte[])

Implements ClockContainer.

void setClockAlarm ( long  time,
byte[]  state 
) throws OneWireException

Sets the clock alarm.

The method writeDevice(byte[]) must be called to finalize changes to the device. Note that multiple 'set' methods can be called before one call to writeDevice(byte[]). Also note that not all clock devices have alarms. Check to see if this device has alarms first by calling the hasClockAlarm() method.

Parameters:
time - new value for the Real-Time clock alarm, in milliseconds since January 1, 1970
state current state of the device returned from readDevice()
Exceptions:
OneWireException if this device does not have clock alarms
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

hasClockAlarm()

isClockAlarmEnabled(byte[])

getClockAlarm(byte[])

isClockAlarming(byte[])

setClockAlarmEnable(boolean,byte[])

Implements ClockContainer.

void setClockRunEnable ( boolean  runEnable,
byte[]  state 
) throws OneWireException

Enables or disables the oscillator, turning the clock 'on' and 'off'.

The method writeDevice(byte[]) must be called to finalize changes to the device. Note that multiple 'set' methods can be called before one call to writeDevice(byte[]). Also note that not all clock devices can disable their oscillators. Check to see if this device can disable its oscillator first by calling the canDisableClock() method.

Parameters:
runEnable true to enable the clock oscillator
state current state of the device returned from readDevice()
Exceptions:
OneWireException if the clock oscillator cannot be disabled
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

canDisableClock()

isClockRunning(byte[])

Implements ClockContainer.

void setClockAlarmEnable ( boolean  alarmEnable,
byte[]  state 
) throws OneWireException

Enables or disables the clock alarm.

The method writeDevice(byte[]) must be called to finalize changes to the device. Note that multiple 'set' methods can be called before one call to writeDevice(byte[]). Also note that not all clock devices have alarms. Check to see if this device has alarms first by calling the hasClockAlarm() method.

Parameters:
alarmEnable true to enable the clock alarm
state current state of the device returned from readDevice()
Exceptions:
OneWireException if this device does not have clock alarms
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

hasClockAlarm()

isClockAlarmEnabled(byte[])

getClockAlarm(byte[])

setClockAlarm(long,byte[])

isClockAlarming(byte[])

Implements ClockContainer.

void setIntervalTimer ( long  time,
byte[]  state 
)

Sets the Interval Timer.

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

Parameters:
time interval in milliseconds to set (truncated to 1/256th of second)
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

getIntervalTimer(byte[]) getIntervalTimer

void setCycleCounter ( long  cycles,
byte[]  state 
)

Sets power Cycle Counter.

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

Parameters:
cycles initialize cycle counter value
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

getCycleCounter(byte[]) getCycleCounter

void setIntervalTimerAlarm ( long  time,
byte[]  state 
)

Sets the Interval Timer Alarm.

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

Parameters:
time in milliseconds to set the inverval timer
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

getIntervalTimerAlarm(byte[]) getIntervalTimerAlarm

void setCycleCounterAlarm ( long  cycles,
byte[]  state 
)

Sets the power Cycle Count Alarm.

This counter holds the number of times the DS1994 must experience power cycles before it generates an alarm. The method writeDevice(byte[]) must be called to finalize changes to the device. Note that multiple 'set' methods can be called before one call to writeDevice(byte[]).

Parameters:
cycles power Cycle Count alarm
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

getCycleCounterAlarm(byte[]) getCycleCounterAlarm

void writeProtectClock ( byte[]  state  ) 

Sets the write protect options for the Real-Time clock/Alarm.

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

WARNING: after calling this method and then writeDevice the device will be permanently write protected.

Parameters:
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

isClockWriteProtected(byte[]) isClockWriteProtected

void writeProtectIntervalTimer ( byte[]  state  ) 

Sets the write protect options for Interval Timer and Interval Timer Alarm register.

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

WARNING: after calling this method and then writeDevice the device will be permanently write protected.

Parameters:
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

isIntervalTimerWriteProtected(byte[]) isIntervalTimerWriteProtected

void writeProtectCycleCounter ( byte[]  state  ) 

Sets the write protect options for the Cycle Counter and Alarm register.

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

WARNING: after calling this method and then writeDevice the device will be permanently write protected.

Parameters:
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

isCycleCounterWriteProtected(byte[]) isCycleCounterWriteProtected

void setReadAfterExpire ( boolean  readAfter,
byte[]  state 
)

Sets the read state of the device after a write protected alarm has occured.

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

Parameters:
readAfter true to read device after it expires from a write protected alarm event
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

canReadAfterExpire(byte[]) canReadAfterExpire

void setIntervalTimerAutomatic ( boolean  autoTimer,
byte[]  state 
)

Sets the Interval timer to automatic or manual mode.

When in automatic mode, the interval counter will increment while the devices I/O line is high after the delay select period has elapsed (either 3.5 or 123 ms, see the isAutomaticDelayLong() method). The method writeDevice(byte[]) must be called to finalize changes to the device. Note that multiple 'set' methods can be called before one call to writeDevice(byte[]).

Parameters:
autoTimer true for the interval timer to operate in automatic mode
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

isIntervalTimerAutomatic(byte[]) isIntervalTimerAutomatic

void setIntervalTimerRunState ( boolean  runState,
byte[]  state 
)

Sets the Interval timer run/stop mode.

This only has meaning if the interval timer is in manual mode (not isIntervalTimerAutomatic()). The method writeDevice(byte[]) must be called to finalize changes to the device. Note that multiple 'set' methods can be called before one call to writeDevice(byte[]).

Parameters:
runState true to set the interval timer to run
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

isIntervalTimerAutomatic(byte[]) isIntervalTimerAutomatic

isIntervalTimerStopped(byte[]) isIntervalTimerStopped

void setAutomaticDelayLong ( boolean  delayLong,
byte[]  state 
)

Sets the automatic delay for the Inteval Timer and the Cycle counter to either 123ms (long) or 3.5ms (regular).

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

Parameters:
delayLong true to set the interval timer to cycle counter to increment after 123ms or false for 3.5ms
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

isAutomaticDelayLong(byte[]) isAutomaticDelayLong

void setIntervalTimerAlarmEnable ( boolean  alarmEnable,
byte[]  state 
)

Sets the Interval Timer Alarm enable.

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

Parameters:
alarmEnable true to enable the interval timer alarm
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

isIntervalTimerAlarmEnabled(byte[]) isIntervalTimerAlarmEnabled

void setCycleCounterAlarmEnable ( boolean  alarmEnable,
byte[]  state 
)

Sets the Cycle counter Alarm enable.

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

Parameters:
alarmEnable true to enable the cycle counter alarm
state current state of the device returned from readDevice()
See also:
com.dalsemi.onewire.container.OneWireSensor.writeDevice(byte[])

isCycleCounterAlarmEnabled(byte[]) isCycleCounterAlarmEnabled


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

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