SpotConnection Class Reference
SpotConnection is a peer-to-peer connection with a single SPOT.
More...
List of all members.
Detailed Description
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.
- Author:
- Team Better Recognize
Constructor & Destructor Documentation
Creates a new SpotConnection to a SPOT at the given address and port.
- Parameters:
-
| address | the IEEE address of the SPOT to connect to |
| rxPort | the port number assigned to the receiving connection |
| txPort | the port number assigned to the sending connection |
| device | the Device object representing this connection |
- Exceptions:
-
| IOException | if any errors arise out of creating this connection |
Member Function Documentation
void close |
( |
|
) |
throws IOException |
Attempt to kill this connection nicely.
Usually called by Device#disconnect(). Does not notify of unexpected disconnect.
Returns the current sample rate of this SPOT.
Will be a valid sample rate in the range of 1 to 1000Hz.
- Returns:
- the sample rate in hertz
Send a Message to the device.
- Parameters:
-
void setSampleRate |
( |
int |
rate |
) |
throws IOException |
Sets the rate at which the SPOT will sample its accelerometers.
The given number must be an integer in the range of 1 to 1000Hz.
- Parameters:
-
| rate | the new sampling rate in hertz for the SPOT |
- Exceptions:
-
| IOException | if the sample rate is invalid |
Member Data Documentation
final Vector<String> activeFilters = new Vector<String>() [package] |
final double [] END_OF_DATA = { 42.0 } [static, inherited] |
Special markers for FilterPipeline on the SPOT.
static final byte MSG_ACK = -10 [static, inherited] |
Messages sent between host and SPOT.
static final byte MSG_ALIVE = -3 [static, inherited] |
static final byte MSG_ERROR = -8 [static, inherited] |
static final byte MSG_RESEND = -9 [static, inherited] |
static final short PORT_BCAST = 32 [static, inherited] |
static final short PORT_MAX = 254 [static, inherited] |
static final short PORT_REPLY = 33 [static, inherited] |
static final short PORT_START = 34 [static, inherited] |
static final String SPOT1 = "0014.4F01.0000.1BE9" [static, package, inherited] |
static final String SPOT1_PORT = "COM14" [static, inherited] |
static final String SPOT2 = "0014.4F01.0000.1E37" [static, package, inherited] |
static final String SPOT2_PORT = "COM9" [static, inherited] |
static final String SPOT3 = "0014.4F01.0000.1E98" [static, package, inherited] |
static final String SPOT3_PORT = "COM13" [static, inherited] |
static final String SPOT4 = "0014.4F01.0000.2AAE" [static, package, inherited] |
static final String SPOT4_PORT = "COM15" [static, inherited] |
static final String SPOT5 = "0014.4F01.0000.3B61" [static, package, inherited] |
static final String SPOT5_PORT = "COM12" [static, inherited] |
static final String SPOT6 = "0014.4F01.0000.3B7D" [static, package, inherited] |
static final String SPOT6_PORT = "COM10" [static, inherited] |
static final String SPOT7 = "0014.4F01.0000.4118" [static, package, inherited] |
static final String SPOT7_PORT = "COM11" [static, inherited] |
static final String SPOT8 = "0014.4F01.0000.4213" [static, package, inherited] |
static final String SPOT8_PORT = "COM8" [static, inherited] |
static final String SPOTB1 = "0014.4F01.0000.2C06" [static, package, inherited] |
static final String SPOTB1_PORT = "COM4" [static, inherited] |
static final String SPOTB2 = "0014.4F01.0000.22F3" [static, package, inherited] |
static final String SPOTB2_PORT = "COM7" [static, inherited] |
static final String SPOTB3 = "0014.4F01.0000.3122" [static, package, inherited] |
static final String SPOTB3_PORT = "COM6" [static, inherited] |
static final String SPOTB4 = "0014.4F01.0000.415E" [static, package, inherited] |
static final String SPOTB4_PORT = "COM5" [static, inherited] |
The documentation for this class was generated from the following file: