libosmogsm 1.13.1.1-afb4 Osmocom GSM library

l1sap.h
Go to the documentation of this file.
1
3#pragma once
4
5#include <osmocom/core/prim.h>
6
8 enum osmo_ph_prim {
9 PRIM_PH_DATA,
10 PRIM_PH_RACH,
11 PRIM_PH_CONN,
12 PRIM_PH_EMPTY_FRAME,
13 PRIM_PH_RTS,
14 PRIM_MPH_INFO,
15 PRIM_TCH,
16 PRIM_TCH_RTS,
17};
18
19 extern const struct value_string osmo_ph_prim_names[];
20
22 enum osmo_mph_info_type {
23 PRIM_INFO_TIME,
24 PRIM_INFO_MEAS,
25 PRIM_INFO_ACTIVATE,
26 PRIM_INFO_DEACTIVATE,
27 PRIM_INFO_MODIFY,
28 PRIM_INFO_ACT_CIPH,
29 PRIM_INFO_DEACT_CIPH,
30 PRIM_INFO_ACT_UL_ACC,
31 PRIM_INFO_DEACT_UL_ACC,
32};
33
35 enum osmo_ph_pres_info_type {
36 PRES_INFO_INVALID = 0,
37 PRES_INFO_HEADER = 1,
38 PRES_INFO_FIRST = 3,
39 PRES_INFO_SECOND = 5,
40 PRES_INFO_BOTH = 7,
41 PRES_INFO_UNKNOWN
42};
43
45 struct ph_rach_req_param {
46 uint8_t ra;
47 uint8_t ta;
48 uint8_t tx_power;
49 uint8_t is_combined_ccch;
50 uint16_t offset;
51};
52
54 enum ph_burst_type {
55 GSM_L1_BURST_TYPE_NONE = 0,
56 GSM_L1_BURST_TYPE_ACCESS_0,
57 GSM_L1_BURST_TYPE_ACCESS_1,
58 GSM_L1_BURST_TYPE_ACCESS_2
59};
60
62 struct ph_rach_ind_param {
63 uint8_t chan_nr;
64 uint16_t ra;
65 uint8_t acc_delay;
66 uint32_t fn;
67 uint8_t is_11bit;
68 enum ph_burst_type burst_type;
69 /* elements added on 2018-02-26 */
70 int8_t rssi;
71 uint16_t ber10k;
72 int16_t acc_delay_256bits;
73 int16_t lqual_cb;
74};
75
77 struct ph_data_param {
78 uint8_t link_id;
79 uint8_t chan_nr;
80 uint32_t fn;
81 int8_t rssi;
82 uint16_t ber10k;
83 union {
84 int16_t ta_offs_qbits;
85 int16_t ta_offs_256bits;
86 };
87 int16_t lqual_cb;
88 enum osmo_ph_pres_info_type pdch_presence_info;
89 uint8_t is_sub:1;
90};
91
93 struct ph_tch_param {
94 uint8_t chan_nr;
95 uint32_t fn;
96 int8_t rssi;
97 uint8_t marker;
98 uint16_t ber10k;
99 int16_t lqual_cb;
100 int16_t ta_offs_256bits;
101 uint8_t is_sub:1;
102};
103
105 struct ph_conn_ind_param {
106 uint32_t fn;
107};
108
110 struct info_time_ind_param {
111 uint32_t fn;
112};
113
115 struct info_meas_ind_param {
116 uint8_t chan_nr;
117 uint32_t fn;
118 uint16_t ber10k;
119 union {
120 int16_t ta_offs_qbits;
121 int16_t ta_offs_256bits;
122 };
123 int16_t c_i_cb;
124 uint8_t is_sub:1;
125 uint8_t inv_rssi;
126};
127
129 struct info_act_req_param {
130 uint8_t chan_nr;
131 uint8_t sacch_only;
132};
133
135 struct info_act_cnf_param {
136 uint8_t chan_nr;
137 uint8_t cause;
138};
139
141 struct info_ciph_req_param {
142 uint8_t chan_nr;
143 uint8_t downlink;
144 uint8_t uplink;
145};
146
148 struct info_ulacc_req_param {
149 uint8_t chan_nr;
150};
151
153 struct mph_info_param {
154 enum osmo_mph_info_type type;
155 union {
156 struct info_time_ind_param time_ind;
157 struct info_meas_ind_param meas_ind;
158 struct info_act_req_param act_req;
159 struct info_act_cnf_param act_cnf;
160 struct info_ciph_req_param ciph_req;
161 struct info_ulacc_req_param ulacc_req;
162 } u;
163};
164
166 struct osmo_phsap_prim {
167 struct osmo_prim_hdr oph;
168 union {
169 struct ph_data_param data;
170 struct ph_tch_param tch;
171 struct ph_rach_req_param rach_req;
172 struct ph_rach_ind_param rach_ind;
173 struct ph_conn_ind_param conn_ind;
174 struct mph_info_param info;
175 } u;
176};
osmo_ph_prim_names
const struct value_string osmo_ph_prim_names[]
Definition: lapdm.c:115
ph_burst_type
ph_burst_type
for PH_RA_IND burstType inforamtion
Definition: l1sap.h:54
GSM_L1_BURST_TYPE_ACCESS_2
@ GSM_L1_BURST_TYPE_ACCESS_2
Definition: l1sap.h:58
GSM_L1_BURST_TYPE_NONE
@ GSM_L1_BURST_TYPE_NONE
Definition: l1sap.h:55
GSM_L1_BURST_TYPE_ACCESS_0
@ GSM_L1_BURST_TYPE_ACCESS_0
Definition: l1sap.h:56
GSM_L1_BURST_TYPE_ACCESS_1
@ GSM_L1_BURST_TYPE_ACCESS_1
Definition: l1sap.h:57
osmo_mph_info_type
osmo_mph_info_type
PH-SAP related primitives (L1<->L2 SAP)
Definition: l1sap.h:22
PRIM_INFO_MEAS
@ PRIM_INFO_MEAS
Measurement indication.
Definition: l1sap.h:24
PRIM_INFO_DEACT_CIPH
@ PRIM_INFO_DEACT_CIPH
Deactivation of ciphering.
Definition: l1sap.h:29
PRIM_INFO_DEACTIVATE
@ PRIM_INFO_DEACTIVATE
Deactivation of channel.
Definition: l1sap.h:26
PRIM_INFO_TIME
@ PRIM_INFO_TIME
Current GSM time.
Definition: l1sap.h:23
PRIM_INFO_DEACT_UL_ACC
@ PRIM_INFO_DEACT_UL_ACC
Deactivation of uplink access detection.
Definition: l1sap.h:31
PRIM_INFO_MODIFY
@ PRIM_INFO_MODIFY
Mode Modify of channel.
Definition: l1sap.h:27
PRIM_INFO_ACT_UL_ACC
@ PRIM_INFO_ACT_UL_ACC
Activation of uplink access detection.
Definition: l1sap.h:30
PRIM_INFO_ACT_CIPH
@ PRIM_INFO_ACT_CIPH
Activation of ciphering.
Definition: l1sap.h:28
PRIM_INFO_ACTIVATE
@ PRIM_INFO_ACTIVATE
Activation of channel.
Definition: l1sap.h:25
osmo_ph_pres_info_type
osmo_ph_pres_info_type
PH-DATA presence information.
Definition: l1sap.h:35
PRES_INFO_UNKNOWN
@ PRES_INFO_UNKNOWN
Definition: l1sap.h:41
PRES_INFO_HEADER
@ PRES_INFO_HEADER
Only header is present and valid.
Definition: l1sap.h:37
PRES_INFO_BOTH
@ PRES_INFO_BOTH
Both parts + header are present and valid.
Definition: l1sap.h:40
PRES_INFO_SECOND
@ PRES_INFO_SECOND
Second half of data + header are valid (1st halfmay be present but invalid)
Definition: l1sap.h:39
PRES_INFO_INVALID
@ PRES_INFO_INVALID
Data is invalid.
Definition: l1sap.h:36
PRES_INFO_FIRST
@ PRES_INFO_FIRST
First half of data + header are valid (2nd half may be present but invalid)
Definition: l1sap.h:38
osmo_ph_prim
osmo_ph_prim
PH-SAP related primitives (L1<->L2 SAP)
Definition: l1sap.h:8
PRIM_PH_CONN
@ PRIM_PH_CONN
PH-CONNECT.
Definition: l1sap.h:11
PRIM_PH_RTS
@ PRIM_PH_RTS
PH-RTS.
Definition: l1sap.h:13
PRIM_PH_DATA
@ PRIM_PH_DATA
PH-DATA.
Definition: l1sap.h:9
PRIM_PH_RACH
@ PRIM_PH_RACH
PH-RANDOM_ACCESS.
Definition: l1sap.h:10
PRIM_TCH_RTS
@ PRIM_TCH_RTS
TCH.
Definition: l1sap.h:16
PRIM_PH_EMPTY_FRAME
@ PRIM_PH_EMPTY_FRAME
PH-EMPTY_FRAME.
Definition: l1sap.h:12
PRIM_MPH_INFO
@ PRIM_MPH_INFO
MPH-INFO.
Definition: l1sap.h:14
PRIM_TCH
@ PRIM_TCH
TCH.
Definition: l1sap.h:15
prim.h
info_act_cnf_param
for {ACTIVATE,DEACTIVATE} MPH-INFO.cnf
Definition: l1sap.h:135
info_act_cnf_param::cause
uint8_t cause
RSL cause in case of nack.
Definition: l1sap.h:137
info_act_cnf_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:136
info_act_req_param
for {ACTIVATE,DEACTIVATE,MODIFY} MPH-INFO.req
Definition: l1sap.h:129
info_act_req_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:130
info_act_req_param::sacch_only
uint8_t sacch_only
Only deactivate SACCH.
Definition: l1sap.h:131
info_ciph_req_param
for {ACTIVATE,DEACTIVATE} MPH-INFO.
Definition: l1sap.h:141
info_ciph_req_param::downlink
uint8_t downlink
Apply to downlink.
Definition: l1sap.h:143
info_ciph_req_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:142
info_ciph_req_param::uplink
uint8_t uplink
Apply to uplink.
Definition: l1sap.h:144
info_meas_ind_param
for MEAS MPH-INFO.ind
Definition: l1sap.h:115
info_meas_ind_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:116
info_meas_ind_param::is_sub
uint8_t is_sub
flags
Definition: l1sap.h:124
info_meas_ind_param::c_i_cb
int16_t c_i_cb
C/I ratio in 0.1 dB.
Definition: l1sap.h:123
info_meas_ind_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:117
info_meas_ind_param::ta_offs_256bits
int16_t ta_offs_256bits
timing advance offset (in 1/256th bits)
Definition: l1sap.h:121
info_meas_ind_param::ta_offs_qbits
int16_t ta_offs_qbits
timing advance offset (in qbits)
Definition: l1sap.h:120
info_meas_ind_param::ber10k
uint16_t ber10k
BER in units of 0.01%.
Definition: l1sap.h:118
info_meas_ind_param::inv_rssi
uint8_t inv_rssi
RSSI in dBm * -1.
Definition: l1sap.h:125
info_time_ind_param
for TIME MPH-INFO.ind
Definition: l1sap.h:110
info_time_ind_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:111
info_ulacc_req_param
for {ACT_UL_ACC,DEACT_UL_ACC} MPH-INFO.req
Definition: l1sap.h:148
info_ulacc_req_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:149
mph_info_param
for MPH-INFO.ind
Definition: l1sap.h:153
mph_info_param::act_cnf
struct info_act_cnf_param act_cnf
Definition: l1sap.h:159
mph_info_param::u
union mph_info_param::@23 u
mph_info_param::type
enum osmo_mph_info_type type
Info message type.
Definition: l1sap.h:154
mph_info_param::ciph_req
struct info_ciph_req_param ciph_req
Definition: l1sap.h:160
mph_info_param::meas_ind
struct info_meas_ind_param meas_ind
Definition: l1sap.h:157
mph_info_param::ulacc_req
struct info_ulacc_req_param ulacc_req
Definition: l1sap.h:161
mph_info_param::time_ind
struct info_time_ind_param time_ind
Definition: l1sap.h:156
mph_info_param::act_req
struct info_act_req_param act_req
Definition: l1sap.h:158
osmo_phsap_prim
primitive header for PH-SAP primitives
Definition: l1sap.h:166
osmo_phsap_prim::rach_ind
struct ph_rach_ind_param rach_ind
Definition: l1sap.h:172
osmo_phsap_prim::conn_ind
struct ph_conn_ind_param conn_ind
Definition: l1sap.h:173
osmo_phsap_prim::rach_req
struct ph_rach_req_param rach_req
Definition: l1sap.h:171
osmo_phsap_prim::oph
struct osmo_prim_hdr oph
generic primitive header
Definition: l1sap.h:167
osmo_phsap_prim::info
struct mph_info_param info
Definition: l1sap.h:174
osmo_phsap_prim::tch
struct ph_tch_param tch
Definition: l1sap.h:170
osmo_phsap_prim::data
struct ph_data_param data
Definition: l1sap.h:169
osmo_phsap_prim::u
union osmo_phsap_prim::@24 u
request-specific data
osmo_prim_hdr
ph_conn_ind_param
for PH-CONN.ind
Definition: l1sap.h:105
ph_conn_ind_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:106
ph_data_param
for PH-[UNIT]DATA.
Definition: l1sap.h:77
ph_data_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:80
ph_data_param::rssi
int8_t rssi
RSSI of receivedindication.
Definition: l1sap.h:81
ph_data_param::lqual_cb
int16_t lqual_cb
Link quality in centiBel.
Definition: l1sap.h:87
ph_data_param::link_id
uint8_t link_id
Link Identifier (Like RSL)
Definition: l1sap.h:78
ph_data_param::ta_offs_qbits
int16_t ta_offs_qbits
Burst TA Offset in quarter bits.
Definition: l1sap.h:84
ph_data_param::ber10k
uint16_t ber10k
BER in units of 0.01%.
Definition: l1sap.h:82
ph_data_param::pdch_presence_info
enum osmo_ph_pres_info_type pdch_presence_info
Info regarding presence/validity of header and data parts.
Definition: l1sap.h:88
ph_data_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:79
ph_data_param::is_sub
uint8_t is_sub
flags
Definition: l1sap.h:89
ph_data_param::ta_offs_256bits
int16_t ta_offs_256bits
timing advance offset (in 1/256th bits)
Definition: l1sap.h:85
ph_rach_ind_param
for PH-RANDOM_ACCESS.ind
Definition: l1sap.h:62
ph_rach_ind_param::rssi
int8_t rssi
RSSI of RACH indication.
Definition: l1sap.h:70
ph_rach_ind_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:63
ph_rach_ind_param::acc_delay_256bits
int16_t acc_delay_256bits
Burst TA Offset in 1/256th bits.
Definition: l1sap.h:72
ph_rach_ind_param::lqual_cb
int16_t lqual_cb
Link quality in centiBel.
Definition: l1sap.h:73
ph_rach_ind_param::ra
uint16_t ra
Random Access.
Definition: l1sap.h:64
ph_rach_ind_param::acc_delay
uint8_t acc_delay
Delay in bit periods.
Definition: l1sap.h:65
ph_rach_ind_param::ber10k
uint16_t ber10k
BER in units of 0.01%.
Definition: l1sap.h:71
ph_rach_ind_param::fn
uint32_t fn
GSM Frame Number at time of RA.
Definition: l1sap.h:66
ph_rach_ind_param::burst_type
enum ph_burst_type burst_type
type of burst
Definition: l1sap.h:68
ph_rach_ind_param::is_11bit
uint8_t is_11bit
no.of bits in RACH
Definition: l1sap.h:67
ph_rach_req_param
for PH-RANDOM_ACCESS.req
Definition: l1sap.h:45
ph_rach_req_param::ta
uint8_t ta
Timing Advance.
Definition: l1sap.h:47
ph_rach_req_param::offset
uint16_t offset
Timing Offset.
Definition: l1sap.h:50
ph_rach_req_param::is_combined_ccch
uint8_t is_combined_ccch
Are we using a combined CCCH?
Definition: l1sap.h:49
ph_rach_req_param::ra
uint8_t ra
Random Access.
Definition: l1sap.h:46
ph_rach_req_param::tx_power
uint8_t tx_power
Transmit Power.
Definition: l1sap.h:48
ph_tch_param
for TCH.
Definition: l1sap.h:93
ph_tch_param::ta_offs_256bits
int16_t ta_offs_256bits
timing advance offset (in 1/256th bits)
Definition: l1sap.h:100
ph_tch_param::ber10k
uint16_t ber10k
BER in units of 0.01%.
Definition: l1sap.h:98
ph_tch_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:95
ph_tch_param::marker
uint8_t marker
RTP Marker bit (speech onset indicator)
Definition: l1sap.h:97
ph_tch_param::is_sub
uint8_t is_sub
flags
Definition: l1sap.h:101
ph_tch_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:94
ph_tch_param::rssi
int8_t rssi
RSSI of received indication.
Definition: l1sap.h:96
ph_tch_param::lqual_cb
int16_t lqual_cb
Link quality in centiBel.
Definition: l1sap.h:99
value_string