Commit 1788e576 authored by rdoost's avatar rdoost

added get_Po_NOMINAL_PUSCH2 for read the actuall Po_Nominal_PUSCH, which is...

added get_Po_NOMINAL_PUSCH2 for read the actuall Po_Nominal_PUSCH, which is originally read from prach initial power
parent 3c21e1dd
......@@ -37,7 +37,7 @@
int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP,uint8_t CC_id)
{
RACH_ConfigCommon_t *rach_ConfigCommon = NULL;
UplinkPowerControlCommon_t *uplink_ConfigCommon = NULL;
if (CC_id>0) {
LOG_E(MAC,"Transmission on secondary CCs is not supported yet\n");
//mac_xface->macphy_exit("MAC FATAL CC_id>0");
......@@ -46,6 +46,7 @@ int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP,uint8_t CC_id)
if (UE_mac_inst[module_idP].radioResourceConfigCommon) {
rach_ConfigCommon = &UE_mac_inst[module_idP].radioResourceConfigCommon->rach_ConfigCommon;
uplink_ConfigCommon = &UE_mac_inst[module_idP].radioResourceConfigCommon->uplinkPowerControlCommon;
}
else {
LOG_E(MAC,"[UE %d] CCid %d FATAL radioResourceConfigCommon is NULL !!!\n",module_idP,CC_id);
......@@ -57,6 +58,27 @@ int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP,uint8_t CC_id)
get_DELTA_PREAMBLE(module_idP,CC_id));
}
int8_t get_Po_NOMINAL_PUSCH2(module_id_t module_idP,uint8_t CC_id)
{
UplinkPowerControlCommon_t *uplink_ConfigCommon = NULL;
if (CC_id>0) {
LOG_E(MAC,"Transmission on secondary CCs is not supported yet\n");
//mac_xface->macphy_exit("MAC FATAL CC_id>0");
return 0;
}
if (UE_mac_inst[module_idP].radioResourceConfigCommon) {
uplink_ConfigCommon = &UE_mac_inst[module_idP].radioResourceConfigCommon->uplinkPowerControlCommon;
}
else {
LOG_E(MAC,"[UE %d] CCid %d FATAL radioResourceConfigCommon is NULL !!!\n",module_idP,CC_id);
//mac_xface->macphy_exit("FATAL radioResourceConfigCommon is NULL");
return 0;
}
printf("p0_NominalPUSCH %d\n", uplink_ConfigCommon->p0_NominalPUSCH);
return((uplink_ConfigCommon->p0_NominalPUSCH));
}
int8_t get_deltaP_rampup(module_id_t module_idP,uint8_t CC_id)
{
......
......@@ -499,6 +499,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui
mac_xface->get_n_adj_cells = get_n_adj_cells;
mac_xface->get_rx_total_gain_dB = get_rx_total_gain_dB;
mac_xface->get_Po_NOMINAL_PUSCH = get_Po_NOMINAL_PUSCH;
mac_xface->get_Po_NOMINAL_PUSCH2 = get_Po_NOMINAL_PUSCH2;
mac_xface->get_num_prach_tdd = get_num_prach_tdd;
mac_xface->get_fid_prach_tdd = get_fid_prach_tdd;
mac_xface->get_deltaP_rampup = get_deltaP_rampup;
......
......@@ -128,6 +128,7 @@ void schedule_ue_spec(module_id_t module_idP,frame_t frameP,sub_frame_t subframe
@returns Po_NOMINAL_PUSCH (PREAMBLE_RECEIVED_TARGET_POWER+DELTA_PREAMBLE
*/
int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP,uint8_t CC_id);
int8_t get_Po_NOMINAL_PUSCH2(module_id_t module_idP,uint8_t CC_id);
/** \brief Function to compute DELTA_PREAMBLE from 36.321 (for RA power ramping procedure and Msg3 PUSCH power control policy)
@param Mod_id Module id of UE
......
......@@ -308,6 +308,7 @@ typedef struct {
// MAC Helper functions
/// Function for UE/PHY to compute PUSCH transmit power in power-control procedure (Po_NOMINAL_PUSCH parameter)
int8_t (*get_Po_NOMINAL_PUSCH)(module_id_t Mod_id,uint8_t CC_id);
int8_t (*get_Po_NOMINAL_PUSCH2)(module_id_t Mod_id,uint8_t CC_id);
/// Function for UE/PHY to compute PUSCH transmit power in power-control procedure (deltaP_rampup parameter)
int8_t (*get_deltaP_rampup)(module_id_t Mod_id,uint8_t CC_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment