|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
1-Wire clock interface class for basic real-time-clock operations. This class should be implemented for each clock type 1-Wire device.
| Method Summary | |
boolean |
canDisableClock()
Query to see if the clock can be disabled. |
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 |
boolean |
hasClockAlarm()
Query to see if the clock has an alarm feature. |
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 Clock Alarm flag has been set from the state data retrieved from the 'readDevice()' method. |
boolean |
isClockRunning(byte[] state)
This method checks if the device's oscilator is enabled. |
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. |
| Methods inherited from interface com.dalsemi.onewire.container.OneWireSensor |
readDevice, writeDevice |
| Method Detail |
public boolean hasClockAlarm()
public boolean canDisableClock()
public long getClockResolution()
public long getClock(byte[] state)
state - - byte array of device statelong<\code> time - in milliseconds that have
occured since 1970.
public long getClockAlarm(byte[] state)
throws OneWireException
state - - byte array of device statelong<\code> time - in milliseconds that have
the clock alarm is set to.public boolean isClockAlarming(byte[] state)
state - - byte array of device stateboolean<\code> true if clock is alarmingpublic boolean isClockAlarmEnabled(byte[] state)
state - - byte array of device stateboolean<\code> true if clock alarm is enabledpublic boolean isClockRunning(byte[] state)
state - - byte array of device stateboolean<\code> true
public void setClock(long time,
byte[] state)
time - - long<\code> milliseconds the user
wants the Clock set to.state - - byte array of device state
public void setClockAlarm(long time,
byte[] state)
throws OneWireException
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)
throws OneWireException
runEnable - - boolean, true if want the clock oscillator to
be enabled.state - - byte array of device state
public void setClockAlarmEnable(boolean alarmEnable,
byte[] state)
throws OneWireException
alarmEnable - - boolean, true to enable the clock alarmstate - - byte array of device state
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||