l1sap.h
#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,
};
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,
};
struct ph_rach_req_param {
uint8_t ra;
uint8_t ta;
uint8_t tx_power;
uint8_t is_combined_ccch;
uint16_t offset;
};
struct ph_rach_ind_param {
uint8_t chan_nr;
uint8_t ra;
uint8_t acc_delay;
uint32_t fn;
};
struct ph_data_param {
uint8_t link_id;
uint8_t chan_nr;
uint32_t fn;
int8_t rssi;
};
struct ph_tch_param {
uint8_t chan_nr;
uint32_t fn;
int8_t rssi;
};
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;
uint16_t ber10k;
int16_t ta_offs_qbits;
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_data_param::rssi
int8_t rssi
RSSI of receivedindication.
Definition: l1sap.h:50
info_ciph_req_param::uplink
uint8_t uplink
Apply to uplink.
Definition: l1sap.h:96
ph_conn_ind_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:62
ph_data_param::link_id
uint8_t link_id
Link Identifier (Like RSL)
Definition: l1sap.h:47
info_meas_ind_param::ta_offs_qbits
int16_t ta_offs_qbits
timing advance offset (in qbits)
Definition: l1sap.h:74
info_meas_ind_param::c_i_cb
int16_t c_i_cb
C/I ratio in 0.1 dB.
Definition: l1sap.h:75
info_act_cnf_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:88
ph_data_param
for PH-[UNIT]DATA.{req,ind} | PH-RTS.ind
Definition: l1sap.h:46
info_act_req_param::sacch_only
uint8_t sacch_only
Definition: l1sap.h:83
info_ciph_req_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:94
ph_data_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:48
ph_conn_ind_param
for PH-CONN.ind
Definition: l1sap.h:61
ph_rach_req_param::ta
uint8_t ta
Timing Advance.
Definition: l1sap.h:31
info_act_cnf_param
for {ACTIVATE,DEACTIVATE} MPH-INFO.cnf
Definition: l1sap.h:87
info_ciph_req_param::downlink
uint8_t downlink
Apply to downlink.
Definition: l1sap.h:95
info_meas_ind_param::inv_rssi
uint8_t inv_rssi
RSSI in dBm * -1.
Definition: l1sap.h:77
info_meas_ind_param
for MEAS MPH-INFO.ind
Definition: l1sap.h:71
info_act_req_param
for {ACTIVATE,DEACTIVATE,MODIFY} MPH-INFO.req
Definition: l1sap.h:81
ph_rach_req_param::offset
uint16_t offset
Timing Offset.
Definition: l1sap.h:34
mph_info_param
for MPH-INFO.ind
Definition: l1sap.h:100
ph_tch_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:55
info_act_cnf_param::cause
uint8_t cause
RSL cause in case of nack.
Definition: l1sap.h:89
info_meas_ind_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:72
data
uint8_t data[0]
actual payload data
Definition: gsm_08_58.h:106
ph_rach_req_param
for PH-RANDOM_ACCESS.req
Definition: l1sap.h:29
ph_tch_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:56
ph_tch_param::rssi
int8_t rssi
RSSI of received indication.
Definition: l1sap.h:57
info_time_ind_param
for TIME MPH-INFO.ind
Definition: l1sap.h:66
info_time_ind_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:67
ph_rach_ind_param::acc_delay
uint8_t acc_delay
Delay in bit periods.
Definition: l1sap.h:41
ph_rach_ind_param::fn
uint32_t fn
GSM Frame Number at time of RA.
Definition: l1sap.h:42
ph_tch_param
for TCH.{req,ind} | TCH-RTS.ind
Definition: l1sap.h:54
ph_rach_ind_param::ra
uint8_t ra
Random Access.
Definition: l1sap.h:40
ph_rach_ind_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:39
info_meas_ind_param::ber10k
uint16_t ber10k
BER in units of 0.01%.
Definition: l1sap.h:73
ph_data_param::fn
uint32_t fn
GSM Frame Number.
Definition: l1sap.h:49
info_meas_ind_param::is_sub
uint8_t is_sub
flags
Definition: l1sap.h:76
info_ciph_req_param
for {ACTIVATE,DEACTIVATE} MPH-INFO.{req,cnf}
Definition: l1sap.h:93
info_act_req_param::chan_nr
uint8_t chan_nr
Channel Number (Like RSL)
Definition: l1sap.h:82
ph_rach_req_param::is_combined_ccch
uint8_t is_combined_ccch
Are we using a combined CCCH?
Definition: l1sap.h:33
osmo_phsap_prim
primitive header for PH-SAP primitives
Definition: l1sap.h:112
ph_rach_req_param::ra
uint8_t ra
Random Access.
Definition: l1sap.h:30
ph_rach_req_param::tx_power
uint8_t tx_power
Transmit Power.
Definition: l1sap.h:32
ph_rach_ind_param
for PH-RANDOM_ACCESS.ind
Definition: l1sap.h:38