![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
master to control sensor node
Dependencies: mbed
packet.h@6:9daa56b8a027, 2015-11-17 (annotated)
- Committer:
- mfrede
- Date:
- Tue Nov 17 19:13:55 2015 +0000
- Revision:
- 6:9daa56b8a027
- Parent:
- 2:5d88c51f53dc
add rssi to header/cpp for MRF24J40
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mfrede | 2:5d88c51f53dc | 1 | #ifndef LAB5PACKET |
mfrede | 2:5d88c51f53dc | 2 | #define LAB5PACKET |
mfrede | 2:5d88c51f53dc | 3 | |
mfrede | 2:5d88c51f53dc | 4 | |
mfrede | 2:5d88c51f53dc | 5 | class packet |
mfrede | 2:5d88c51f53dc | 6 | { |
mfrede | 2:5d88c51f53dc | 7 | #define HELLO_TYPE 1 |
mfrede | 2:5d88c51f53dc | 8 | #define ROUTE_REQ_TYPE 2 |
mfrede | 2:5d88c51f53dc | 9 | #define ROUTE_ACK_TYPE 3 |
mfrede | 2:5d88c51f53dc | 10 | #define DATA_TYPE 4 |
mfrede | 2:5d88c51f53dc | 11 | public: |
mfrede | 2:5d88c51f53dc | 12 | packet(unsigned short from, unsigned short to, unsigned short TYPE, float data1, float data2) { |
mfrede | 2:5d88c51f53dc | 13 | TTL = 4; |
mfrede | 2:5d88c51f53dc | 14 | from = from; |
mfrede | 2:5d88c51f53dc | 15 | to = to; |
mfrede | 2:5d88c51f53dc | 16 | TYPE = TYPE; |
mfrede | 2:5d88c51f53dc | 17 | data1 = data1; |
mfrede | 2:5d88c51f53dc | 18 | data2 = data2; |
mfrede | 2:5d88c51f53dc | 19 | }; |
mfrede | 2:5d88c51f53dc | 20 | |
mfrede | 2:5d88c51f53dc | 21 | unsigned short from; |
mfrede | 2:5d88c51f53dc | 22 | unsigned short to; |
mfrede | 2:5d88c51f53dc | 23 | unsigned short TTL; |
mfrede | 2:5d88c51f53dc | 24 | unsigned short TYPE; |
mfrede | 2:5d88c51f53dc | 25 | float data1; |
mfrede | 2:5d88c51f53dc | 26 | float data2; |
mfrede | 2:5d88c51f53dc | 27 | |
mfrede | 2:5d88c51f53dc | 28 | }; |
mfrede | 2:5d88c51f53dc | 29 | |
mfrede | 2:5d88c51f53dc | 30 | #endif |