ConnectionManager Class Reference
Manages the connection to the host.
More...
List of all members.
Public Member Functions |
| ConnectionManager (final FrogSpot frog, String address, short txPort, short rxPort) throws IOException |
| Creates the ConnectionManager object with a given address and port to connect to.
|
void | kill () |
| Attempt to unconditionally stop all threads and release all resources.
|
void | send (Queue gesture) |
| Helper method for adding a gesture to the send queue.
|
void | sendMessage (byte message) |
| Helper method for sending a message to the host.
|
Static Public Attributes |
static final String | SPOT1_PORT = "COM14" |
static final String | SPOT2_PORT = "COM9" |
static final String | SPOT3_PORT = "COM13" |
static final String | SPOT4_PORT = "COM15" |
static final String | SPOT5_PORT = "COM12" |
static final String | SPOT6_PORT = "COM10" |
static final String | SPOT7_PORT = "COM11" |
static final String | SPOT8_PORT = "COM8" |
static final String | SPOTB1_PORT = "COM4" |
static final String | SPOTB2_PORT = "COM7" |
static final String | SPOTB3_PORT = "COM6" |
static final String | SPOTB4_PORT = "COM5" |
static final short | PORT_BCAST = 32 |
static final short | PORT_REPLY = 33 |
static final short | PORT_START = 34 |
static final short | PORT_MAX = 254 |
static final byte | MSG_ADD_FILTER = -1 |
| Messages sent between host and SPOT.
|
static final byte | MSG_REMOVE_FILTERS = -2 |
static final byte | MSG_ALIVE = -3 |
static final byte | MSG_GESTURE = -4 |
static final byte | MSG_END_OF_DATA = -5 |
static final byte | MSG_DISCOVER = -6 |
static final byte | MSG_DISCONNECT = -7 |
static final byte | MSG_ERROR = -8 |
static final byte | MSG_RESEND = -9 |
static final byte | MSG_ACK = -10 |
static final byte | MSG_SAMPLE_RATE = -11 |
static final double[] | END_OF_DATA = { 42.0 } |
| Special markers for FilterPipeline on the SPOT.
|
static final double[] | CORRUPT_DATA = { 43.0 } |
static final int[] | INT_END_OF_DATA = { 42 } |
static final int[] | INT_CORRUPT_DATA = { 43 } |
Static Package Attributes |
static final String | SPOT1 = "0014.4F01.0000.1BE9" |
static final String | SPOT2 = "0014.4F01.0000.1E37" |
static final String | SPOT3 = "0014.4F01.0000.1E98" |
static final String | SPOT4 = "0014.4F01.0000.2AAE" |
static final String | SPOT5 = "0014.4F01.0000.3B61" |
static final String | SPOT6 = "0014.4F01.0000.3B7D" |
static final String | SPOT7 = "0014.4F01.0000.4118" |
static final String | SPOT8 = "0014.4F01.0000.4213" |
static final String | SPOTB1 = "0014.4F01.0000.2C06" |
static final String | SPOTB2 = "0014.4F01.0000.22F3" |
static final String | SPOTB3 = "0014.4F01.0000.3122" |
static final String | SPOTB4 = "0014.4F01.0000.415E" |
Detailed Description
Manages the connection to the host.
Deals with the messages coming in that tell the SPOT to do things and sends gesture data and keep alive signals back.
- Author:
- Team Better Recognize
Constructor & Destructor Documentation
Creates the ConnectionManager object with a given address and port to connect to.
- Parameters:
-
| frog | reference to the FrogSpot object |
| address | host address to connect to |
| txPort | destination port to connect to |
| rxPort | port to receive Radiogram messages on |
- Exceptions:
-
| IOException | if any error occurs setting up the connections |
Member Function Documentation
Attempt to unconditionally stop all threads and release all resources.
Implements Killable.
void send |
( |
Queue |
gesture |
) |
|
Helper method for adding a gesture to the send queue.
- Parameters:
-
| gesture | the gesture to be transmitted to the host |
void sendMessage |
( |
byte |
message |
) |
|
Helper method for sending a message to the host.
- Parameters:
-
| message | the message to be sent |
- See also:
- Frog_Spot_Constants
Member Data Documentation
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: