libosmogsm 1.13.1.1-afb4 Osmocom GSM library

gsm_04_14.h
Go to the documentation of this file.
1
3#pragma once
4
5#include <stdint.h>
6#include <osmocom/core/endian.h>
7#include <osmocom/core/utils.h>
8
9/* According to 3GPP TS 44.014 / GSM TS 04.14 */
10
11#define GSM414_MT_CLOSE_TCH_LOOP_CMD 0x00 /* 8.1 */
12 enum gsm414_tch_loop_mode {
13 GSM414_LOOP_A = 0x00,
14 GSM414_LOOP_B = 0x01,
15 GSM414_LOOP_C = 0x02,
16 GSM414_LOOP_D = 0x04,
17 GSM414_LOOP_E = 0x08,
18 GSM414_LOOP_F = 0x0c,
19 GSM414_LOOP_I = 0x1c,
20};
21
22#define GSM414_MT_CLOSE_TCH_LOOP_ACK 0x01 /* 8.2 */
23#define GSM414_MT_OPEN_LOOP_CMD 0x06 /* 8.3 */
24#define GSM414_OPEN_LOOP_ACK_IE 0x81
25
26#define GSM414_MT_CLOSE_MSLOT_LOOP_CMD 0x20 /* 8.4 */
27 struct gsm414_close_mslot_loop_cmd {
28#if OSMO_IS_LITTLE_ENDIAN
29 uint8_t chc:2,
30 loop_mech:3,
31 tn:3;
32#elif OSMO_IS_BIG_ENDIAN
33/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
34 uint8_t tn:3, loop_mech:3, chc:2;
35#endif
36} __attribute__((packed));
37
38#define GSM414_MT_CLOSE_MSLOT_LOOP_ACK 0x21 /* 8.5 */
39 struct gsm414_close_mslot_loop_ack {
40#if OSMO_IS_LITTLE_ENDIAN
41 uint8_t err_ind:1,
42 loop_mech:3,
43 chc:2,
44 spare:2;
45#elif OSMO_IS_BIG_ENDIAN
46/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
47 uint8_t spare:2, chc:2, loop_mech:3, err_ind:1;
48#endif
49} __attribute__((packed));
50
51#define GSM414_MT_OPEN_MSLOT_LOOP_CMD 0x22 /* 8.6 */
52#define GSM414_MT_OPEN_MSLOT_LOOP_ACK 0x23 /* 8.7 */
53#define GSM414_MT_ACT_EMMI_CMD 0x0c /* 8.8 */
54#define GSM414_MT_ACT_EMMI_ACK 0x0d /* 8.9 */
55#define GSM414_MT_DEACT_EMMI_CMD 0x80 /* 8.10 */
56#define GSM414_MT_TEST_INTERFACE 0x84 /* 8.11 */
57
58/* 8.12 Timers (milli-seconds) */
59#define GSM414_TT01_MS 2500
60#define GSM414_TT02_MS 2500
61#define GSM414_TT03_MS 50
62
63#define GSM414_MT_GPRS_TEST_MODE_CMD 0x24 /* 8.13 */
64 struct gsm414_gprs_test_mode_cmd {
65#if OSMO_IS_LITTLE_ENDIAN
66 uint16_t d:12,
67 spare:3,
68 l:1;
69 uint8_t m:1,
70 dl_tx_offset:3,
71 _spare:4;
72#elif OSMO_IS_BIG_ENDIAN
73/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
74 uint16_t d:12,
75 spare:3,
76 l:1;
77 uint8_t _spare:4, dl_tx_offset:3, m:1;
78#endif
79} __attribute__((packed));
80
81
82#define GSM414_MT_EGPRS_ST_RB_LOOP_CMD 0x25 /* 8.14 */
83 struct gsm414_egprs_st_sb_loop_cmd {
84#if OSMO_IS_LITTLE_ENDIAN
85 uint8_t _spare:4,
86 dl_tx_offset:3,
87 m:1;
88#elif OSMO_IS_BIG_ENDIAN
89/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
90 uint8_t m:1, dl_tx_offset:3, _spare:4;
91#endif
92} __attribute__((packed));
93
94#define GSM414_MT_RESET_MS_POS_STORED 0x26 /* 8.15 */
95#define GSM414_MS_POS_TECH_AGPS 0x00
96#define GSM414_MS_POS_TECH_AGNSS 0x01
97
98 extern const struct value_string gsm414_msgt_names[];
endian.h
__attribute__
struct gsm414_close_mslot_loop_cmd __attribute__((packed))
l
int gsm48_generate_mid_from_tmsi *(uint8_t *buf, uint32_t tmsi) OSMO_DEPRECATED_OUTSIDE("Instead us l)
Definition: gsm48.h:60
gsm414_tch_loop_mode
gsm414_tch_loop_mode
Definition: gsm_04_14.h:12
GSM414_LOOP_E
@ GSM414_LOOP_E
Definition: gsm_04_14.h:17
GSM414_LOOP_B
@ GSM414_LOOP_B
Definition: gsm_04_14.h:14
GSM414_LOOP_D
@ GSM414_LOOP_D
Definition: gsm_04_14.h:16
GSM414_LOOP_C
@ GSM414_LOOP_C
Definition: gsm_04_14.h:15
GSM414_LOOP_I
@ GSM414_LOOP_I
Definition: gsm_04_14.h:19
GSM414_LOOP_F
@ GSM414_LOOP_F
Definition: gsm_04_14.h:18
GSM414_LOOP_A
@ GSM414_LOOP_A
Definition: gsm_04_14.h:13
gsm414_msgt_names
const struct value_string gsm414_msgt_names[]
Definition: gsm0414.c:6
gsm414_close_mslot_loop_ack
Definition: gsm_04_14.h:39
gsm414_close_mslot_loop_cmd
Definition: gsm_04_14.h:27
gsm414_egprs_st_sb_loop_cmd
Definition: gsm_04_14.h:83
gsm414_gprs_test_mode_cmd
Definition: gsm_04_14.h:64
value_string
utils.h