root / trunk / code / projects / colonet / ColonetServer / includes / Command.h @ 453
History | View | Annotate | Download (934 Bytes)
1 | 128 | jknichel | /**
|
---|---|---|---|
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 | 447 | emarinel | #include <ConnectionPool.h> |
12 | 453 | emarinel | #include <ColonetServer.h> |
13 | 447 | emarinel | #include <list> |
14 | 128 | jknichel | |
15 | class Command { |
||
16 | public:
|
||
17 | 453 | emarinel | Command(ConnectionPool * connection_pool, ColonetServer* cs); |
18 | 128 | jknichel | ~Command(); |
19 | |||
20 | 139 | jknichel | int parse_command(char* command, int pool_index); |
21 | 424 | emarinel | |
22 | private:
|
||
23 | 128 | jknichel | int tokenize_command(char* command, char tokens[MAX_TOKENS][MAX_TOKEN_SIZE]); |
24 | int check_tokens(unsigned char* tokens, int number_tokens); |
||
25 | |||
26 | 156 | emarinel | int parse_send_to_robot(int number_tokens, char tokens[MAX_TOKENS][MAX_TOKEN_SIZE], int pool_index); |
27 | 139 | jknichel | int parse_request_from_server(int number_tokens, char tokens[MAX_TOKENS][MAX_TOKEN_SIZE], int pool_index); |
28 | 130 | jknichel | |
29 | 139 | jknichel | int parse_request_bom_matrix(int pool_index); |
30 | int parse_request_xbee_ids(int pool_index); |
||
31 | 445 | emarinel | int parse_request_robot_positions(int pool_index); |
32 | 139 | jknichel | |
33 | ConnectionPool * connection_pool; |
||
34 | 453 | emarinel | ColonetServer* colonet_server; |
35 | 128 | jknichel | }; |
36 | |||
37 | |||
38 | #endif |