|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.sun.spot.peripheral.basestation.BaseStation
public class BaseStation
This class implements a base station that allows a PC (the "host") to communicate
to a standalone Spot ("the target") through a second Spot (the "base station")
connected to the host via a test board and usb cable.
To use, write an application that launches the base station:
...
new BaseStation().initialize();
...
To write applications for the host, use the hostagent jar supplied in the devkit. Target Spots should
be addressed directly from the host using their IEEE addresses. The target spots
should address the base station's IEEE address - the host doesn't expose an address
to the wider network.
This implementation also allows the host to communicate directly other application code
running on the base station.
See "Spot Base Station.doc" for further guidance.
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
BaseStation()
|
|
| Method Summary | |
|---|---|
void |
initialize()
Launch the base station listener code that allows communication from host, via base station, to and from remote spots, and from the host directly to the base station. For Spots this diverts System.out to a sink (for EB40as, we assume that System.out is directed to the second serial port and so does not need to be redirected). |
static void |
main(String[] args)
A main method that allows this class to be used as a startup class |
void |
run()
Should not normally be called by user code - see initialize() |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, currentThread, getName, getPriority, interrupt, isAlive, join, setPriority, sleep, start, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BaseStation()
| Method Detail |
|---|
public static void main(String[] args)
throws IOException
args -
IOException
public void initialize()
throws IOException
IOExceptionpublic void run()
initialize()
run in interface Runnablerun in class ThreadIOExceptionThread.start(),
Runnable.run()
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||