Loading...
Searching...
No Matches
l1sap.h
Go to the documentation of this file.
#pragma once
#include <osmocom/core/prim.h>
enum osmo_ph_prim {
PRIM_PH_DATA,
PRIM_PH_RACH,
PRIM_PH_CONN,
PRIM_PH_EMPTY_FRAME,
PRIM_PH_RTS,
PRIM_MPH_INFO,
PRIM_TCH,
PRIM_TCH_RTS,
};
extern const struct value_string osmo_ph_prim_names[];
enum osmo_mph_info_type {
PRIM_INFO_TIME,
PRIM_INFO_MEAS,
PRIM_INFO_ACTIVATE,
PRIM_INFO_DEACTIVATE,
PRIM_INFO_MODIFY,
PRIM_INFO_ACT_CIPH,
PRIM_INFO_DEACT_CIPH,
PRIM_INFO_ACT_UL_ACC,
PRIM_INFO_DEACT_UL_ACC,
};
enum osmo_ph_pres_info_type {
PRES_INFO_INVALID = 0,
PRES_INFO_HEADER = 1,
PRES_INFO_FIRST = 3,
PRES_INFO_SECOND = 5,
PRES_INFO_BOTH = 7,
PRES_INFO_UNKNOWN
};
struct ph_rach_req_param {
uint8_t ra;
uint8_t ta;
uint8_t tx_power;
uint8_t is_combined_ccch;
uint16_t offset;
};
enum ph_burst_type {
GSM_L1_BURST_TYPE_NONE = 0,
GSM_L1_BURST_TYPE_ACCESS_0,
GSM_L1_BURST_TYPE_ACCESS_1,
GSM_L1_BURST_TYPE_ACCESS_2
};
struct ph_rach_ind_param {
uint8_t chan_nr;
uint16_t ra;
uint8_t acc_delay;
uint32_t fn;
uint8_t is_11bit;
enum ph_burst_type burst_type;
/* elements added on 2018-02-26 */
int8_t rssi;
uint16_t ber10k;
int16_t acc_delay_256bits;
int16_t lqual_cb;
};
struct ph_data_param {
uint8_t link_id;
uint8_t chan_nr;
uint32_t fn;
int8_t rssi;
uint16_t ber10k;
union {
int16_t ta_offs_qbits;
int16_t ta_offs_256bits;
};
int16_t lqual_cb;
enum osmo_ph_pres_info_type pdch_presence_info;
uint8_t is_sub:1;
};
struct ph_tch_param {
uint8_t chan_nr;
uint32_t fn;
int8_t rssi;
uint8_t marker;
uint16_t ber10k;
int16_t lqual_cb;
int16_t ta_offs_256bits;
uint8_t is_sub:1;
};
struct ph_conn_ind_param {
uint32_t fn;
};
struct info_time_ind_param {
uint32_t fn;
};
struct info_meas_ind_param {
uint8_t chan_nr;
uint32_t fn;
uint16_t ber10k;
union {
int16_t ta_offs_qbits;
int16_t ta_offs_256bits;
};
int16_t c_i_cb;
uint8_t is_sub:1;
uint8_t inv_rssi;
};
struct info_act_req_param {
uint8_t chan_nr;
uint8_t sacch_only;
};
struct info_act_cnf_param {
uint8_t chan_nr;
uint8_t cause;
};
struct info_ciph_req_param {
uint8_t chan_nr;
uint8_t downlink;
uint8_t uplink;
};
struct info_ulacc_req_param {
uint8_t chan_nr;
};
struct mph_info_param {
enum osmo_mph_info_type type;
union {
struct info_time_ind_param time_ind;
struct info_meas_ind_param meas_ind;
struct info_act_req_param act_req;
struct info_act_cnf_param act_cnf;
struct info_ciph_req_param ciph_req;
struct info_ulacc_req_param ulacc_req;
} u;
};
struct osmo_phsap_prim {
struct osmo_prim_hdr oph;
union {
struct ph_data_param data;
struct ph_tch_param tch;
struct ph_rach_req_param rach_req;
struct ph_rach_ind_param rach_ind;
struct ph_conn_ind_param conn_ind;
struct mph_info_param info;
} u;
};
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::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::u
union mph_info_param::@065101000171355033306115273207162036155272203045 u
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::u
union osmo_phsap_prim::@002041354154245250012145236015372167130306256341 u
request-specific data
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_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