|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.aplu.nxt.Tools
public class Tools
Class with some useful helper methods.
Constructor Summary | |
---|---|
Tools()
|
Method Summary | |
---|---|
static void |
delay(long duration)
Suspends execution of the current thread for the given amount of time. |
static java.lang.String |
getBtAddress()
Gets the Bluetooth address of the device. |
static java.lang.String |
getBtName()
Gets the Bluetooth friendly name of the device. |
static java.lang.String[] |
getKnownBtDevices()
Returns a list of all registered Bluetooth devices. |
static long |
getTime()
Gets the timer's time. |
static boolean |
isBtDeviceKnown(java.lang.String name)
|
static boolean |
putSleep()
Same as putSleep(int timeout) with timeout = 0 (timeout disalbed). |
static boolean |
putSleep(int timeout)
Puts the current thread in a wait state until wakeUp() is called or timeout (in ms) expires. |
static void |
startTimer()
Starts a timer or restart it by setting its time to zero. |
static void |
waitEnter()
Waits until ENTER button is hit. |
static void |
waitEnter(java.lang.String prompt)
Displays the prompt and waits until ENTER button is hit. |
static void |
waitEscape()
Waits until ESCAPE button is hit. |
static void |
waitEscape(java.lang.String prompt)
Displays the prompt and waits until ESCAPE button is hit. |
static void |
wakeUp()
Wakes up the waiting thread. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tools()
Method Detail |
---|
public static void startTimer()
public static long getTime()
public static void delay(long duration)
duration
- the duration (in ms)public static boolean putSleep(int timeout)
public static boolean putSleep()
public static void wakeUp()
public static void waitEnter()
public static void waitEnter(java.lang.String prompt)
public static void waitEscape()
public static void waitEscape(java.lang.String prompt)
public static java.lang.String getBtName()
public static java.lang.String getBtAddress()
public static java.lang.String[] getKnownBtDevices()
public static boolean isBtDeviceKnown(java.lang.String name)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |