|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dalsemi.onewire.container.OneWireContainer | +--com.dalsemi.onewire.container.OneWireContainer04
iButton container for iButton family type 04 (hex), DS1994/DS2404.
Field Summary | |
static int |
BITMAP_OFFSET
Offset of BITMAP in array returned from read registers |
static int |
CONTROL_OFFSET
Offset of control register from read registers |
static int |
COUNTER_ALARM_OFFSET
Offset of counter-alarm in array returned from read registers |
static int |
COUNTER_OFFSET
Offset of counter in array returned from read registers |
static int |
INTERVAL_ALARM_OFFSET
Offset of inverval-counter-alarm in array returned from read registers |
static int |
INTERVAL_OFFSET
Offset of inverval-counter in array returned from read registers |
static int |
RTC_ALARM_OFFSET
Offset of real-time-clock-alarm in array returned from read registers |
static int |
RTC_OFFSET
Offset of real-time-clock in array returned from read registers |
static int |
STATUS_OFFSET
Offset of status register from read registers |
Constructor Summary | |
OneWireContainer04()
Default constructor |
|
OneWireContainer04(DSPortAdapter sourceAdapter,
byte[] newAddress)
Create a container with a provided adapter object and the address of the iButton or 1-Wire device. |
|
OneWireContainer04(DSPortAdapter sourceAdapter,
long newAddress)
Create a container with a provided adapter object and the address of the iButton or 1-Wire device. |
|
OneWireContainer04(DSPortAdapter sourceAdapter,
java.lang.String newAddress)
Create a container with a provided adapter object and the address of the iButton or 1-Wire device. |
Method Summary | |
boolean |
canDisableClock()
Query to see if the clock can be disabled. |
boolean |
canReadAfterExpire(byte[] state)
This method checks if the device can be read after a write protected alarm has occured from the provided clock register page retrieved from the 'readClockRegisters()' method. |
java.lang.String |
getAlternateNames()
Retrieve the alternate Dallas Semiconductor part numbers or names. |
long |
getClock(byte[] state)
This method extracts the Clock Value in milliseconds from the state data retrieved from the 'readDevice()' method. |
long |
getClockAlarm(byte[] state)
This method extracts the Clock Alarm Value from the provided state data retrieved from the 'readDevice()' method. |
long |
getClockResolution()
Query to get the clock resolution in milliseconds |
long |
getCycleCounter(byte[] state)
This method extracts the cycle count Value from the clock register page retrieved from the 'readClockRegisters()' method. |
long |
getCycleCounterAlarm(byte[] state)
This method retrieves the cycle count Alarm Value from the DS1994. |
java.lang.String |
getDescription()
Retrieve a short description of the function of the iButton type. |
long |
getIntervalTimer(byte[] state)
This method extracts the Interval Timer Value in milliseconds from the clock register page retrieved from the 'readClockRegisters()' method. |
long |
getIntervalTimerAlarm(byte[] state)
This method extracts the Interval Timer Alarm Value from the provided clock register page retrieved from the 'readClockRegisters()' method. |
java.util.Enumeration |
getMemoryBanks()
Return an enumeration of memory banks. |
java.lang.String |
getName()
Retrieve the Dallas Semiconductor part number of the iButton as a string. |
boolean |
hasClockAlarm()
Query to see if the clock has an alarm feature. |
boolean |
isAutomaticDelayLong(byte[] state)
This method checks if the automatic delay for the Inteval Timer and the Cycle counter is either 3.5ms (regular) or 123ms (long). |
boolean |
isClockAlarmEnabled(byte[] state)
This method checks if the Clock Alarm is enabled from the provided state data retrieved from the 'readDevice()' method. |
boolean |
isClockAlarming(byte[] state)
This method checks if the Real-Time Alarm flag has been set from the provided clock register page retrieved from the 'readClockRegisters()' method. |
boolean |
isClockRunning(byte[] state)
This method checks if the device's oscilator is enabled. |
boolean |
isClockWriteProtected(byte[] state)
This method checks if the Real-Time clock/Alarm is write protected from the provided clock register page retrieved from the 'readClockRegisters()' method. |
boolean |
isCycleCounterAlarmEnabled(byte[] state)
This method checks if the Cycle Alarm is enabled from the provided clock register page retrieved from the 'readClockRegisters()' method. |
boolean |
isCycleCounterAlarming(byte[] state)
This method checks if the Cycle Alarm flag has been set from the provided clock register page retrieved from the 'readClockRegisters()' method. |
boolean |
isCycleCounterWriteProtected(byte[] state)
This method checks if the Cycle Counter and Alarm is write protected from the provided clock register page retrieved from the 'readClockRegisters()' method. |
boolean |
isIntervalTimerAlarmEnabled(byte[] state)
This method checks if the Interval Timer Alarm is enabled from the provided clock register page retrieved from the 'readClockRegisters()' method. |
boolean |
isIntervalTimerAlarming(byte[] state)
This method checks if the Interval Timer Alarm flag has been set from the provided clock register page retrieved from the 'readClockRegisters()' method. |
boolean |
isIntervalTimerAutomatic(byte[] state)
This method checks if the Interval timer is automatic or manual. |
boolean |
isIntervalTimerStopped(byte[] state)
This method checks if the Interval timer is stopped. |
boolean |
isIntervalTimerWriteProtected(byte[] state)
This method checks if the Interval Timer and Interval Timer Alarm register is write protected from the provided clock register page retrieved from the 'readClockRegisters()' method. |
byte[] |
readDevice()
This method retrieves the entire clock register page. |
void |
setAutomaticDelayLong(boolean delayLong,
byte[] state)
This method sets the automatic delay for the Inteval Timer and the Cycle counter is either 123ms (long) or 3.5ms (regular). |
void |
setClock(long time,
byte[] state)
This method sets the Clock time in the provided state data Use the method 'writeDevice()' with this data to finalize the change to the device. |
void |
setClockAlarm(long time,
byte[] state)
This method sets the Clock Alarm in the provided state data. |
void |
setClockAlarmEnable(boolean alarmEnable,
byte[] state)
This method sets the Clock Alarm enable. |
void |
setClockRunEnable(boolean runEnable,
byte[] state)
This method sets the oscillator enable to the specified value. |
void |
setCycleCounter(long cycles,
byte[] state)
This method sets Cycle counter in the provided clock register data field. |
void |
setCycleCounterAlarm(long cycles,
byte[] state)
This method sets the Cycle Count Alarm in the provided clock register data field. |
void |
setCycleCounterAlarmEnable(boolean alarmEnable,
byte[] state)
This method sets the Cycle counter Alarm enable. |
void |
setIntervalTimer(long time,
byte[] state)
This method sets the Interval Timer in the provided clock register data field. |
void |
setIntervalTimerAlarm(long time,
byte[] state)
This method sets the Interval Timer Alarm in the provided clock register data field. |
void |
setIntervalTimerAlarmEnable(boolean alarmEnable,
byte[] state)
This method sets the Interval Timer Alarm enable. |
void |
setIntervalTimerAutomatic(boolean autoTimer,
byte[] state)
This method sets the Interval timer in automatic or manual. |
void |
setIntervalTimerRunState(boolean runState,
byte[] state)
This method sets the Interval timer run/stop mode. |
void |
setReadAfterExpire(boolean readAfter,
byte[] state)
This method sets the read state of the device after write protected alarm has occured. |
void |
writeDevice(byte[] state)
This method write the bytes in the provided clock register page that have been changed by the 'set' methods. |
void |
writeProtectClock(byte[] state)
This method sets the write protect options for the Real-Time clock/Alarm in the provided clock register page retrieved from the 'readClockRegisters()' method. |
void |
writeProtectedCycleCounter(byte[] state)
This method sets the write protect options for the Cycle Counter and Alarm register in the provided clock register page retrieved from the 'readClockRegisters()' method. |
void |
writeProtectedIntervalTimer(byte[] state)
This method sets the write protect options for Interval Timer and Interval Timer Alarm register in the provided clock register page retrieved from the 'readClockRegisters()' method. |
Methods inherited from class com.dalsemi.onewire.container.OneWireContainer |
doSpeed, getAdapter, getAddress, getAddressAsLong, getAddressAsString, getMaxSpeed, isAlarming, isPresent, setSpeed, setupContainer, setupContainer, setupContainer |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BITMAP_OFFSET
public static final int STATUS_OFFSET
public static final int CONTROL_OFFSET
public static final int RTC_OFFSET
public static final int INTERVAL_OFFSET
public static final int COUNTER_OFFSET
public static final int RTC_ALARM_OFFSET
public static final int INTERVAL_ALARM_OFFSET
public static final int COUNTER_ALARM_OFFSET
Constructor Detail |
public OneWireContainer04()
public OneWireContainer04(DSPortAdapter sourceAdapter, byte[] newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire devicepublic OneWireContainer04(DSPortAdapter sourceAdapter, long newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire devicepublic OneWireContainer04(DSPortAdapter sourceAdapter, java.lang.String newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire deviceMethod Detail |
public java.lang.String getName()
getName
in class OneWireContainer
public java.lang.String getAlternateNames()
getAlternateNames
in class OneWireContainer
public java.lang.String getDescription()
getDescription
in class OneWireContainer
public java.util.Enumeration getMemoryBanks()
getMemoryBanks
in class OneWireContainer
com.dalsemi.onewire.container.OneWireContainer
public boolean hasClockAlarm()
hasClockAlarm
in interface ClockContainer
public boolean canDisableClock()
canDisableClock
in interface ClockContainer
public long getClockResolution()
getClockResolution
in interface ClockContainer
public byte[] readDevice() throws OneWireIOException, OneWireException
readDevice
in interface OneWireSensor
OneWireIOException
- OneWireException
- public void writeDevice(byte[] state) throws OneWireIOException, OneWireException
writeDevice
in interface OneWireSensor
state
- - byte array of clock register page contentsOneWireIOException
- OneWireException
- public long getClock(byte[] state)
getClock
in interface ClockContainer
state
- - byte array of device statelong<\code> time - in milliseconds that have
occured since 1970.
public long getClockAlarm(byte[] state)
getClockAlarm
in interface ClockContainer
state
- - byte array of device statelong<\code> time - in milliseconds that have
the clock alarm is set to.
public boolean isClockAlarming(byte[] state)
isClockAlarming
in interface ClockContainer
state
- - byte array of clock register page contentspublic boolean isClockAlarmEnabled(byte[] state)
isClockAlarmEnabled
in interface ClockContainer
state
- - byte array of device stateboolean<\code> true if clock alarm is enabled
public boolean isClockRunning(byte[] state)
isClockRunning
in interface ClockContainer
state
- - byte array of device stateboolean<\code> true
public long getIntervalTimer(byte[] state)
state
- - byte array of clock register page contentspublic long getCycleCounter(byte[] state)
state
- - byte array of clock register page contentspublic long getIntervalTimerAlarm(byte[] state)
state
- - byte array of clock register page contentspublic long getCycleCounterAlarm(byte[] state)
state
- - byte array of clock register page contentspublic boolean isIntervalTimerAlarming(byte[] state)
state
- - byte array of clock register page contentspublic boolean isCycleCounterAlarming(byte[] state)
state
- - byte array of clock register page contentspublic boolean isIntervalTimerAlarmEnabled(byte[] state)
state
- - byte array of clock register page contentspublic boolean isCycleCounterAlarmEnabled(byte[] state)
state
- - byte array of clock register page contentspublic boolean isClockWriteProtected(byte[] state)
state
- - byte array of clock register page contentspublic boolean isIntervalTimerWriteProtected(byte[] state)
state
- - byte array of clock register page contentspublic boolean isCycleCounterWriteProtected(byte[] state)
state
- - byte array of clock register page contentspublic boolean canReadAfterExpire(byte[] state)
state
- - byte array of clock register page contentspublic boolean isIntervalTimerAutomatic(byte[] state)
state
- - byte array of clock register page contentspublic boolean isIntervalTimerStopped(byte[] state)
state
- - byte array of clock register page contentspublic boolean isAutomaticDelayLong(byte[] state)
state
- - byte array of clock register page contentspublic void setClock(long time, byte[] state)
setClock
in interface ClockContainer
time
- - long<\code> milliseconds the user
wants the Clock set to.state
- - byte array of device state
public void setClockAlarm(long time, byte[] state)
setClockAlarm
in interface ClockContainer
time
- - long<\code> milliseconds the user
wants the Clock alarm set to.state
- - byte array of device state
public void setClockRunEnable(boolean runEnable, byte[] state)
setClockRunEnable
in interface ClockContainer
runEnable
- - boolean, true if want the clock oscillator to
be enabled.state
- - byte array of device statepublic void setClockAlarmEnable(boolean alarmEnable, byte[] state)
setClockAlarmEnable
in interface ClockContainer
alarmEnable
- - boolean, true to enable the clock alarmstate
- - byte array of device statepublic void setIntervalTimer(long time, byte[] state) throws java.lang.IllegalArgumentException
time
- state
- - byte array of clock register page contentsjava.lang.IllegalArgumentException
- public void setCycleCounter(long cycles, byte[] state) throws java.lang.IllegalArgumentException
cycles
- state
- - byte array of clock register page contentsjava.lang.IllegalArgumentException
- public void setIntervalTimerAlarm(long time, byte[] state) throws java.lang.IllegalArgumentException
time
- state
- - byte array of clock register page contentsjava.lang.IllegalArgumentException
- public void setCycleCounterAlarm(long cycles, byte[] state) throws java.lang.IllegalArgumentException
cycles
- state
- - byte array of clock register page contentsjava.lang.IllegalArgumentException
- public void writeProtectClock(byte[] state)
state
- - byte array of clock register page contentspublic void writeProtectedIntervalTimer(byte[] state)
state
- - byte array of clock register page contentspublic void writeProtectedCycleCounter(byte[] state)
state
- - byte array of clock register page contentspublic void setReadAfterExpire(boolean readAfter, byte[] state)
readAfter
- - boolean, true if want to read device after it
expires from a write protected alarm event.state
- - byte array of clock register page contentspublic void setIntervalTimerAutomatic(boolean autoTimer, byte[] state)
autoTimer
- - boolean, true if want the interval timer to operate in
automatic mode. The interval timer will then run whenever
the IO pin is higth for at least the delay-select time.state
- - byte array of clock register page contentspublic void setIntervalTimerRunState(boolean runState, byte[] state)
runState
- - boolean, true if want the interval timer run.
The interval timer must be in manual mode for
this to have an effect.state
- - byte array of clock register page contentspublic void setAutomaticDelayLong(boolean delayLong, byte[] state)
delayLong
- - boolean, true if want the interval timer in
automatic mode and cycle counter to increment
after 123ms. 'false' if 3.5ms is desired.state
- - byte array of clock register page contentspublic void setIntervalTimerAlarmEnable(boolean alarmEnable, byte[] state)
alarmEnable
- - boolean, true if want the interval-timer-alarm
enabled.state
- - byte array of clock register page contentspublic void setCycleCounterAlarmEnable(boolean alarmEnable, byte[] state)
alarmEnable
- - boolean, true if want the cycle-counter-alarm
enabled.state
- - byte array of clock register page contents
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |