@ -163,9 +163,9 @@ void mac_nr::update_buffer_states()
mac_interface_phy_nr : : sched_rnti_t mac_nr : : get_ul_sched_rnti_nr ( const uint32_t tti )
mac_interface_phy_nr : : sched_rnti_t mac_nr : : get_ul_sched_rnti_nr ( const uint32_t tti )
{
{
if ( proc_ra. has_temp_crnti( ) & & has_crnti ( ) = = false ) {
if ( has_temp_crnti( ) & & has_crnti ( ) = = false ) {
logger . debug ( " SCHED: Searching temp C-RNTI=0x%x (proc_ra) " , proc_ra. get_temp_c rnti( ) ) ;
logger . debug ( " SCHED: Searching temp C-RNTI=0x%x (proc_ra) " , rntis. get_temp_ rnti( ) ) ;
return { proc_ra. get_temp_c rnti( ) , srsran_rnti_type_c } ;
return { rntis. get_temp_ rnti( ) , srsran_rnti_type_c } ;
}
}
return { rntis . get_crnti ( ) , srsran_rnti_type_c } ;
return { rntis . get_crnti ( ) , srsran_rnti_type_c } ;
}
}
@ -195,9 +195,9 @@ mac_interface_phy_nr::sched_rnti_t mac_nr::get_dl_sched_rnti_nr(const uint32_t t
return { proc_ra . get_rar_rnti ( ) , srsran_rnti_type_ra } ;
return { proc_ra . get_rar_rnti ( ) , srsran_rnti_type_ra } ;
}
}
if ( proc_ra. has_temp_crnti( ) & & has_crnti ( ) = = false ) {
if ( has_temp_crnti( ) & & has_crnti ( ) = = false ) {
logger . debug ( " SCHED: Searching temp C-RNTI=0x%x (proc_ra) " , proc_ra. get_temp_c rnti( ) ) ;
logger . debug ( " SCHED: Searching temp C-RNTI=0x%x (proc_ra) " , rntis. get_temp_ rnti( ) ) ;
return { proc_ra. get_temp_c rnti( ) , srsran_rnti_type_c } ;
return { rntis. get_temp_ rnti( ) , srsran_rnti_type_c } ;
}
}
if ( has_crnti ( ) ) {
if ( has_crnti ( ) ) {
@ -209,6 +209,26 @@ mac_interface_phy_nr::sched_rnti_t mac_nr::get_dl_sched_rnti_nr(const uint32_t t
return { SRSRAN_INVALID_RNTI , srsran_rnti_type_c } ;
return { SRSRAN_INVALID_RNTI , srsran_rnti_type_c } ;
}
}
bool mac_nr : : has_temp_crnti ( )
{
return rntis . get_temp_rnti ( ) ! = SRSRAN_INVALID_RNTI ;
}
uint16_t mac_nr : : get_temp_crnti ( )
{
return rntis . get_temp_rnti ( ) ;
}
void mac_nr : : set_temp_crnti ( uint16_t temp_crnti )
{
rntis . set_temp_rnti ( temp_crnti ) ;
}
void mac_nr : : set_crnti_to_temp ( )
{
rntis . set_crnti_to_temp ( ) ;
}
bool mac_nr : : has_crnti ( )
bool mac_nr : : has_crnti ( )
{
{
return rntis . get_crnti ( ) ! = SRSRAN_INVALID_RNTI ;
return rntis . get_crnti ( ) ! = SRSRAN_INVALID_RNTI ;
@ -219,11 +239,6 @@ uint16_t mac_nr::get_crnti()
return rntis . get_crnti ( ) ;
return rntis . get_crnti ( ) ;
}
}
uint16_t mac_nr : : get_temp_crnti ( )
{
return proc_ra . get_temp_crnti ( ) ;
}
srsran : : mac_sch_subpdu_nr : : lcg_bsr_t mac_nr : : generate_sbsr ( )
srsran : : mac_sch_subpdu_nr : : lcg_bsr_t mac_nr : : generate_sbsr ( )
{
{
return proc_bsr . generate_sbsr ( ) ;
return proc_bsr . generate_sbsr ( ) ;
@ -309,7 +324,7 @@ void mac_nr::new_grant_dl(const uint32_t cc_idx, const mac_nr_grant_dl_t& grant,
void mac_nr : : tb_decoded ( const uint32_t cc_idx , const mac_nr_grant_dl_t & grant , tb_action_dl_result_t result )
void mac_nr : : tb_decoded ( const uint32_t cc_idx , const mac_nr_grant_dl_t & grant , tb_action_dl_result_t result )
{
{
logger . debug ( " tb_decoded(): cc_idx=%d, tti=%d, rnti= %d , pid=%d, tbs=%d, ndi=%d, rv=%d, result=%s" ,
logger . debug ( " tb_decoded(): cc_idx=%d, tti=%d, rnti= 0x%X , pid=%d, tbs=%d, ndi=%d, rv=%d, result=%s" ,
cc_idx ,
cc_idx ,
grant . tti ,
grant . tti ,
grant . rnti ,
grant . rnti ,
@ -336,14 +351,14 @@ void mac_nr::tb_decoded(const uint32_t cc_idx, const mac_nr_grant_dl_t& grant, t
}
}
// If proc ra is in contention resolution (RA connection request procedure)
// If proc ra is in contention resolution (RA connection request procedure)
if ( proc_ra . is_contention_resolution ( ) & & grant . rnti = = get_temp_c rnti( ) ) {
if ( proc_ra . is_contention_resolution ( ) & & grant . rnti = = rntis. get_temp_rnti( ) ) {
proc_ra . received_contention_resolution ( contention_res_successful ) ;
proc_ra . received_contention_resolution ( contention_res_successful ) ;
}
}
}
}
void mac_nr : : new_grant_ul ( const uint32_t cc_idx , const mac_nr_grant_ul_t & grant , tb_action_ul_t * action )
void mac_nr : : new_grant_ul ( const uint32_t cc_idx , const mac_nr_grant_ul_t & grant , tb_action_ul_t * action )
{
{
logger . debug ( " new_grant_ul(): cc_idx=%d, tti=%d, rnti= %d , pid=%d, tbs=%d, ndi=%d, rv=%d, is_rar=%d" ,
logger . debug ( " new_grant_ul(): cc_idx=%d, tti=%d, rnti= 0x%X , pid=%d, tbs=%d, ndi=%d, rv=%d, is_rar=%d" ,
cc_idx ,
cc_idx ,
grant . tti ,
grant . tti ,
grant . rnti ,
grant . rnti ,