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,
};
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;/* !< Burst TA Offset in 1/256th bits */
};
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; /* !< Burst TA Offset in quarter bits */
int16_t ta_offs_256bits;
};
int16_t lqual_cb; /* !< Link quality in centiBel */
enum osmo_ph_pres_info_type pdch_presence_info;
};
struct ph_tch_param {
uint8_t chan_nr;
uint32_t fn;
int8_t rssi;
uint8_t marker;
uint16_t ber10k;
int16_t lqual_cb; /* !< Link quality in centiBel */
};
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 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;
} 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;
};
ph_tch_param::rssi
int8_t rssi
RSSI of received indication.
Definition: l1sap.h:92
ph_tch_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:90
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:85
ph_data_param::ber10k
uint16_t ber10k
BER in units of 0.01%.
Definition: l1sap.h:79
ph_rach_ind_param
for PH-RANDOM_ACCESS.ind
Definition: l1sap.h:60
ph_rach_ind_param::fn
uint32_t fn
GSM Frame Number at time of RA.
Definition: l1sap.h:64
info_meas_ind_param::ta_offs_256bits
int16_t ta_offs_256bits
timing advance offset (in 1/256th bits)
Definition: l1sap.h:115
PRES_INFO_BOTH
@ PRES_INFO_BOTH
Both parts + header are present and valid.
Definition: l1sap.h:38
osmo_phsap_prim::tch
struct ph_tch_param tch
Definition: l1sap.h:158
info_act_req_param
for {ACTIVATE,DEACTIVATE,MODIFY} MPH-INFO.req
Definition: l1sap.h:123
ph_tch_param::lqual_cb
int16_t lqual_cb
Definition: l1sap.h:95
ph_conn_ind_param
for PH-CONN.ind
Definition: l1sap.h:99
osmo_phsap_prim
primitive header for PH-SAP primitives
Definition: l1sap.h:154
ph_rach_ind_param::burst_type
enum ph_burst_type burst_type
type of burst
Definition: l1sap.h:66
info_ciph_req_param::uplink
uint8_t uplink
Apply to uplink.
Definition: l1sap.h:138
ph_rach_req_param::ra
uint8_t ra
Random Access.
Definition: l1sap.h:44
PRIM_PH_RACH
@ PRIM_PH_RACH
PH-RANDOM_ACCESS.
Definition: l1sap.h:10
osmo_phsap_prim::oph
struct osmo_prim_hdr oph
generic primitive header
Definition: l1sap.h:155
PRIM_INFO_DEACT_CIPH
@ PRIM_INFO_DEACT_CIPH
Deactivation of ciphering.
Definition: l1sap.h:29
info_meas_ind_param::ta_offs_qbits
int16_t ta_offs_qbits
timing advance offset (in qbits)
Definition: l1sap.h:114
info_ciph_req_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:136
info_ciph_req_param
for {ACTIVATE,DEACTIVATE} MPH-INFO.
Definition: l1sap.h:135
ph_tch_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:91
info_meas_ind_param::c_i_cb
int16_t c_i_cb
C/I ratio in 0.1 dB.
Definition: l1sap.h:117
PRES_INFO_FIRST
@ PRES_INFO_FIRST
First half of data + header are valid (2nd half may be present but invalid)
Definition: l1sap.h:36
GSM_L1_BURST_TYPE_ACCESS_0
@ GSM_L1_BURST_TYPE_ACCESS_0
Definition: l1sap.h:54
ph_rach_ind_param::acc_delay
uint8_t acc_delay
Delay in bit periods.
Definition: l1sap.h:63
osmo_phsap_prim::conn_ind
struct ph_conn_ind_param conn_ind
Definition: l1sap.h:161
info_ciph_req_param::downlink
uint8_t downlink
Apply to downlink.
Definition: l1sap.h:137
info_act_cnf_param::cause
uint8_t cause
RSL cause in case of nack.
Definition: l1sap.h:131
PRIM_MPH_INFO
@ PRIM_MPH_INFO
MPH-INFO.
Definition: l1sap.h:14
ph_rach_ind_param::ra
uint16_t ra
Random Access.
Definition: l1sap.h:62
PRIM_INFO_DEACTIVATE
@ PRIM_INFO_DEACTIVATE
Deactivation of channel.
Definition: l1sap.h:26
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
ph_tch_param::ber10k
uint16_t ber10k
BER in units of 0.01%.
Definition: l1sap.h:94
PRIM_PH_RTS
@ PRIM_PH_RTS
PH-RTS.
Definition: l1sap.h:13
ph_data_param::ta_offs_256bits
int16_t ta_offs_256bits
timing advance offset (in 1/256th bits)
Definition: l1sap.h:82
ph_rach_ind_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:61
ph_data_param::link_id
uint8_t link_id
Link Identifier (Like RSL)
Definition: l1sap.h:75
info_meas_ind_param::inv_rssi
uint8_t inv_rssi
RSSI in dBm * -1.
Definition: l1sap.h:119
info_act_cnf_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:130
PRIM_PH_EMPTY_FRAME
@ PRIM_PH_EMPTY_FRAME
PH-EMPTY_FRAME.
Definition: l1sap.h:12
mph_info_param
for MPH-INFO.ind
Definition: l1sap.h:142
ph_rach_req_param::ta
uint8_t ta
Timing Advance.
Definition: l1sap.h:45
ph_rach_ind_param::rssi
int8_t rssi
RSSI of RACH indication.
Definition: l1sap.h:68
ph_tch_param::marker
uint8_t marker
RTP Marker bit (speech onset indicator)
Definition: l1sap.h:93
info_act_cnf_param
for {ACTIVATE,DEACTIVATE} MPH-INFO.cnf
Definition: l1sap.h:129
mph_info_param::type
enum osmo_mph_info_type type
Info message type.
Definition: l1sap.h:143
mph_info_param::act_cnf
struct info_act_cnf_param act_cnf
Definition: l1sap.h:148
PRIM_PH_CONN
@ PRIM_PH_CONN
PH-CONNECT.
Definition: l1sap.h:11
mph_info_param::meas_ind
struct info_meas_ind_param meas_ind
Definition: l1sap.h:146
osmo_phsap_prim::data
struct ph_data_param data
Definition: l1sap.h:157
info_meas_ind_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:110
PRIM_INFO_MEAS
@ PRIM_INFO_MEAS
Measurement indication.
Definition: l1sap.h:24
mph_info_param::act_req
struct info_act_req_param act_req
Definition: l1sap.h:147
info_act_req_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:124
info_act_req_param::sacch_only
uint8_t sacch_only
\breif Only deactivate SACCH
Definition: l1sap.h:125
ph_data_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:77
PRES_INFO_UNKNOWN
@ PRES_INFO_UNKNOWN
Definition: l1sap.h:39
PRIM_TCH
@ PRIM_TCH
TCH.
Definition: l1sap.h:15
ph_data_param::ta_offs_qbits
int16_t ta_offs_qbits
Definition: l1sap.h:81
mph_info_param::time_ind
struct info_time_ind_param time_ind
Definition: l1sap.h:145
ph_rach_req_param::offset
uint16_t offset
Timing Offset.
Definition: l1sap.h:48
osmo_phsap_prim::info
struct mph_info_param info
Definition: l1sap.h:162
mph_info_param::u
union mph_info_param::@6 u
ph_rach_ind_param::acc_delay_256bits
int16_t acc_delay_256bits
Definition: l1sap.h:70
ph_data_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:76
ph_rach_req_param
for PH-RANDOM_ACCESS.req
Definition: l1sap.h:43
mph_info_param::ciph_req
struct info_ciph_req_param ciph_req
Definition: l1sap.h:149
info_meas_ind_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:111
PRIM_TCH_RTS
@ PRIM_TCH_RTS
TCH.
Definition: l1sap.h:16
osmo_ph_prim_names
const struct value_string osmo_ph_prim_names[]
Definition: lapdm.c:117
ph_rach_req_param::tx_power
uint8_t tx_power
Transmit Power.
Definition: l1sap.h:46
info_time_ind_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:105
ph_conn_ind_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:100
ph_tch_param
for TCH.
Definition: l1sap.h:89
ph_data_param
for PH-[UNIT]DATA.
Definition: l1sap.h:74
ph_burst_type
ph_burst_type
for PH_RA_IND burstType inforamtion
Definition: l1sap.h:52
PRIM_INFO_TIME
@ PRIM_INFO_TIME
Current GSM time.
Definition: l1sap.h:23
osmo_phsap_prim::rach_ind
struct ph_rach_ind_param rach_ind
Definition: l1sap.h:160
PRIM_INFO_MODIFY
@ PRIM_INFO_MODIFY
Mode Modify of channel.
Definition: l1sap.h:27
PRES_INFO_SECOND
@ PRES_INFO_SECOND
Second half of data + header are valid (1st halfmay be present but invalid)
Definition: l1sap.h:37
osmo_mph_info_type
osmo_mph_info_type
PH-SAP related primitives (L1<->L2 SAP)
Definition: l1sap.h:22
info_meas_ind_param::ber10k
uint16_t ber10k
BER in units of 0.01%.
Definition: l1sap.h:112
GSM_L1_BURST_TYPE_ACCESS_1
@ GSM_L1_BURST_TYPE_ACCESS_1
Definition: l1sap.h:55
info_meas_ind_param
for MEAS MPH-INFO.ind
Definition: l1sap.h:109
ph_rach_ind_param::ber10k
uint16_t ber10k
BER in units of 0.01%.
Definition: l1sap.h:69
osmo_ph_prim
osmo_ph_prim
PH-SAP related primitives (L1<->L2 SAP)
Definition: l1sap.h:8
ph_data_param::lqual_cb
int16_t lqual_cb
Definition: l1sap.h:84
PRES_INFO_HEADER
@ PRES_INFO_HEADER
Only header is present and valid.
Definition: l1sap.h:35
osmo_phsap_prim::u
union osmo_phsap_prim::@7 u
request-specific data
ph_rach_req_param::is_combined_ccch
uint8_t is_combined_ccch
Are we using a combined CCCH?
Definition: l1sap.h:47
osmo_phsap_prim::rach_req
struct ph_rach_req_param rach_req
Definition: l1sap.h:159
GSM_L1_BURST_TYPE_NONE
@ GSM_L1_BURST_TYPE_NONE
Definition: l1sap.h:53
info_meas_ind_param::is_sub
uint8_t is_sub
flags
Definition: l1sap.h:118
ph_rach_ind_param::is_11bit
uint8_t is_11bit
no.of bits in RACH
Definition: l1sap.h:65
PRIM_PH_DATA
@ PRIM_PH_DATA
PH-DATA.
Definition: l1sap.h:9
info_time_ind_param
for TIME MPH-INFO.ind
Definition: l1sap.h:104
PRES_INFO_INVALID
@ PRES_INFO_INVALID
Data is invalid.
Definition: l1sap.h:34
GSM_L1_BURST_TYPE_ACCESS_2
@ GSM_L1_BURST_TYPE_ACCESS_2
Definition: l1sap.h:56
ph_data_param::rssi
int8_t rssi
RSSI of receivedindication.
Definition: l1sap.h:78
osmo_ph_pres_info_type
osmo_ph_pres_info_type
PH-DATA presence information.
Definition: l1sap.h:33