|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object OEM com.motorola.oem.osc.OSC
public class OSC
The OSC class provides control over the OEM system.OSC (OEM System Control) features:
Field Summary | |
---|---|
static int |
POWER_UP_ALARM
The unit was waked up by unit's Alarm. |
static int |
POWER_UP_FATAL_ERROR
Fatal error. |
static int |
POWER_UP_IGNITION
Ignition Power Up. |
static int |
POWER_UP_MAIN_WATCHDOG
The unit was restarted as a result of main Watchdog. |
static int |
POWER_UP_MIDLET_SW
Restart caused by User MIDlet. |
static int |
POWER_UP_MIDLET_WATCHDOG
The unit was restarted as a result of MIDlet Watchdog. |
static int |
POWER_UP_NORMAL
Normal Power Up. |
static int |
POWER_UP_UNKNOWN_REASON
Unknown power up reason. |
Method Summary | |
---|---|
static void |
antennaStatusChangeReportEnable(boolean enable)
Enables/disables antenna presence status events. |
static void |
batteryLevelChangeReportEnable(boolean enable)
Enables/disables battery voltage changes events. |
static void |
enableAlarm(boolean enable)
Enables/Disables Alarm. |
static void |
enableDateTimeNetworkUpdate(boolean enable)
Enables/Disables date & time Network update. |
static void |
enableLowPowerMode(boolean enable)
Enables/Disables Low Power Mode. |
static void |
enableLowPowerMode(boolean enable,
int delay)
Enables/Disables Low Power Mode. |
static void |
enableRFOperations(boolean enable)
Enables/Disables RF Operations - Rx and Tx. |
static void |
forcePowerDown()
Forces power down. |
static byte[] |
getAlarm()
Gets Alarm date-time setting. |
static int |
getBatteryLevel()
Reads battery voltage in milliVolts. |
static byte[] |
getDateTime()
Gets current date & time. |
static int[] |
getHighTemperatureThresholds()
Gets high and low thresholds for high temperature events. |
static int |
getLowPowerModeDelay()
Get current Low Power Mode delay. |
static int |
getPowerUpReason()
Gets power-up reason. |
static java.lang.String |
getProperty(java.lang.String key)
Gets system's property value indicated by the specified key. |
static int |
getTemperature()
Gets device temperature. |
static void |
highTemperatureReportEnable(boolean enable)
Enables/disables high temperature events. |
static boolean |
isAlarmEnabled()
Check whether Alarm is enabled. |
static boolean |
isAntennaAttached()
Checks whether the antenna is attached. |
static boolean |
isDateTimeAvailable()
Check whether date & time are available. |
static boolean |
isDateTimeNetworkUpdateModeEnabled()
Check whether Network update date & time is enabled. |
static boolean |
isHighTemperatureReportEnabled()
Checks whether temperature events are enabled. |
static boolean |
isLowPowerModeEnabled()
Check whether Low Power Mode is enabled. |
static boolean |
isRFOperationsEnabled()
Check whether RF operations are enabled. |
static void |
kickMIDletWatchdog()
Kick Watchdog to reset its timer. |
static void |
restartMIDlet()
Restarts the running MIDlet The Virtual Machine destroys the running MIDlet and then re-starts it. |
static void |
setAlarm(byte[] date_time)
Sets Alarm date-time data. |
static void |
setAlarmListener(OSCAlarmListener listener)
Sets a listener for alarm events. |
static void |
setAntennaListener(OSCAntennaListener listener)
Sets a listener for antenna's status changes. |
static void |
setBatteryListener(OSCBatteryListener listener)
Sets a listener for battery measurements changes. |
static void |
setDateTime(byte[] date_time)
Sets current date & time. |
static void |
setDateTimeListener(OSCDateTimeListener listener)
Sets a listener for date and time state changes. |
static void |
setHighTemperatureThresholds(int LowThreshold,
int HighThreshold)
Sets high and low thresholds for high temperature events. |
static void |
setProperty(java.lang.String key,
java.lang.String value)
Sets system's property value indicated by the specified key. |
static void |
setTemperatureListener(OSCTemperatureListener listener)
Sets a listener for temperature measurements changes. |
static void |
setWdogListener(OSCWdogListener listener)
Sets a listener for watchdog pings. |
static void |
startMIDletWatchdog(int time)
Starts MIDlet Watchdog. |
static void |
stopMIDletWatchdog()
Stops MIDlet Watchdog. |
static void |
swReset()
Software restart. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int POWER_UP_UNKNOWN_REASON
public static final int POWER_UP_NORMAL
public static final int POWER_UP_IGNITION
public static final int POWER_UP_MAIN_WATCHDOG
public static final int POWER_UP_ALARM
public static final int POWER_UP_MIDLET_WATCHDOG
public static final int POWER_UP_MIDLET_SW
public static final int POWER_UP_FATAL_ERROR
Method Detail |
---|
public static void enableLowPowerMode(boolean enable, int delay) throws OSCException
enable
- 'true' to enable , 'false' to disabledelay
- Time (in seconds) to delay entering low power mode (1 - 255 sec)
OSCException
- delay's value is out of rangepublic static void enableLowPowerMode(boolean enable) throws OSCException
enable
- 'true' to enable, 'false' to disable
OSCException
public static boolean isLowPowerModeEnabled()
public static int getLowPowerModeDelay()
public static void enableRFOperations(boolean enable)
enable
- 'true' to enable, 'false' to disablepublic static boolean isRFOperationsEnabled()
public static boolean isDateTimeAvailable()
Check whether date & time are available.Date & time will be available after network update or after using
setDateTime(byte[])
.
See device's User Guide for date & time proper usage.
public static boolean isDateTimeNetworkUpdateModeEnabled()
public static void enableDateTimeNetworkUpdate(boolean enable)
enable
- 'true' to enable, 'false' to disablepublic static byte[] getDateTime() throws OSCException
OSCException
- Date & time is not availableisDateTimeAvailable()
public static void setDateTime(byte[] date_time) throws OSCException
date_time
- array which represents date & time data getDateTime()
OSCException
- Network update is enabled or parameters are out of rangepublic static boolean isAlarmEnabled()
public static void enableAlarm(boolean enable) throws OSCException
enable
- 'true' to enable Alarm , 'false' to disable.
OSCException
- Date and Time are not availablepublic static byte[] getAlarm()
getDateTime()
spublic static void setAlarm(byte[] date_time) throws OSCException
date_time
- Array representing date-time data getDateTime()
OSCException
- Network update is enabled or parameters are out of rangepublic static void swReset()
public static void forcePowerDown()
public static int getPowerUpReason()
POWER_UP_UNKNOWN_REASON
,POWER_UP_NORMAL
,POWER_UP_IGNITION
,POWER_UP_MAIN_WATCHDOG
,POWER_UP_ALARM
,POWER_UP_MIDLET_WATCHDOG
,POWER_UP_MIDLET_SW
,POWER_UP_FATAL_ERROR
.public static void startMIDletWatchdog(int time) throws OSCException
time
- Watchdog timer intervals (Valid values: 60 sec - 3600 sec)
OSCException
- Parameter 'time' is out of range.setWdogListener(com.motorola.oem.osc.OSCWdogListener)
,
kickMIDletWatchdog()
public static void stopMIDletWatchdog()
Stops MIDlet Watchdog.(See device's USER GUIDE for more information).
public static void kickMIDletWatchdog()
Kick Watchdog to reset its timer.
OSCWdogListener.onMidletWdogPing()
may be used to contain the call to this method.
public static int getBatteryLevel()
public static void batteryLevelChangeReportEnable(boolean enable)
enable
- 'true' to enable battery level events , 'false' to disable.public static boolean isAntennaAttached()
public static void antennaStatusChangeReportEnable(boolean enable)
enable
- 'true' to enable antenna's status events, 'false' to disablepublic static int getTemperature()
Gets device temperature.(See device's USER GUIDE for A2D units' mapping information).
public static void setHighTemperatureThresholds(int LowThreshold, int HighThreshold) throws OSCException
Sets high and low thresholds for high temperature events.Event will occur if temperature crosses both threshold levels (from low to high and from high to low).
LowThreshold
- Low level thresholdHighThreshold
- High level threshold
OSCException
- High threshold is lower than or equal to low threshold.public static void highTemperatureReportEnable(boolean enable)
Enables/disables high temperature events.Note: Once high temperature notification (report) is enabled, the first notification will always be: 'high temperature'. Afterwards, a notification will be sent upon any direction of threshold crossing.
enable
- 'true' to enable high temperature events, 'false' otherwise.setHighTemperatureThresholds(int, int)
,
setTemperatureListener(com.motorola.oem.osc.OSCTemperatureListener)
public static boolean isHighTemperatureReportEnabled()
public static int[] getHighTemperatureThresholds()
public static final java.lang.String getProperty(java.lang.String key) throws OSCException
Gets system's property value indicated by the specified key.(For available keys refer to the device's USER GUIDE).
key
- Property's name.
null
if there is no property with that key
java.lang.NullPointerException
- key
is null
.
java.lang.IllegalArgumentException
- if key
is empty.
OSCException
- The key is invalid (GET_PROPERTY_KEY_NOT_FOUND_ERROR, error code 100)public static void setProperty(java.lang.String key, java.lang.String value) throws OSCException
Sets system's property value indicated by the specified key.(For available keys refer to the device's USER GUIDE).
key
- The property's namevalue
- The property's string value
java.lang.NullPointerException
- key
is null
java.lang.IllegalArgumentException
- key
is empty
java.lang.NullPointerException
- value
is null
OSCException
- The key is invalid (SET_PROPERTY_KEY_NOT_FOUND_ERROR, error code 102)public static void setAntennaListener(OSCAntennaListener listener)
Sets a listener for antenna's status changes.
OSCAntennaListener.onAntennaStatusChanged(boolean)
public static void setAlarmListener(OSCAlarmListener listener)
Sets a listener for alarm events.
OSCAlarmListener.onAlarm()
public static void setBatteryListener(OSCBatteryListener listener)
Sets a listener for battery measurements changes.
OSCBatteryListener.onBatteryLevelChanged(int)
public static void setDateTimeListener(OSCDateTimeListener listener)
Sets a listener for date and time state changes.
OSCDateTimeListener.onDateTimeStateChanged(int)
public static void setTemperatureListener(OSCTemperatureListener listener)
Sets a listener for temperature measurements changes.
OSCTemperatureListener.onHighTemperature(int)
public static void setWdogListener(OSCWdogListener listener)
Sets a listener for watchdog pings.
OSCWdogListener.onMidletWdogPing()
public static void restartMIDlet()
Restarts the running MIDletThe Virtual Machine destroys the running MIDlet and then re-starts it.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |