|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcontrol.system.RTC
public class RTC
Controls JControls real time clock (RTC).
If the RTC is available as hardware on a battery powered device there are special options:
flash
bank. If the
alarm occurs during power on the currently running application has to poll
the isAlarm
method to find out (this works on all devices).
Sticker, PLUI (hardware), Stamp, SmartDisplay (software emulation) |
Field Summary | |
---|---|
static int |
DAILY
Alarm mode. |
static int |
DATED
Alarm mode. |
static int |
OFF
Alarm mode. |
Method Summary | |
---|---|
static int |
getAlarm(Time time)
Gets the alarm time and mode. |
static void |
getTime(Time time)
Gets the current time. |
static boolean |
isAlarm()
Checks if an alarm is pending. |
static void |
resetAlarm()
Resets a pending alarm. |
static void |
setAlarm(Time time,
int mode)
Sets the alarm time and mode. |
static void |
setTime(Time time)
Sets the current time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, notifyAll, wait |
Field Detail |
---|
public static final int DAILY
day
, month
and year
are ignored).
setAlarm(Time, int)
,
Constant Field Valuespublic static final int DATED
setAlarm(Time, int)
,
Constant Field Valuespublic static final int OFF
setAlarm(Time, int)
,
Constant Field ValuesMethod Detail |
---|
public static int getAlarm(Time time)
time
- this object is filled with the values of the point of time the RTC triggers alarm,
OFF
, DAILY
or DATED
.public static void getTime(Time time)
time
- this object is filled with the values of now (takes a snapshot).public static boolean isAlarm()
true
if somewhere in the past the RTC passed the alarm time,
this flag remains true
until resetAlarm()
was invoked.public static void resetAlarm()
public static void setAlarm(Time time, int mode)
time
- contains the specification of the point of time the RTC should trigger alarm,
time
may be null
, then the previous value won't be touched.
Note: seconds are ignored for alarm settings by the hardware RTC.mode
- the alarmmode to use, one of OFF
, DAILY
or DATED
.public static void setTime(Time time)
Time
object in the parameter.
time
- contains the specification of the point of time the RTC should run from.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |