|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfrog.plugin.spot.SpotConnection
public class SpotConnection
SpotConnection is a peer-to-peer connection with a single SPOT. It is responsible for listening for incoming gestures and passing them up to the higher portions of FROG and for sending any messages back to the SPOT.
| Field Summary | |
|---|---|
(package private) Vector<String> |
activeFilters
|
| Fields inherited from interface frog.plugin.spot.Frog_Spot_Constants |
|---|
CORRUPT_DATA, END_OF_DATA, INT_CORRUPT_DATA, INT_END_OF_DATA, MSG_ACK, MSG_ADD_FILTER, MSG_ALIVE, MSG_DISCONNECT, MSG_DISCOVER, MSG_END_OF_DATA, MSG_ERROR, MSG_GESTURE, MSG_REMOVE_FILTERS, MSG_RESEND, MSG_SAMPLE_RATE, PORT_BCAST, PORT_MAX, PORT_REPLY, PORT_START, SPOT1, SPOT1_PORT, SPOT2, SPOT2_PORT, SPOT3, SPOT3_PORT, SPOT4, SPOT4_PORT, SPOT5, SPOT5_PORT, SPOT6, SPOT6_PORT, SPOT7, SPOT7_PORT, SPOT8, SPOT8_PORT, SPOTB1, SPOTB1_PORT, SPOTB2, SPOTB2_PORT, SPOTB3, SPOTB3_PORT, SPOTB4, SPOTB4_PORT |
| Constructor Summary | |
|---|---|
SpotConnection(String address,
short txPort,
short rxPort,
Device device)
Creates a new SpotConnection to a SPOT at the given address and port |
|
| Method Summary | |
|---|---|
void |
close()
Attempt to kill this connection nicely. |
int |
getSampleRate()
Returns the current sample rate of this SPOT. |
void |
send(Message msg)
Send a Message to the device. |
void |
setSampleRate(int rate)
Sets the rate at which the SPOT will sample its accelerometers. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
final Vector<String> activeFilters
| Constructor Detail |
|---|
public SpotConnection(String address,
short txPort,
short rxPort,
Device device)
throws IOException
address - the IEEE address of the SPOT to connect torxPort - the port number assigned to the receiving connectiontxPort - the port number assigned to the sending connectiondevice - the Device object representing this connection
IOException - if any errors arise out of creating this connection| Method Detail |
|---|
public void close()
throws IOException
Device.disconnect(). Does not notify of unexpected disconnect.
IOExceptionpublic int getSampleRate()
public void send(Message msg)
Message to the device.
msg - the Message to be sent
public void setSampleRate(int rate)
throws IOException
rate - the new sampling rate in hertz for the SPOT
IOException - if the sample rate is invalidpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||