tablet.js contains various methods for interacting with the tablet hardware. It also contains the event contains necessary for registering for tablet hardware events.
Field Summary | |
static java.lang.String |
EVENT_TABLET_CHARGE_CHANGE
The event constant used to register for the onTabletChargeChange event |
static int |
REXEC_SCRIPTING_FAILURE
If a script could not be generated with the requested command line |
static int |
SHUTDOWN_FORCE
Request that the system shutdown the OS and poweroff the hardware. |
static int |
SHUTDOWN_POWEROFF
Request that the system shutdown the OS and poweroff the hardware |
static int |
SHUTDOWN_REBOOT
Request that the system shutdown the OS and reboot the hardware |
static int |
TABLET_LED_COLOR_GREEN
Specifies the tablet's green LED |
static int |
TABLET_LED_COLOR_ORANGE
Specifies the tablet's orange LED |
static int |
TABLET_LED_STATE_BLINK
LED is or should be blinking |
static int |
TABLET_LED_STATE_OFF
LED is or should be off |
static int |
TABLET_LED_STATE_ON
LED is or should be on |
static int |
TABLET_LED_STATE_UNKNOWN
The state of the specified LED is unknown |
Method Summary | |
int |
getClientStackVersion()
Obtains the client stack build number |
int |
getTabletCharge()
Obtains the current tablet charge |
int |
getTabletChargeChangeThreshold()
Obtains the tablet's charge change threshold |
java.lang.String |
getTabletID()
Gets the tablet's unique identifier (Wireless card MAC address, colon delimited) |
int |
getTabletLED(byte color)
Obtain the state of a LED on the tablet |
void |
onTabletChargeChange(int percent)
This is the prototype for an event. |
int |
rexec(java.lang.String command)
The ability to provide this function is currently under scrutiny Attempts to remotely invoke a command line operation. |
boolean |
setClockDay(java.lang.String day)
Sets the day element of the OS clock |
boolean |
setClockHour(java.lang.String hour)
Sets the hour element of the OS clock |
boolean |
setClockMinute(java.lang.String minute)
Sets the minute element of the OS clock |
boolean |
setClockMonth(java.lang.String month)
Sets the month element of the OS clock |
boolean |
setClockYear(java.lang.String year)
Sets the year element of the OS clock |
boolean |
setTabletChargeChangeThreshold(int threshold)
Sets the tablet's charge change threshold |
boolean |
setTabletLED(byte color,
int state)
Set the state of a LED on the tablet |
void |
shutdown(int request)
Requests that the tablet shutdown |
Field Detail |
public static final java.lang.String EVENT_TABLET_CHARGE_CHANGE
basic.registerForEvent(String)
,
Constant Field Valuespublic static final int SHUTDOWN_REBOOT
shutdown(int)
,
Constant Field Valuespublic static final int SHUTDOWN_POWEROFF
shutdown(int)
,
Constant Field Valuespublic static final int SHUTDOWN_FORCE
shutdown(int)
,
Constant Field Valuespublic static final int REXEC_SCRIPTING_FAILURE
rexec(java.lang.String)
,
Constant Field Valuespublic static final int TABLET_LED_STATE_UNKNOWN
setTabletLED(byte, int)
,
getTabletLED(byte)
,
Constant Field Valuespublic static final int TABLET_LED_STATE_ON
setTabletLED(byte, int)
,
getTabletLED(byte)
,
Constant Field Valuespublic static final int TABLET_LED_STATE_OFF
setTabletLED(byte, int)
,
getTabletLED(byte)
,
Constant Field Valuespublic static final int TABLET_LED_STATE_BLINK
setTabletLED(byte, int)
,
getTabletLED(byte)
,
Constant Field Valuespublic static final int TABLET_LED_COLOR_GREEN
public static final int TABLET_LED_COLOR_ORANGE
Method Detail |
public void onTabletChargeChange(int percent)
percent
- The current battery charge percentageEVENT_TABLET_CHARGE_CHANGE
Host Application | com.ibm.retail.saf.wata.host.settings.SettingsAgentManager |
Host Applet | PowerManagementHostApplet (TBD) |
Flow | The host applet will query a setting handler that reads the current battery level
from /proc/apm at regular intervals (e.g. 1 minute) to monitor
change in the battery level. When the threshold is crossed, this event will be fired. Uses: get hardware/power/battery.percentage |
public int getTabletCharge()
Host Application | com.ibm.retail.saf.wata.host.settings.SettingsAgentManager |
Host Applet | PowerManagementHostApplet (TBD) |
Flow | Uses: get hardware/power/battery.percentage |
public boolean setTabletChargeChangeThreshold(int threshold)
threshold
- The delta threshold at which to deliver an "onChargeChange" event
onTabletChargeChange( int )
Host Application | N/A |
Host Applet | PowerManagementHostApplet (TBD) |
Flow | This setting will be maintined by the host applet. The setting is not persistent between power cycles. |
public int getTabletChargeChangeThreshold()
Host Application | N/A |
Host Applet | PowerManagementHostApplet (TBD) |
Flow | This setting will be maintined by the host applet. The setting is not persistent between power cycles. |
public java.lang.String getTabletID()
Host Application | com.ibm.retail.saf.wata.host.settings.SettingsAgentManager |
Host Applet | SettingsApplet |
Flow | Uses: get hardware/tablet.id |
public boolean setClockYear(java.lang.String year)
year
- Year representation (e.g. 2005)
public boolean setClockMonth(java.lang.String month)
month
- Month representation (e.g. 04)
public boolean setClockDay(java.lang.String day)
day
- Day representation (e.g. 04)
public boolean setClockHour(java.lang.String hour)
hour
- Hour representation (e.g. 04)
public boolean setClockMinute(java.lang.String minute)
minute
- Minute representation (e.g. 04)
public void shutdown(int request)
request
- The type of shutdown to performSHUTDOWN_POWEROFF
,
SHUTDOWN_REBOOT
,
SHUTDOWN_FORCE
Host Application | com.ibm.retail.saf.wata.host.settings.SettingsAgentManagerr |
Host Applet | SettingsApplet |
Flow | Uses: set (state) hardware/power/system.state |
public int rexec(java.lang.String command)
command
- A string representing a command as entered on a command line
REXEC_SCRIPTING_FAILURE
Host Application | com.ibm.retail.saf.wata.host.settings.SettingsAgentManager |
Host Applet | SettingsApplet |
Flow | Uses: set (command name) os/remote.execute (arguments..) |
public int getClientStackVersion()
Host Application | com.ibm.retail.saf.wata.host.settings.SettingsAgentManager |
Host Applet | SettingsApplet |
Flow | Uses: get software/stack/stack.version |
public boolean setTabletLED(byte color, int state)
color
- The color of the LED to change statesstate
- The new state of the LED
TABLET_LED_COLOR_GREEN
,
TABLET_LED_COLOR_ORANGE
,
TABLET_LED_STATE_OFF
,
TABLET_LED_STATE_ON
,
TABLET_LED_STATE_BLINK
Host Application | com.ibm.retail.saf.wata.host.settings.SettingsAgentManager |
Host Applet | SettingsApplet |
Flow | Uses: set (state) hardware/led/(color) |
public int getTabletLED(byte color)
color
- The color of the LED to query
TABLET_LED_COLOR_GREEN
,
TABLET_LED_COLOR_ORANGE
,
TABLET_LED_STATE_OFF
,
TABLET_LED_STATE_ON
,
TABLET_LED_STATE_BLINK
,
TABLET_LED_STATE_UNKNOWN
Host Application | com.ibm.retail.saf.wata.host.settings.SettingsAgentManager |
Host Applet | SettingsApplet |
Flow | Uses: get hardware/led/(color) |