gsm_04_12.h
Go to the documentation of this file.
#pragma once
#include <stdint.h>
#define GSM412_MSG_LEN 88 /* TS 04.12 Section 3.1 */
#define GSM412_BLOCK_LEN 22 /* TS 04.12 Section 3.1 */
#define GSM412_SEQ_FST_BLOCK 0x0
#define GSM412_SEQ_SND_BLOCK 0x1
#define GSM412_SEQ_TRD_BLOCK 0x2
#define GSM412_SEQ_FTH_BLOCK 0x3
#define GSM412_SEQ_FST_SCHED_BLOCK 0x8
#define GSM412_SEQ_NULL_MSG 0xf
struct gsm412_block_type {
#if OSMO_IS_LITTLE_ENDIAN == 1
uint8_t seq_nr : 4,
lb : 1,
lpd : 2,
spare : 1;
#else
uint8_t spare : 1,
lpd : 2,
lb : 1,
seq_nr : 4;
#endif
} __attribute__((packed));
struct gsm412_sched_msg {
#if OSMO_IS_LITTLE_ENDIAN == 1
uint8_t beg_slot_nr : 6,
type : 2;
uint8_t end_slot_nr : 6,
spare1 : 1, spare2: 1;
#else
uint8_t type : 2,
beg_slot_nr : 6;
uint8_t spare2: 1,
spare1 : 1,
end_slot_nr : 6;
#endif
uint8_t cbsms_msg_map[6];
uint8_t data[0];
} __attribute__((packed));
gsm412_sched_msg
Definition: gsm_04_12.h:32
gsm412_sched_msg::end_slot_nr
uint8_t end_slot_nr
Definition: gsm_04_12.h:43
gsm412_block_type::lb
uint8_t lb
Definition: gsm_04_12.h:27
__attribute__
struct gsm412_block_type __attribute__((packed))
gsm412_block_type::spare
uint8_t spare
Definition: gsm_04_12.h:25
gsm412_block_type::lpd
uint8_t lpd
Definition: gsm_04_12.h:26
gsm412_sched_msg::type
uint8_t type
Definition: gsm_04_12.h:39
gsm412_block_type
Definition: gsm_04_12.h:18
gsm412_sched_msg::spare1
uint8_t spare1
Definition: gsm_04_12.h:42
gsm412_sched_msg::spare2
uint8_t spare2
Definition: gsm_04_12.h:41
gsm412_sched_msg::cbsms_msg_map
uint8_t cbsms_msg_map[6]
Definition: gsm_04_12.h:45
gsm412_block_type::seq_nr
uint8_t seq_nr
Definition: gsm_04_12.h:28
gsm412_sched_msg::data
uint8_t data[0]
Definition: gsm_04_12.h:46
gsm412_sched_msg::beg_slot_nr
uint8_t beg_slot_nr
Definition: gsm_04_12.h:40