Project

General

Profile

Statistics
| Revision:

root / branches / slam / code / projects / colonet / DataRequests / server / data_requests.h @ 366

History | View | Annotate | Download (625 Bytes)

1
#define DATA_REQUEST_GROUP 7
2
#define BOM_TYPE 0
3
#define IR_TYPE 1
4
#define ENCODER_TYPE 2
5

    
6
typedef struct {
7
  short int robot_id;
8
  char value;
9
  struct BomNode* next;
10
} BomNode;
11

    
12
typedef struct{
13
    unsigned char* packet;
14
    char type;
15
    int source;
16
    int length;
17
} RawData;
18

    
19
void data_requests_init(
20
                        void(*bom_data_handler)(BomNode** head),
21
                        void(*IR_data_handler)(short** data),
22
                        void(*encoder_data_handler)(unsigned char** data));
23

    
24
void request_bom_data(int robot_id);
25
void request_IR_data(int robot_id);
26
void request_encoder_data(int robot_id);
27