root / trunk / code / projects / colonet / ColonetServer / includes / Command.h @ 445
History | View | Annotate | Download (839 Bytes)
1 |
/**
|
---|---|
2 |
* @file Command.h
|
3 |
*
|
4 |
* @author Jason Knichel
|
5 |
* @date 10/9/07
|
6 |
*/
|
7 |
|
8 |
#ifndef COMMAND_H
|
9 |
#define COMMAND_H
|
10 |
|
11 |
#include "ConnectionPool.h" |
12 |
|
13 |
class Command { |
14 |
public:
|
15 |
Command(ConnectionPool * connection_pool); |
16 |
~Command(); |
17 |
|
18 |
int parse_command(char* command, int pool_index); |
19 |
|
20 |
private:
|
21 |
int tokenize_command(char* command, char tokens[MAX_TOKENS][MAX_TOKEN_SIZE]); |
22 |
int check_tokens(unsigned char* tokens, int number_tokens); |
23 |
|
24 |
int parse_send_to_robot(int number_tokens, char tokens[MAX_TOKENS][MAX_TOKEN_SIZE], int pool_index); |
25 |
int parse_request_from_server(int number_tokens, char tokens[MAX_TOKENS][MAX_TOKEN_SIZE], int pool_index); |
26 |
|
27 |
int parse_request_bom_matrix(int pool_index); |
28 |
int parse_request_xbee_ids(int pool_index); |
29 |
int parse_request_robot_positions(int pool_index); |
30 |
|
31 |
ConnectionPool * connection_pool; |
32 |
}; |
33 |
|
34 |
|
35 |
#endif
|