Added message-based communication between L2 and L1 regarding NTN configuration parameters
This commit is contained in:
@@ -338,6 +338,8 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
free_and_zero(ue->prs_vars[idx]);
|
||||
}
|
||||
|
||||
free_and_zero(ue->ntn_config_message);
|
||||
|
||||
sl_ue_free(ue);
|
||||
}
|
||||
|
||||
|
||||
@@ -322,6 +322,11 @@ typedef struct UE_NR_SCAN_INFO_s {
|
||||
int32_t freq_offset_Hz[3][10];
|
||||
} UE_NR_SCAN_INFO_t;
|
||||
|
||||
typedef struct {
|
||||
bool update;
|
||||
fapi_nr_dl_ntn_config_command_pdu ntn_config_params;
|
||||
} ntn_config_message_t;
|
||||
|
||||
/// Top-level PHY Data Structure for UE
|
||||
typedef struct PHY_VARS_NR_UE_s {
|
||||
/// \brief Module ID indicator for this instance
|
||||
@@ -532,6 +537,9 @@ typedef struct PHY_VARS_NR_UE_s {
|
||||
sl_nr_ue_phy_params_t SL_UE_PHY_PARAMS;
|
||||
Actor_t sync_actor;
|
||||
Actor_t dl_actors[NUM_DL_ACTORS];
|
||||
|
||||
ntn_config_message_t* ntn_config_message;
|
||||
|
||||
} PHY_VARS_NR_UE;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -326,6 +326,19 @@ static void configure_dlsch(NR_UE_DLSCH_t *dlsch0,
|
||||
}
|
||||
}
|
||||
|
||||
static void configure_ntn_params(PHY_VARS_NR_UE *ue, fapi_nr_dl_ntn_config_command_pdu* ntn_params_message)
|
||||
{
|
||||
if (!ue->ntn_config_message) {
|
||||
ue->ntn_config_message = CALLOC(1, sizeof(*ue->ntn_config_message));
|
||||
}
|
||||
|
||||
ue->ntn_config_message->ntn_config_params.cell_specific_k_offset = ntn_params_message->cell_specific_k_offset;
|
||||
ue->ntn_config_message->ntn_config_params.N_common_ta_adj = ntn_params_message->N_common_ta_adj;
|
||||
ue->ntn_config_message->ntn_config_params.ntn_ta_commondrift = ntn_params_message->ntn_ta_commondrift;
|
||||
ue->ntn_config_message->ntn_config_params.ntn_total_time_advance_ms = ntn_params_message->ntn_total_time_advance_ms;
|
||||
ue->ntn_config_message->update = true;
|
||||
}
|
||||
|
||||
static void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_command_pdu)
|
||||
{
|
||||
/* Time Alignment procedure
|
||||
@@ -451,6 +464,9 @@ static void nr_ue_scheduled_response_dl(NR_UE_MAC_INST_t *mac,
|
||||
case FAPI_NR_CONFIG_TA_COMMAND:
|
||||
configure_ta_command(phy, &pdu->ta_command_pdu);
|
||||
break;
|
||||
case FAPI_NR_DL_NTN_CONFIG_PARAMS:
|
||||
configure_ntn_params(phy, &pdu->ntn_config_command_pdu);
|
||||
break;
|
||||
default:
|
||||
LOG_W(PHY, "unhandled dl pdu type %d \n", pdu->pdu_type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user