Jonathan Jones
/
Radios
Radio Structures in OOP
utils/RTP.h@6:4a3dbfbc30f1, 2015-01-15 (annotated)
- Committer:
- jjones646
- Date:
- Thu Jan 15 07:15:33 2015 +0000
- Revision:
- 6:4a3dbfbc30f1
- Parent:
- 2:7d523bdd2f50
socket interface confirmed working.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jjones646 | 2:7d523bdd2f50 | 1 | #ifndef REAL_TIME_PACKET_H |
jjones646 | 2:7d523bdd2f50 | 2 | #define REAL_TIME_PACKET_H |
jjones646 | 2:7d523bdd2f50 | 3 | |
jjones646 | 2:7d523bdd2f50 | 4 | #include "mbed.h" |
jjones646 | 2:7d523bdd2f50 | 5 | |
jjones646 | 2:7d523bdd2f50 | 6 | #define RTP_MAX_DATA_SIZE 32 |
jjones646 | 2:7d523bdd2f50 | 7 | |
jjones646 | 2:7d523bdd2f50 | 8 | typedef struct _RTP_t { |
jjones646 | 6:4a3dbfbc30f1 | 9 | uint8_t data_size; |
jjones646 | 2:7d523bdd2f50 | 10 | union { |
jjones646 | 2:7d523bdd2f50 | 11 | struct { |
jjones646 | 2:7d523bdd2f50 | 12 | union { |
jjones646 | 2:7d523bdd2f50 | 13 | uint8_t header; |
jjones646 | 2:7d523bdd2f50 | 14 | struct { |
jjones646 | 6:4a3dbfbc30f1 | 15 | uint8_t port : 4; |
jjones646 | 6:4a3dbfbc30f1 | 16 | uint8_t subclass : 4; |
jjones646 | 2:7d523bdd2f50 | 17 | }; |
jjones646 | 2:7d523bdd2f50 | 18 | }; |
jjones646 | 2:7d523bdd2f50 | 19 | uint8_t data[RTP_MAX_DATA_SIZE]; |
jjones646 | 2:7d523bdd2f50 | 20 | }; |
jjones646 | 2:7d523bdd2f50 | 21 | uint8_t raw[RTP_MAX_DATA_SIZE + 1]; |
jjones646 | 2:7d523bdd2f50 | 22 | }; |
jjones646 | 2:7d523bdd2f50 | 23 | } RTP_t; |
jjones646 | 2:7d523bdd2f50 | 24 | |
jjones646 | 2:7d523bdd2f50 | 25 | #endif // REAL_TIME_PACKET_H |