Here we see the main function of read_mac_sm
void read_mac_sm(mac_ind_msg_t* data)
{
assert(data != NULL);
data->tstamp = time_now_us();
// assert(0!=0 && "Read MAC called");
const NR_UE_info_t* UE_info = &RC.nrmac[mod_id]->UE_info;
const size_t num_ues = UE_info->num_UEs;
data->len_ue_stats = num_ues;
if(data->len_ue_stats > 0){
data->ue_stats = calloc(data->len_ue_stats, sizeof(mac_ue_stats_impl_t));
assert( data->ue_stats != NULL && "Memory exhausted" );
}
const NR_list_t* ue_list = &UE_info->list;
size_t i = 0;
for (int ue_id = ue_list->head; ue_id >= 0; ue_id = ue_list->next[ue_id]) {
const NR_UE_sched_ctrl_t* sched_ctrl = &UE_info->UE_sched_ctrl[ue_id];
const NR_mac_stats_t* uestats = &UE_info->mac_stats[ue_id];
mac_ue_stats_impl_t* rd = &data->ue_stats[i];
rd->dl_aggr_tbs = uestats->dlsch_total_bytes;
rd->ul_aggr_tbs = uestats->ulsch_total_bytes_rx;
rd->rnti = UE_info->rnti[ue_id];
rd->dl_aggr_prb = uestats->dlsch_total_rbs;
rd->ul_aggr_prb = uestats->ulsch_total_rbs;
rd->dl_aggr_retx_prb = uestats->dlsch_total_rbs_retx ;
rd->dl_aggr_bytes_sdus = uestats->lc_bytes_tx[3] ;
rd->ul_aggr_bytes_sdus = uestats->lc_bytes_rx[3];
rd->dl_aggr_sdus = uestats->dlsch_num_mac_sdu;
rd->ul_aggr_sdus = uestats->ulsch_num_mac_sdu;
rd->pusch_snr = (float) sched_ctrl->pusch_snrx10 / 10; //: float = -64;
rd->pucch_snr = (float) sched_ctrl->pucch_snrx10 / 10 ; //: float = -64;
// no CQI measurements implemented in OAI 5G yet
rd->wb_cqi = 0;
rd->dl_mcs1 = sched_ctrl->sched_pdsch.mcs;
rd->ul_mcs1 = sched_ctrl->sched_pusch.mcs ;
rd->dl_mcs2 = 0;
rd->ul_mcs2 = 0;
rd->phr = sched_ctrl->ph;
++i;
}
}
mac_ind_msg_t - MAC indication message
time_now_us - giving us a realtime in secods, and microseconds
NR_UE_info_t - UE list used by gNB to order UEs/CC for scheduling
NR_list_t - NR_list_t is a "list" (of users, HARQ processes, slices). Especially useful in the scheduler and to keep "classes" of users.
NR_UE_sched_ctrl_t - sheduling control information set through an API
NR_mac_stats_t - sheduling control info
mac_ue_stats_impl_t - implement MAC UE stats
Personal information: :::warning Name: Lev Fetman Email: lfetman@gmail.com Dept.: Computer engineering, National university of life and environmental science Intern Topic: O-RAN (RIC) Mentor: YuehHuan LinkedIn
Nov 4, 2022:::warning ::: First of all I'm Ukrainian student from Kyiv, Ukraine. I'm right now at the third university year and my majority is computer engineering. Due to war in Ukraine i couldn't study normal. Besides that some of my teachers are currently at the frontline. So, I decided to apply for this internship and I'm very happy that I got such a great opportunity to learn something new. he studying for me was pretty hard because I didn't have some knowledges which other guys had, so it took me a lot of time for understanding some technologies. But after first mounth I started to understand most of these technologies. Everyday I did a small report, for showing my progress and sharing with everyone some useful information. Besides that our group had a weekly meeting every thursday and monday where we discussed our future goals and our work which we have already done. In total, I would say that this internship gave me new experiences and motivation for continuing study this sphere. The knowledges which I received will stay with me forever.
Sep 8, 2022:::warning ::: [TOC] Before initialization of gNB, we have to prepare RU (radio units) Where restart_L1L2 has such schema:
Aug 25, 2022:::warning ::: Here is the call graph for this function: Lets see the schema of read_mac_sm, read_rlc_sm, read_pdcp_sm
Aug 24, 2022or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up