Coordinator v2

Dependencies:   NerfUSXbee PinDetect EthernetInterface JSON MFRC522 WebSocketClient mbed-rtos mbed

Committer:
Ismael Balafrej
Date:
Mon Apr 10 15:02:24 2017 -0400
Revision:
1:e1c5259b7d9a
Child:
2:019d8848cf7e
V1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Ismael Balafrej 1:e1c5259b7d9a 1 #pragma once
Ismael Balafrej 1:e1c5259b7d9a 2
Ismael Balafrej 1:e1c5259b7d9a 3 //TODO: Separate ?
Ismael Balafrej 1:e1c5259b7d9a 4 struct ServerData
Ismael Balafrej 1:e1c5259b7d9a 5 {
Ismael Balafrej 1:e1c5259b7d9a 6 //To server
Ismael Balafrej 1:e1c5259b7d9a 7 uint8_t targets = 0;
Ismael Balafrej 1:e1c5259b7d9a 8 uint8_t enemies = 0;
Ismael Balafrej 1:e1c5259b7d9a 9 uint8_t allies = 0;
Ismael Balafrej 1:e1c5259b7d9a 10 uint16_t averageReflexTime = 0;
Ismael Balafrej 1:e1c5259b7d9a 11 uint16_t gameLength = 0;
Ismael Balafrej 1:e1c5259b7d9a 12 uint16_t score = 0;
Ismael Balafrej 1:e1c5259b7d9a 13 char rfid_code[32] = {'\0'};
Ismael Balafrej 1:e1c5259b7d9a 14 char direction[10] = {'\0'};
Ismael Balafrej 1:e1c5259b7d9a 15
Ismael Balafrej 1:e1c5259b7d9a 16 //From server
Ismael Balafrej 1:e1c5259b7d9a 17 uint8_t game_id = 0;
Ismael Balafrej 1:e1c5259b7d9a 18 uint16_t max_reflex_time = 10000;
Ismael Balafrej 1:e1c5259b7d9a 19 uint8_t number_of_target = 100;
Ismael Balafrej 1:e1c5259b7d9a 20
Ismael Balafrej 1:e1c5259b7d9a 21 };
Ismael Balafrej 1:e1c5259b7d9a 22 struct ServerEvent
Ismael Balafrej 1:e1c5259b7d9a 23 {
Ismael Balafrej 1:e1c5259b7d9a 24 char event[32] = {'\0'};
Ismael Balafrej 1:e1c5259b7d9a 25 ServerData data;
Ismael Balafrej 1:e1c5259b7d9a 26 };