Unfinished version 0.6 library for the Pi Swarm robot. NOTE: This library is not yet finished or fully tested - it will change.
Dependents: Pi_Swarm_Blank Aggregation-Flocking_2 Pi_Swarm_User_Command_RF_Test
Fork of Pi_Swarm_Library by
Diff: communications.h
- Revision:
- 0:9ffe8ebd1c40
- Child:
- 1:b067a08ff54e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/communications.h Fri Jan 31 22:59:25 2014 +0000 @@ -0,0 +1,21 @@ +/* University of York Robot Lab Pi Swarm Library: Swarm Communications Handler + * + * (C) Dr James Hilder, Dept. Electronics & Computer Science, University of York + * + * Version 0.4 January 2014 + * + * Designed for use with the Pi Swarm Board (enhanced MBED sensor board) v1.2 + * + */ + +#ifndef COMMUNICATIONS_H +#define COMMUNICATIONS_H +void decodeMessage(char sender, char target, char id, char command, char * data, char length); +void send_response(char target, char is_broadcast, char success, char id, char is_command, char function, char * data, char length); +void tdma_response(); +void handle_response(char sender, char is_broadcast, char success, char id, char is_command, char function, char * data, char length); +void handle_command(char sender, char is_broadcast, char request_response, char id, char function, char * data, char length); +void handle_request(char sender, char is_broadcast, char request_response, char id, char function); +void processRadioData(char * data, char length); +void errormessage(int index); +#endif //COMMUNICATIONS_H \ No newline at end of file