Coordinator v2
Dependencies: NerfUSXbee PinDetect EthernetInterface JSON MFRC522 WebSocketClient mbed-rtos mbed
includes/Target.hpp@2:019d8848cf7e, 2017-04-11 (annotated)
- Committer:
- Ismael Balafrej
- Date:
- Tue Apr 11 12:40:05 2017 -0400
- Revision:
- 2:019d8848cf7e
- Parent:
- 1:e1c5259b7d9a
Final version without allies/enemies
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ismael Balafrej |
1:e1c5259b7d9a | 1 | #pragma once |
Ismael Balafrej |
1:e1c5259b7d9a | 2 | #include <vector> |
Ismael Balafrej |
1:e1c5259b7d9a | 3 | #include "ports.hpp" |
Ismael Balafrej |
1:e1c5259b7d9a | 4 | #include "RealXbeeTransmitter.hpp" |
Ismael Balafrej |
1:e1c5259b7d9a | 5 | |
Ismael Balafrej |
1:e1c5259b7d9a | 6 | extern RealXbeeTransmitter xbee_transmitter; |
Ismael Balafrej |
1:e1c5259b7d9a | 7 | |
Ismael Balafrej |
1:e1c5259b7d9a | 8 | struct Target |
Ismael Balafrej |
1:e1c5259b7d9a | 9 | { |
Ismael Balafrej |
1:e1c5259b7d9a | 10 | int target_number; //0 or 1 |
Ismael Balafrej |
1:e1c5259b7d9a | 11 | int addr_table[8]; //64 bit addr |
Ismael Balafrej |
2:019d8848cf7e | 12 | int is_risen = false; |
Ismael Balafrej |
1:e1c5259b7d9a | 13 | |
Ismael Balafrej |
1:e1c5259b7d9a | 14 | Target(int address_msb, int address_lsb, int target_number); |
Ismael Balafrej |
1:e1c5259b7d9a | 15 | |
Ismael Balafrej |
1:e1c5259b7d9a | 16 | //mode: ally (0) or enemy (1), timeout 16 bits in ms |
Ismael Balafrej |
1:e1c5259b7d9a | 17 | void rise(int mode, int timeout); |
Ismael Balafrej |
1:e1c5259b7d9a | 18 | |
Ismael Balafrej |
1:e1c5259b7d9a | 19 | void get_address_for_xbee(int address_msb, int address_lsb); |
Ismael Balafrej |
1:e1c5259b7d9a | 20 | }; |