Holger Hans Peter Freyther | 0d60aa2 | 2010-07-21 05:02:33 +0800 | [diff] [blame] | 1 | #ifndef PROTO_GSM_04_12_H |
| 2 | #define PROTO_GSM_04_12_H |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | |
| 6 | /* GSM TS 04.12 definitions for Short Message Service Cell Broadcast */ |
| 7 | |
| 8 | #define GSM412_SEQ_FST_BLOCK 0x0 |
| 9 | #define GSM412_SEQ_SND_BLOCK 0x1 |
| 10 | #define GSM412_SEQ_TRD_BLOCK 0x2 |
| 11 | #define GSM412_SEQ_FTH_BLOCK 0x3 |
| 12 | #define GSM412_SEQ_FST_SCHED_BLOCK 0x8 |
Alex Badea | 3ba0a2b | 2010-11-27 20:00:39 +0200 | [diff] [blame] | 13 | #define GSM412_SEQ_NULL_MSG 0xf |
Holger Hans Peter Freyther | 0d60aa2 | 2010-07-21 05:02:33 +0800 | [diff] [blame] | 14 | |
| 15 | struct gsm412_block_type { |
| 16 | uint8_t seq_nr : 4, |
| 17 | lb : 1, |
| 18 | lpd : 2, |
| 19 | spare : 1; |
| 20 | } __attribute__((packed)); |
| 21 | |
Alex Badea | 3ba0a2b | 2010-11-27 20:00:39 +0200 | [diff] [blame] | 22 | struct gsm412_sched_msg { |
Holger Hans Peter Freyther | 0d60aa2 | 2010-07-21 05:02:33 +0800 | [diff] [blame] | 23 | uint8_t beg_slot_nr : 6, |
| 24 | type : 2; |
| 25 | uint8_t end_slot_nr : 6, |
| 26 | spare1 : 1, spare2: 1; |
| 27 | uint8_t cbsms_msg_map[6]; |
| 28 | uint8_t data[0]; |
| 29 | } __attribute__((packed)); |
| 30 | |
| 31 | #endif |