Unfinished v0.7, added bearing detection
Fork of Pi_Swarm_Library_v06_alpha by
communications.h@0:9ffe8ebd1c40, 2014-01-31 (annotated)
- Committer:
- jah128
- Date:
- Fri Jan 31 22:59:25 2014 +0000
- Revision:
- 0:9ffe8ebd1c40
- Child:
- 1:b067a08ff54e
First commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jah128 | 0:9ffe8ebd1c40 | 1 | /* University of York Robot Lab Pi Swarm Library: Swarm Communications Handler |
jah128 | 0:9ffe8ebd1c40 | 2 | * |
jah128 | 0:9ffe8ebd1c40 | 3 | * (C) Dr James Hilder, Dept. Electronics & Computer Science, University of York |
jah128 | 0:9ffe8ebd1c40 | 4 | * |
jah128 | 0:9ffe8ebd1c40 | 5 | * Version 0.4 January 2014 |
jah128 | 0:9ffe8ebd1c40 | 6 | * |
jah128 | 0:9ffe8ebd1c40 | 7 | * Designed for use with the Pi Swarm Board (enhanced MBED sensor board) v1.2 |
jah128 | 0:9ffe8ebd1c40 | 8 | * |
jah128 | 0:9ffe8ebd1c40 | 9 | */ |
jah128 | 0:9ffe8ebd1c40 | 10 | |
jah128 | 0:9ffe8ebd1c40 | 11 | #ifndef COMMUNICATIONS_H |
jah128 | 0:9ffe8ebd1c40 | 12 | #define COMMUNICATIONS_H |
jah128 | 0:9ffe8ebd1c40 | 13 | void decodeMessage(char sender, char target, char id, char command, char * data, char length); |
jah128 | 0:9ffe8ebd1c40 | 14 | void send_response(char target, char is_broadcast, char success, char id, char is_command, char function, char * data, char length); |
jah128 | 0:9ffe8ebd1c40 | 15 | void tdma_response(); |
jah128 | 0:9ffe8ebd1c40 | 16 | void handle_response(char sender, char is_broadcast, char success, char id, char is_command, char function, char * data, char length); |
jah128 | 0:9ffe8ebd1c40 | 17 | void handle_command(char sender, char is_broadcast, char request_response, char id, char function, char * data, char length); |
jah128 | 0:9ffe8ebd1c40 | 18 | void handle_request(char sender, char is_broadcast, char request_response, char id, char function); |
jah128 | 0:9ffe8ebd1c40 | 19 | void processRadioData(char * data, char length); |
jah128 | 0:9ffe8ebd1c40 | 20 | void errormessage(int index); |
jah128 | 0:9ffe8ebd1c40 | 21 | #endif //COMMUNICATIONS_H |