|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.stanford.hci.r3.devices.Device
public class Device
Applications can also include devices, which can supply input and receive output. Since devices may not be attached to the local machine where you are running the program, we need to assign a hostname to each device.
Devices work closely with the Actions API. Basically, devices are constructs that allow us to send events and actions to remote machines...
This software is distributed under the BSD License.
Constructor Summary | |
---|---|
Device(java.lang.String theHostNameOrIPAddr,
java.lang.String descriptiveName)
Provide an IP address of a remote device that is listening for actions. |
Method Summary | |
---|---|
void |
connect()
Once we have connected, we can start sending this device commands.... |
void |
disconnect()
|
static OpenFileAction |
doOpenFile(java.io.File file)
Opens a file on the local device, using the default file editor. |
static void |
doOpenURL(java.lang.String urlString)
Opens a URL on the local machine. |
static PlaySoundAction |
doPlaySound(java.io.File soundFile)
Plays the sound file on the local device. |
static void |
doSpeakText(java.lang.String textToSpeak)
|
ActionChannel |
getActionChannel()
|
AudioChannel |
getAudioChannel()
The audio channel provides convenience functions to easily play audio or read text on this device. |
DisplayChannel |
getDisplayChannel()
Access the display. |
java.lang.String |
getName()
|
void |
invokeAction(R3Action action)
Send actions directly to the REMOTE device that this Device object represents. |
boolean |
isAlive()
Instead of pinging, we check if a device is "reachable" by making sure it has a host address. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Device(java.lang.String theHostNameOrIPAddr, java.lang.String descriptiveName)
Method Detail |
---|
public static PlaySoundAction doPlaySound(java.io.File soundFile)
soundFile
-
public void connect()
public void disconnect()
public ActionChannel getActionChannel()
public AudioChannel getAudioChannel()
public DisplayChannel getDisplayChannel()
public java.lang.String getName()
public void invokeAction(R3Action action)
action
- public boolean isAlive()
public static void doSpeakText(java.lang.String textToSpeak)
textToSpeak
- public static void doOpenURL(java.lang.String urlString)
public static OpenFileAction doOpenFile(java.io.File file)
file
-
|
Copyright 2006 Stanford University | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |