libosmogsm  0.12.0
Osmocom GSM library
gsm_04_12.h
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include <stdint.h>
7 
8 #define GSM412_MSG_LEN 88 /* TS 04.12 Section 3.1 */
9 #define GSM412_BLOCK_LEN 22 /* TS 04.12 Section 3.1 */
10 
11 #define GSM412_SEQ_FST_BLOCK 0x0
12 #define GSM412_SEQ_SND_BLOCK 0x1
13 #define GSM412_SEQ_TRD_BLOCK 0x2
14 #define GSM412_SEQ_FTH_BLOCK 0x3
15 #define GSM412_SEQ_FST_SCHED_BLOCK 0x8
16 #define GSM412_SEQ_NULL_MSG 0xf
17 
19 #if OSMO_IS_LITTLE_ENDIAN == 1
20  uint8_t seq_nr : 4,
21  lb : 1,
22  lpd : 2,
23  spare : 1;
24 #else
25  uint8_t spare : 1,
26  lpd : 2,
27  lb : 1,
28  seq_nr : 4;
29 #endif
30 } __attribute__((packed));
31 
33 #if OSMO_IS_LITTLE_ENDIAN == 1
34  uint8_t beg_slot_nr : 6,
35  type : 2;
36  uint8_t end_slot_nr : 6,
37  spare1 : 1, spare2: 1;
38 #else
39  uint8_t type : 2,
40  beg_slot_nr : 6;
41  uint8_t spare2: 1,
42  spare1 : 1,
43  end_slot_nr : 6;
44 #endif
45  uint8_t cbsms_msg_map[6];
46  uint8_t data[0];
47 } __attribute__((packed));
Definition: gsm_04_12.h:18
uint8_t spare1
Definition: gsm_04_12.h:509
uint8_t type
Definition: gsm_04_12.h:507
uint8_t spare2
Definition: gsm_04_12.h:509
Definition: gsm_04_12.h:32
uint8_t lb
Definition: gsm_04_12.h:25
struct gsm412_block_type __attribute__((packed))
uint8_t beg_slot_nr
Definition: gsm_04_12.h:507
uint8_t end_slot_nr
Definition: gsm_04_12.h:509
uint8_t seq_nr
Definition: gsm_04_12.h:25
uint8_t cbsms_msg_map[6]
Definition: gsm_04_12.h:513
uint8_t spare
Definition: gsm_04_12.h:25
uint8_t spare2
Definition: gsm_04_12.h:41
uint8_t data[0]
Definition: gsm_04_12.h:514
uint8_t lpd
Definition: gsm_04_12.h:25
uint8_t type
Definition: gsm_04_12.h:39