Alex Badea | ab1246e | 2010-11-27 23:35:08 +0200 | [diff] [blame] | 1 | #ifndef PROTO_GSM_03_41_H |
| 2 | #define PROTO_GSM_03_41_H |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | |
Holger Hans Peter Freyther | a1e8bf7 | 2010-12-29 12:00:01 +0100 | [diff] [blame] | 6 | /* GSM TS 03.41 definitions also TS 23.041*/ |
Alex Badea | ab1246e | 2010-11-27 23:35:08 +0200 | [diff] [blame] | 7 | |
| 8 | /* Chapter 9.3.2 */ |
| 9 | struct gsm341_ms_message { |
| 10 | struct { |
| 11 | uint8_t code_hi:6; |
| 12 | uint8_t gs:2; |
Holger Hans Peter Freyther | a1e8bf7 | 2010-12-29 12:00:01 +0100 | [diff] [blame] | 13 | uint8_t update:4; |
| 14 | uint8_t code_lo:4; |
Alex Badea | ab1246e | 2010-11-27 23:35:08 +0200 | [diff] [blame] | 15 | } serial; |
| 16 | uint16_t msg_id; |
| 17 | struct { |
| 18 | uint8_t language:4; |
| 19 | uint8_t group:4; |
| 20 | } dcs; |
| 21 | struct { |
| 22 | uint8_t total:4; |
| 23 | uint8_t current:4; |
| 24 | } page; |
| 25 | uint8_t data[0]; |
| 26 | } __attribute__((packed)); |
| 27 | |
Holger Hans Peter Freyther | e05c7df | 2010-12-29 11:57:48 +0100 | [diff] [blame] | 28 | #define GSM341_MSG_CODE(ms) (ms->serial.code_lo | (msg->serial.code_hi << 4)) |
| 29 | |
Alex Badea | ab1246e | 2010-11-27 23:35:08 +0200 | [diff] [blame] | 30 | /* Section 9.3.2.1 - Geographical Scope */ |
| 31 | #define GSM341_GS_CELL_WIDE_IMMED 0 |
| 32 | #define GSM341_GS_PLMN_WIDE 1 |
| 33 | #define GSM341_GS_LA_WIDE 2 |
| 34 | #define GSM341_GS_CELL_WIDE 3 |
| 35 | |
| 36 | #endif /* PROTO_GSM_03_41_H */ |