Commit a0ba68d5 authored by winckel's avatar winckel

Added some parameters in RRC configuration message:

- Default PCCH DRX cycle.
- FDD/TDD mode.
Blocked TDD config field in SIB1 when in FDD mode.
Removed some obsolete cellular functions.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5007 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 0c6b2b32
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "as_message.h" #include "as_message.h"
#include "rrc_types.h" #include "rrc_types.h"
#include "s1ap_messages_types.h"
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Messages for RRC logging // Messages for RRC logging
...@@ -57,12 +58,16 @@ typedef struct RrcStateInd_s{ ...@@ -57,12 +58,16 @@ typedef struct RrcStateInd_s{
// eNB: ENB_APP -> RRC messages // eNB: ENB_APP -> RRC messages
typedef struct RrcConfigurationReq_s { typedef struct RrcConfigurationReq_s {
uint32_t cell_identity; uint32_t cell_identity;
uint16_t tac; uint16_t tac;
uint16_t mcc; uint16_t mcc;
uint16_t mnc; uint16_t mnc;
paging_drx_t default_drx;
lte_frame_type_t frame_type;
} RrcConfigurationReq; } RrcConfigurationReq;
// UE: NAS -> RRC messages // UE: NAS -> RRC messages
......
...@@ -89,6 +89,8 @@ static void configure_rrc(uint32_t enb_id) ...@@ -89,6 +89,8 @@ static void configure_rrc(uint32_t enb_id)
RRC_CONFIGURATION_REQ (msg_p).tac = enb_properties[enb_id]->tac; RRC_CONFIGURATION_REQ (msg_p).tac = enb_properties[enb_id]->tac;
RRC_CONFIGURATION_REQ (msg_p).mcc = enb_properties[enb_id]->mcc; RRC_CONFIGURATION_REQ (msg_p).mcc = enb_properties[enb_id]->mcc;
RRC_CONFIGURATION_REQ (msg_p).mnc = enb_properties[enb_id]->mnc; RRC_CONFIGURATION_REQ (msg_p).mnc = enb_properties[enb_id]->mnc;
RRC_CONFIGURATION_REQ (msg_p).default_drx = enb_properties[enb_id]->default_drx;
RRC_CONFIGURATION_REQ (msg_p).frame_type = enb_properties[enb_id]->frame_type;
itti_send_msg_to_task (TASK_RRC_ENB, enb_id, msg_p); itti_send_msg_to_task (TASK_RRC_ENB, enb_id, msg_p);
} }
......
...@@ -514,11 +514,16 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer ...@@ -514,11 +514,16 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer
// ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,NULL); // ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,NULL);
(*sib1)->tdd_Config = CALLOC(1,sizeof(struct TDD_Config)); #if defined(ENABLE_ITTI)
if (configuration->frame_type == TDD)
#endif
{
(*sib1)->tdd_Config = CALLOC(1,sizeof(struct TDD_Config));
(*sib1)->tdd_Config->subframeAssignment=frame_parms->tdd_config; //TDD_Config__subframeAssignment_sa3; (*sib1)->tdd_Config->subframeAssignment=frame_parms->tdd_config; //TDD_Config__subframeAssignment_sa3;
(*sib1)->tdd_Config->specialSubframePatterns=0;//frame_parms->tdd_config_S;//TDD_Config__specialSubframePatterns_ssp0; (*sib1)->tdd_Config->specialSubframePatterns=0;//frame_parms->tdd_config_S;//TDD_Config__specialSubframePatterns_ssp0;
}
(*sib1)->si_WindowLength=SystemInformationBlockType1__si_WindowLength_ms20; (*sib1)->si_WindowLength=SystemInformationBlockType1__si_WindowLength_ms20;
(*sib1)->systemInfoValueTag=0; (*sib1)->systemInfoValueTag=0;
...@@ -564,9 +569,13 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer ...@@ -564,9 +569,13 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer
} }
uint8_t do_SIB2_AT4(uint8_t Mod_id, uint8_t do_SIB2_AT4(uint8_t Mod_id,
uint8_t *buffer, uint8_t *buffer,
BCCH_DL_SCH_Message_t *bcch_message, BCCH_DL_SCH_Message_t *bcch_message,
SystemInformationBlockType2_t **sib2) { SystemInformationBlockType2_t **sib2
#if defined(ENABLE_ITTI)
, RrcConfigurationReq *configuration
#endif
) {
struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib2_part; struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib2_part;
...@@ -623,10 +632,12 @@ uint8_t do_SIB2_AT4(uint8_t Mod_id, ...@@ -623,10 +632,12 @@ uint8_t do_SIB2_AT4(uint8_t Mod_id,
// PCCH-Config // PCCH-Config
(*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle=PCCH_Config__defaultPagingCycle_rf128; (*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle =
#if defined(ENABLE_ITTI)
configuration->default_drx;
(*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle=PCCH_Config__defaultPagingCycle_rf128; #else
PCCH_Config__defaultPagingCycle_rf128;
#endif
(*sib2)->radioResourceConfigCommon.pcch_Config.nB=PCCH_Config__nB_oneT; (*sib2)->radioResourceConfigCommon.pcch_Config.nB=PCCH_Config__nB_oneT;
// PRACH-Config // PRACH-Config
...@@ -767,6 +778,9 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -767,6 +778,9 @@ uint8_t do_SIB23(uint8_t Mod_id,
, ,
SystemInformationBlockType13_r9_t **sib13, SystemInformationBlockType13_r9_t **sib13,
uint8_t MBMS_flag uint8_t MBMS_flag
#endif
#if defined(ENABLE_ITTI)
, RrcConfigurationReq *configuration
#endif #endif
) { ) {
struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib2_part,*sib3_part; struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib2_part,*sib3_part;
...@@ -851,7 +865,12 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -851,7 +865,12 @@ uint8_t do_SIB23(uint8_t Mod_id,
// PCCH-Config // PCCH-Config
(*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle=PCCH_Config__defaultPagingCycle_rf128; (*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle =
#if defined(ENABLE_ITTI)
configuration->default_drx;
#else
PCCH_Config__defaultPagingCycle_rf128;
#endif
(*sib2)->radioResourceConfigCommon.pcch_Config.nB=PCCH_Config__nB_oneT; (*sib2)->radioResourceConfigCommon.pcch_Config.nB=PCCH_Config__nB_oneT;
...@@ -2415,759 +2434,6 @@ OAI_UECapability_t *fill_ue_capability() { ...@@ -2415,759 +2434,6 @@ OAI_UECapability_t *fill_ue_capability() {
return(&UECapability); return(&UECapability);
} }
/************************************
CELLULAR ADAPTED FUNCTION
***********************************/
//-----------------------------------------------------------------------------
uint8_t do_SIB1_TDD_config_cell (LTE_DL_FRAME_PARMS *frame_parms,TDD_Config_t *tdd_Config){
//-----------------------------------------------------------------------------
tdd_Config->subframeAssignment=frame_parms->tdd_config; //TDD_Config__subframeAssignment_sa3;
tdd_Config->specialSubframePatterns=0;//frame_parms->tdd_config_S;//TDD_Config__specialSubframePatterns_ssp0;
//msg ("ASN1 TDD_config %d\n", frame_parms->tdd_config);
return 0;
}
//-----------------------------------------------------------------------------
// Build SIB2 for RRC Cellular (extracted from do_SIB23)
uint8_t do_SIB2_cell(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer,
BCCH_DL_SCH_Message_t *bcch_message, SystemInformationBlockType2_t **sib2) {
//-----------------------------------------------------------------------------
struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member *sib2_part;
asn_enc_rval_t enc_rval;
if (bcch_message)
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_t));
else {
LOG_E(RRC,"BCCH_MESSAGE is null, exiting\n");
exit(-1);
}
if (!sib2) {
LOG_E(RRC,"sib2 is null, exiting\n");
exit(-1);
}
LOG_I(RRC,"Configuration SIB2 CELLULAR\n");
sib2_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member));
memset(sib2_part,0,sizeof(struct SystemInformation_r8_IEs_sib_TypeAndInfo_Member));
sib2_part->present = SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib2;
*sib2 = &sib2_part->choice.sib2;
// sib2
(*sib2)->ac_BarringInfo = NULL;
#ifdef Rel10
(*sib2)->ssac_BarringForMMTEL_Voice_r9 = NULL;
(*sib2)->ssac_BarringForMMTEL_Video_r9 = NULL;
(*sib2)->ac_BarringForCSFB_r10 = NULL;
#endif
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles=RACH_ConfigCommon__preambleInfo__numberOfRA_Preambles_n64;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep=RACH_ConfigCommon__powerRampingParameters__powerRampingStep_dB2;
#ifdef EXMIMO
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower=RACH_ConfigCommon__powerRampingParameters__preambleInitialReceivedTargetPower_dBm_100;
#else
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower=RACH_ConfigCommon__powerRampingParameters__preambleInitialReceivedTargetPower_dBm_108;
#endif
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax=RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize=RACH_ConfigCommon__ra_SupervisionInfo__ra_ResponseWindowSize_sf4;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer=RACH_ConfigCommon__ra_SupervisionInfo__mac_ContentionResolutionTimer_sf48;
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx = 4;
// BCCH-Config
(*sib2)->radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff=BCCH_Config__modificationPeriodCoeff_n2;
// PCCH-Config
(*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle=PCCH_Config__defaultPagingCycle_rf128;
(*sib2)->radioResourceConfigCommon.pcch_Config.nB=PCCH_Config__nB_oneT;
// PRACH-Config
(*sib2)->radioResourceConfigCommon.prach_Config.rootSequenceIndex=Mod_id;//0;//384;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex = 0;//3;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag = 0;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig = 1;//12;
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset = 2;
// PDSCH-Config
#ifdef EXMIMO
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=0;
#else
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=15;
#endif
if (frame_parms->mode1_flag==1)
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b=0;
else
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b=1;
// PUSCH-Config
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB=1;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode=PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled=1;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled=0;
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift=0;
// PUCCH-Config
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift=PUCCH_ConfigCommon__deltaPUCCH_Shift_ds1;
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI = 1;
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN = 0;
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN = 32;
(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present=SoundingRS_UL_ConfigCommon_PR_release;
(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.release=0;
// uplinkPowerControlCommon
#ifdef EXMIMO
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH = -90;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH = -96;
#else
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH = -108;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH = -108;
#endif
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.alpha=UplinkPowerControlCommon__alpha_al1;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1=DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b=DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2=DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a=DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b=DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0;
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 = 6;
(*sib2)->radioResourceConfigCommon.ul_CyclicPrefixLength=UL_CyclicPrefixLength_len1;
(*sib2)->ue_TimersAndConstants.t300=UE_TimersAndConstants__t300_ms1000;
(*sib2)->ue_TimersAndConstants.t301=UE_TimersAndConstants__t301_ms1000;
(*sib2)->ue_TimersAndConstants.t310=UE_TimersAndConstants__t310_ms1000;
(*sib2)->ue_TimersAndConstants.n310=UE_TimersAndConstants__n310_n20;
(*sib2)->ue_TimersAndConstants.t311=UE_TimersAndConstants__t311_ms10000;
(*sib2)->ue_TimersAndConstants.n311=UE_TimersAndConstants__n311_n1;
(*sib2)->freqInfo.additionalSpectrumEmission = 1;
(*sib2)->freqInfo.ul_CarrierFreq = NULL;
(*sib2)->freqInfo.ul_Bandwidth = NULL;
// (*sib2)->mbsfn_SubframeConfigList = NULL;
(*sib2)->mbsfn_SubframeConfigList = NULL;
(*sib2)->timeAlignmentTimerCommon=TimeAlignmentTimer_sf5120;
// end fill sib2
bcch_message->message.present = BCCH_DL_SCH_MessageType_PR_c1;
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType__c1_PR_systemInformation;
bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.present = SystemInformation__criticalExtensions_PR_systemInformation_r8;
bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count=0;
// asn_set_empty(&systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list);//.size=0;
// systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count=0;
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,
sib2_part);
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message,
(void*)bcch_message,
buffer,
900);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_BCCH_DL_SCH_Message, (void *) &bcch_message)) > 0)
{
MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_BCCH, message_string_size + sizeof (IttiMsgText));
msg_p->ittiMsg.rrc_dl_bcch.size = message_string_size;
memcpy(&msg_p->ittiMsg.rrc_dl_bcch.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, msg_p);
}
}
# endif
#endif
#ifdef USER_MODE
LOG_D(RRC,"[eNB] SystemInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif
if (enc_rval.encoded==-1) {
msg("[RRC] ASN1 : SI encoding failed for SIB2 Cell\n");
return(-1);
}
return((enc_rval.encoded+7)/8);
}
//-----------------------------------------------------------------------------
uint8_t do_RRCConnReconf_defaultCELL(uint8_t Mod_id,
uint8_t *buffer,
uint8_t UE_id,
uint8_t Transaction_id,
/* struct SRB_ToAddMod **SRB2_config,
struct DRB_ToAddMod **DRB_config,*/
SRB_ToAddModList_t **SRB_configList,
DRB_ToAddModList_t **DRB_configList,
struct PhysicalConfigDedicated **physicalConfigDedicated) {
//-----------------------------------------------------------------------------
asn_enc_rval_t enc_rval;
/*
struct SRB_ToAddMod **SRB2_config = &rrc_inst->SRB2_config[UE_id];
struct DRB_ToAddMod **DRB_config = &rrc_inst->DRB_config[UE_id][0];
struct PhysicalConfigDedicated **physicalConfigDedicated = &rrc_inst->physicalConfigDedicated[UE_id];
*/
struct SRB_ToAddMod *SRB2_config2;
struct SRB_ToAddMod__rlc_Config *SRB2_rlc_config;
struct SRB_ToAddMod__logicalChannelConfig *SRB2_lchan_config;
struct LogicalChannelConfig__ul_SpecificParameters *SRB2_ul_SpecificParameters;
SRB_ToAddModList_t *SRB_configList2;
//struct DRB_ToAddMod **DRB_config;
struct DRB_ToAddMod *DRB_config2;
struct RLC_Config *DRB_rlc_config;
struct PDCP_Config *DRB_pdcp_config;
struct PDCP_Config__rlc_UM *PDCP_rlc_UM;
struct LogicalChannelConfig *DRB_lchan_config;
struct LogicalChannelConfig__ul_SpecificParameters *DRB_ul_SpecificParameters;
// DRB_ToAddModList_t *DRB_list;
MeasObjectToAddModList_t *MeasObj_list;
MeasObjectToAddMod_t *MeasObj;
ReportConfigToAddModList_t *ReportConfig_list;
ReportConfigToAddMod_t *ReportConfig_per,*ReportConfig_A1,*ReportConfig_A2,*ReportConfig_A3,*ReportConfig_A4,*ReportConfig_A5;
MeasIdToAddModList_t *MeasId_list;
MeasIdToAddMod_t *MeasId0,*MeasId1,*MeasId2,*MeasId3,*MeasId4,*MeasId5;
#ifdef Rel10
long * sr_ProhibitTimer_r9;
#endif
#if CBA
struct PUSCH_CBAConfigDedicated_vlola *pusch_CBAConfigDedicated_vlola;
#endif
long *logicalchannelgroup,*logicalchannelgroup_drb;
long *maxHARQ_Tx, *periodicBSR_Timer;
DL_DCCH_Message_t dl_dcch_msg;
RRCConnectionReconfiguration_t *rrcConnectionReconfiguration;
// long *lcid;
// RSRP_Range_t *rsrp;
// struct MeasConfig__speedStatePars *Sparams;
CellsToAddMod_t *CellToAdd;
CellsToAddModList_t *CellsToAddModList;
int i;
memset(&dl_dcch_msg,0,sizeof(DL_DCCH_Message_t));
dl_dcch_msg.message.present = DL_DCCH_MessageType_PR_c1;
dl_dcch_msg.message.choice.c1.present = DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration;
rrcConnectionReconfiguration = &dl_dcch_msg.message.choice.c1.choice.rrcConnectionReconfiguration;
// RRCConnectionReconfiguration
// Configure SRB2
//SRB_list = CALLOC(1,sizeof(*SRB_list));
// SRB2
SRB2_config2 = CALLOC(1,sizeof(*SRB2_config2));
//*SRB2_config = SRB2_config2;
SRB_configList2 = CALLOC(1,sizeof(*SRB_configList2));
memset(SRB_configList2,0,sizeof(*SRB_configList2));
SRB2_config2->srb_Identity = 2;
SRB2_rlc_config = CALLOC(1,sizeof(*SRB2_rlc_config));
SRB2_config2->rlc_Config = SRB2_rlc_config;
SRB2_rlc_config->present = SRB_ToAddMod__rlc_Config_PR_explicitValue;
/* Used for standard srb2
SRB2_rlc_config->choice.explicitValue.present=RLC_Config_PR_am;
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = T_PollRetransmit_ms15;
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = PollPDU_p8;
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = PollByte_kB1000;
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = UL_AM_RLC__maxRetxThreshold_t32;
SRB2_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = T_Reordering_ms50;
SRB2_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = T_StatusProhibit_ms10;
*/
SRB2_rlc_config->choice.explicitValue.present=RLC_Config_PR_um_Bi_Directional;
SRB2_rlc_config->choice.explicitValue.choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = SN_FieldLength_size10;
SRB2_rlc_config->choice.explicitValue.choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = SN_FieldLength_size10;
SRB2_rlc_config->choice.explicitValue.choice.um_Bi_Directional.dl_UM_RLC.t_Reordering = T_Reordering_ms5;
SRB2_lchan_config = CALLOC(1,sizeof(*SRB2_lchan_config));
SRB2_config2->logicalChannelConfig = SRB2_lchan_config;
SRB2_lchan_config->present = SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
SRB2_ul_SpecificParameters = CALLOC(1,sizeof(*SRB2_ul_SpecificParameters));
SRB2_ul_SpecificParameters->priority = 1;
SRB2_ul_SpecificParameters->prioritisedBitRate = LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
SRB2_ul_SpecificParameters->bucketSizeDuration = LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
logicalchannelgroup = CALLOC(1,sizeof(long));
*logicalchannelgroup=0;
SRB2_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup;
SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters = SRB2_ul_SpecificParameters;
//ASN_SEQUENCE_ADD(&SRB_list->list,SRB2_config2);
//ASN_SEQUENCE_ADD(&SRB_configList->list,SRB2_config2);
ASN_SEQUENCE_ADD(&((*SRB_configList)->list),SRB2_config2);
ASN_SEQUENCE_ADD(&SRB_configList2->list,SRB2_config2);
// Configure DRB
//DRB_list = CALLOC(1,sizeof(*DRB_list));
*DRB_configList = CALLOC(1,sizeof(*DRB_configList));
/// DRB
DRB_config2 = CALLOC(1,sizeof(*DRB_config2));
//*DRB_config = DRB_config2;
//DRB_config2->drb_Identity = 1;
DRB_config2->drb_Identity = (DRB_Identity_t) (UE_id+1); //allowed values 1..32
//lcid = CALLOC(1,sizeof(*lcid));
//*lcid = 3;
//DRB_config2->logicalChannelIdentity = lcid;
DRB_config2->logicalChannelIdentity = CALLOC(1,sizeof(long));
*(DRB_config2->logicalChannelIdentity) = (long) 3;
DRB_rlc_config = CALLOC(1,sizeof(*DRB_rlc_config));
DRB_config2->rlc_Config = DRB_rlc_config;
DRB_rlc_config->present=RLC_Config_PR_um_Bi_Directional;
DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength=SN_FieldLength_size10;
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength=SN_FieldLength_size10;
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering=T_Reordering_ms5;
DRB_pdcp_config = CALLOC(1,sizeof(*DRB_pdcp_config));
DRB_config2->pdcp_Config = DRB_pdcp_config;
DRB_pdcp_config->discardTimer=NULL;
DRB_pdcp_config->rlc_AM = NULL;
PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
DRB_pdcp_config->rlc_UM =PDCP_rlc_UM;
PDCP_rlc_UM->pdcp_SN_Size = PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits;
DRB_pdcp_config->headerCompression.present = PDCP_Config__headerCompression_PR_notUsed;
DRB_lchan_config = CALLOC(1,sizeof(*DRB_lchan_config));
DRB_config2->logicalChannelConfig = DRB_lchan_config;
DRB_ul_SpecificParameters = CALLOC(1,sizeof(*DRB_ul_SpecificParameters));
DRB_lchan_config->ul_SpecificParameters = DRB_ul_SpecificParameters;
DRB_ul_SpecificParameters->priority = 2; // lower priority than srb1, srb2
DRB_ul_SpecificParameters->prioritisedBitRate=LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
DRB_ul_SpecificParameters->bucketSizeDuration=LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
// LCG for DTCH can take the value from 1 to 3 as defined in 36331: normally controlled by upper layers (like RRM)
logicalchannelgroup_drb = CALLOC(1,sizeof(long));
*logicalchannelgroup_drb=1;
DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb;
//ASN_SEQUENCE_ADD(&DRB_list->list,DRB_config2);
ASN_SEQUENCE_ADD(&(*DRB_configList)->list,DRB_config2);
rrcConnectionReconfiguration->rrc_TransactionIdentifier = Transaction_id;
rrcConnectionReconfiguration->criticalExtensions.present = RRCConnectionReconfiguration__criticalExtensions_PR_c1;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.present =RRCConnectionReconfiguration__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r8 ;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated = CALLOC(1,sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->srb_ToAddModList = (SRB_ToAddModList_t *)*SRB_configList;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList = (DRB_ToAddModList_t *)*DRB_configList;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToReleaseList = NULL;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->sps_Config = NULL;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->physicalConfigDedicated = NULL;
//rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig = NULL;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig = CALLOC(1,sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->present =RadioResourceConfigDedicated__mac_MainConfig_PR_explicitValue;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.ul_SCH_Config = CALLOC(1,sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.ul_SCH_Config));
maxHARQ_Tx = CALLOC(1,sizeof(long));
*maxHARQ_Tx=MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
periodicBSR_Timer = CALLOC(1,sizeof(long));
*periodicBSR_Timer = MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf64;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.ul_SCH_Config->retxBSR_Timer = MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf320;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.ul_SCH_Config->ttiBundling=0; // FALSE
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.drx_Config = NULL;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.phr_Config = CALLOC(1,sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.phr_Config));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.phr_Config->present = MAC_MainConfig__phr_Config_PR_setup;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.phr_Config->choice.setup.periodicPHR_Timer= MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20; // sf20 = 20 subframes
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.phr_Config->choice.setup.prohibitPHR_Timer=MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20; // sf20 = 20 subframes
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.phr_Config->choice.setup.dl_PathlossChange=MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1; // Value dB1 =1 dB, dB3 = 3 dB
#ifdef Rel10
sr_ProhibitTimer_r9 = CALLOC(1,sizeof(long));
*sr_ProhibitTimer_r9=0; // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2= 2*SR
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue.sr_ProhibitTimer_r9=sr_ProhibitTimer_r9;
#endif
#ifdef CBA
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->sps_CBA_ConfigList_vlola = NULL;
#endif
// rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig = NULL;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig = CALLOC(1,sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig));
memset((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig,
0,sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig));
// Measurement ID list
MeasId_list = CALLOC(1,sizeof(*MeasId_list));
memset((void *)MeasId_list,0,sizeof(*MeasId_list));
MeasId0 = CALLOC(1,sizeof(*MeasId0));
MeasId0->measId = 1;
MeasId0->measObjectId = 1;
MeasId0->reportConfigId = 1;
ASN_SEQUENCE_ADD(&MeasId_list->list,MeasId0);
MeasId1 = CALLOC(1,sizeof(*MeasId1));
MeasId1->measId = 2;
MeasId1->measObjectId = 1;
MeasId1->reportConfigId = 2;
ASN_SEQUENCE_ADD(&MeasId_list->list,MeasId1);
MeasId2 = CALLOC(1,sizeof(*MeasId2));
MeasId2->measId = 3;
MeasId2->measObjectId = 1;
MeasId2->reportConfigId = 3;
ASN_SEQUENCE_ADD(&MeasId_list->list,MeasId2);
MeasId3 = CALLOC(1,sizeof(*MeasId3));
MeasId3->measId = 4;
MeasId3->measObjectId = 1;
MeasId3->reportConfigId = 4;
ASN_SEQUENCE_ADD(&MeasId_list->list,MeasId3);
MeasId4 = CALLOC(1,sizeof(*MeasId4));
MeasId4->measId = 5;
MeasId4->measObjectId = 1;
MeasId4->reportConfigId = 5;
ASN_SEQUENCE_ADD(&MeasId_list->list,MeasId4);
MeasId5 = CALLOC(1,sizeof(*MeasId5));
MeasId5->measId = 6;
MeasId5->measObjectId = 1;
MeasId5->reportConfigId = 6;
ASN_SEQUENCE_ADD(&MeasId_list->list,MeasId5);
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measIdToAddModList = MeasId_list;
// Add one EUTRA Measurement Object
MeasObj_list = CALLOC(1,sizeof(*MeasObj_list));
memset((void *)MeasObj_list,0,sizeof(*MeasObj_list));
// Configure MeasObject
MeasObj = CALLOC(1,sizeof(*MeasObj));
memset((void *)MeasObj,0,sizeof(*MeasObj));
MeasObj->measObjectId = 1;
MeasObj->measObject.present = MeasObjectToAddMod__measObject_PR_measObjectEUTRA;
MeasObj->measObject.choice.measObjectEUTRA.carrierFreq = 36090;
MeasObj->measObject.choice.measObjectEUTRA.allowedMeasBandwidth = AllowedMeasBandwidth_mbw25;
MeasObj->measObject.choice.measObjectEUTRA.presenceAntennaPort1 = 1;
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf = CALLOC(1,sizeof(uint8_t));
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf[0] = 0;
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.size = 1;
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.bits_unused = 6;
MeasObj->measObject.choice.measObjectEUTRA.offsetFreq = NULL; // Default is 15 or 0dB
MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList = (CellsToAddModList_t *)CALLOC(1,sizeof(*CellsToAddModList));
CellsToAddModList = MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList;
// Add adjacent cell lists (6 per eNB)
for (i=0;i<6;i++) {
CellToAdd = (CellsToAddMod_t *)CALLOC(1,sizeof(*CellToAdd));
CellToAdd->cellIndex = i+1;
CellToAdd->physCellId = get_adjacent_cell_id(Mod_id,i);
CellToAdd->cellIndividualOffset = Q_OffsetRange_dB0;
ASN_SEQUENCE_ADD(&CellsToAddModList->list,CellToAdd);
}
ASN_SEQUENCE_ADD(&MeasObj_list->list,MeasObj);
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measObjectToAddModList = MeasObj_list;
// Report Configurations for periodical, A1-A5 events
ReportConfig_list = CALLOC(1,sizeof(*ReportConfig_list));
memset((void *)ReportConfig_list,0,sizeof(*ReportConfig_list));
ReportConfig_per = CALLOC(1,sizeof(*ReportConfig_per));
memset((void *)ReportConfig_per,0,sizeof(*ReportConfig_per));
ReportConfig_A1 = CALLOC(1,sizeof(*ReportConfig_A1));
memset((void *)ReportConfig_A1,0,sizeof(*ReportConfig_A1));
ReportConfig_A2 = CALLOC(1,sizeof(*ReportConfig_A2));
memset((void *)ReportConfig_A2,0,sizeof(*ReportConfig_A2));
ReportConfig_A3 = CALLOC(1,sizeof(*ReportConfig_A3));
memset((void *)ReportConfig_A3,0,sizeof(*ReportConfig_A3));
ReportConfig_A4 = CALLOC(1,sizeof(*ReportConfig_A4));
memset((void *)ReportConfig_A4,0,sizeof(*ReportConfig_A4));
ReportConfig_A5 = CALLOC(1,sizeof(*ReportConfig_A5));
memset((void *)ReportConfig_A5,0,sizeof(*ReportConfig_A5));
ReportConfig_per->reportConfigId = 1;
ReportConfig_per->reportConfig.present = ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.triggerType.present = ReportConfigEUTRA__triggerType_PR_periodical;
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.triggerType.choice.periodical.purpose = ReportConfigEUTRA__triggerType__periodical__purpose_reportStrongestCells;
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.triggerQuantity = ReportConfigEUTRA__triggerQuantity_rsrp;
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.reportQuantity = ReportConfigEUTRA__reportQuantity_both;
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.reportInterval = ReportInterval_ms120;
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.reportAmount = ReportConfigEUTRA__reportAmount_infinity;
ASN_SEQUENCE_ADD(&ReportConfig_list->list,ReportConfig_per);
ReportConfig_A1->reportConfigId = 2;
ReportConfig_A1->reportConfig.present = ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.triggerType.present = ReportConfigEUTRA__triggerType_PR_event;
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present = ReportConfigEUTRA__triggerType__event__eventId_PR_eventA1;
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA1.a1_Threshold.present = ThresholdEUTRA_PR_threshold_RSRP;
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA1.a1_Threshold.choice.threshold_RSRP = 10;
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.triggerQuantity = ReportConfigEUTRA__triggerQuantity_rsrp;
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.reportQuantity = ReportConfigEUTRA__reportQuantity_both;
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.reportInterval = ReportInterval_ms120;
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.reportAmount = ReportConfigEUTRA__reportAmount_infinity;
ASN_SEQUENCE_ADD(&ReportConfig_list->list,ReportConfig_A1);
ReportConfig_A2->reportConfigId = 3;
ReportConfig_A2->reportConfig.present = ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.present = ReportConfigEUTRA__triggerType_PR_event;
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present = ReportConfigEUTRA__triggerType__event__eventId_PR_eventA2;
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA2.a2_Threshold.present = ThresholdEUTRA_PR_threshold_RSRP;
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA2.a2_Threshold.choice.threshold_RSRP = 10;
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerQuantity = ReportConfigEUTRA__triggerQuantity_rsrp;
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportQuantity = ReportConfigEUTRA__reportQuantity_both;
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportInterval = ReportInterval_ms120;
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportAmount = ReportConfigEUTRA__reportAmount_infinity;
ASN_SEQUENCE_ADD(&ReportConfig_list->list,ReportConfig_A2);
ReportConfig_A3->reportConfigId = 4;
ReportConfig_A3->reportConfig.present = ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.present = ReportConfigEUTRA__triggerType_PR_event;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present = ReportConfigEUTRA__triggerType__event__eventId_PR_eventA3;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA3.a3_Offset = 10;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA3.reportOnLeave = 1;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerQuantity = ReportConfigEUTRA__triggerQuantity_rsrp;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportQuantity = ReportConfigEUTRA__reportQuantity_both;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportInterval = ReportInterval_ms120;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportAmount = ReportConfigEUTRA__reportAmount_infinity;
ASN_SEQUENCE_ADD(&ReportConfig_list->list,ReportConfig_A3);
ReportConfig_A4->reportConfigId = 5;
ReportConfig_A4->reportConfig.present = ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.present = ReportConfigEUTRA__triggerType_PR_event;
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present = ReportConfigEUTRA__triggerType__event__eventId_PR_eventA4;
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA4.a4_Threshold.present = ThresholdEUTRA_PR_threshold_RSRP;
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA4.a4_Threshold.choice.threshold_RSRP = 10;
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerQuantity = ReportConfigEUTRA__triggerQuantity_rsrp;
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportQuantity = ReportConfigEUTRA__reportQuantity_both;
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportInterval = ReportInterval_ms120;
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportAmount = ReportConfigEUTRA__reportAmount_infinity;
ASN_SEQUENCE_ADD(&ReportConfig_list->list,ReportConfig_A4);
ReportConfig_A5->reportConfigId = 6;
ReportConfig_A5->reportConfig.present = ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.present = ReportConfigEUTRA__triggerType_PR_event;
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present = ReportConfigEUTRA__triggerType__event__eventId_PR_eventA5;
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA5.a5_Threshold1.present = ThresholdEUTRA_PR_threshold_RSRP;
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA5.a5_Threshold2.present = ThresholdEUTRA_PR_threshold_RSRP;
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA5.a5_Threshold1.choice.threshold_RSRP = 10;
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA5.a5_Threshold2.choice.threshold_RSRP = 10;
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerQuantity = ReportConfigEUTRA__triggerQuantity_rsrp;
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportQuantity = ReportConfigEUTRA__reportQuantity_both;
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportInterval = ReportInterval_ms120;
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportAmount = ReportConfigEUTRA__reportAmount_infinity;
ASN_SEQUENCE_ADD(&ReportConfig_list->list,ReportConfig_A5);
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->reportConfigToAddModList = ReportConfig_list;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo = NULL;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.dedicatedInfoNASList = NULL;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO = NULL;
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
(void*)&dl_dcch_msg,
buffer,
100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %d)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
#ifdef XER_PRINT
xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)&dl_dcch_msg);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_DCCH_Message, (void *) &dl_dcch_msg)) > 0)
{
MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText));
msg_p->ittiMsg.rrc_dl_dcch.size = message_string_size;
memcpy(&msg_p->ittiMsg.rrc_dl_dcch.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, msg_p);
}
}
# endif
#endif
LOG_I(RRC,"RRCConnectionReconfiguration Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
//FREEMEM(SRB_list);
//FREEMEM(DRB_list);
return((enc_rval.encoded+7)/8);
}
//-----------------------------------------------------------------------------
uint8_t do_DRB_UE_MAC_config_cell (MAC_MainConfig_t *mac_MainConfig){
//-----------------------------------------------------------------------------
/*
Typedef struct MAC_MainConfig {
struct MAC_MainConfig__ul_SCH_Config {
long *maxHARQ_Tx // OPTIONAL ;
long *periodicBSR_Timer // OPTIONAL ;
long retxBSR_Timer;
BOOLEAN_t ttiBundling;
// Context for parsing across buffer boundaries
asn_struct_ctx_t _asn_ctx;
} *ul_SCH_Config;
struct DRX_Config *drx_Config // OPTIONAL ;
TimeAlignmentTimer_t timeAlignmentTimerDedicated;
struct MAC_MainConfig__phr_Config {
MAC_MainConfig__phr_Config_PR present;
union MAC_MainConfig__phr_Config_u {
NULL_t release;
struct MAC_MainConfig__phr_Config__setup {
long periodicPHR_Timer;
long prohibitPHR_Timer;
long dl_PathlossChange;
// Context for parsing across buffer boundaries
asn_struct_ctx_t _asn_ctx;
} setup;
} choice;
// Context for parsing across buffer boundaries
asn_struct_ctx_t _asn_ctx;
} *phr_Config;
//Context for parsing across buffer boundaries
asn_struct_ctx_t _asn_ctx;
} MAC_MainConfig_t;
*/
//*************************
//mac_MainConfig->present =RadioResourceConfigDedicated__mac_MainConfig_PR_explicitValue;
//mac_MainConfig->choice.explicitValue.ul_SCH_Config = CALLOC(1,sizeof(*mac_MainConfig->choice.explicitValue.ul_SCH_Config));
//mac_MainConfig->ul_SCH_Config = CALLOC(1,sizeof(*mac_MainConfig->choice.explicitValue.ul_SCH_Config));
long *maxHARQ_Tx;
long *periodicBSR_Timer;
mac_MainConfig->ul_SCH_Config = CALLOC(1,sizeof(*mac_MainConfig->ul_SCH_Config));
maxHARQ_Tx = CALLOC(1,sizeof(long));
*maxHARQ_Tx=MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
periodicBSR_Timer = CALLOC(1,sizeof(long));
*periodicBSR_Timer = MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf64;
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf320;
mac_MainConfig->ul_SCH_Config->ttiBundling=0; // FALSE
mac_MainConfig->drx_Config = NULL;
mac_MainConfig->phr_Config = CALLOC(1,sizeof(*mac_MainConfig->phr_Config));
mac_MainConfig->phr_Config->present = MAC_MainConfig__phr_Config_PR_setup;
mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer= MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20; // sf20 = 20 subframes
mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer=MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20; // sf20 = 20 subframes
mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange=MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1; // Value dB1 =1 dB, dB3 = 3 dB
//*************************
return 0;
}
/************************************
END CELLULAR ADAPTED FUNCTIONS
***********************************/
#ifndef USER_MODE #ifndef USER_MODE
int init_module(void) int init_module(void)
{ {
......
...@@ -104,6 +104,9 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -104,6 +104,9 @@ uint8_t do_SIB23(uint8_t Mod_id,
SystemInformationBlockType13_r9_t **sib13, SystemInformationBlockType13_r9_t **sib13,
uint8_t MBMS_flag uint8_t MBMS_flag
#endif #endif
#if defined(ENABLE_ITTI)
, RrcConfigurationReq *configuration
#endif
); );
/** /**
......
...@@ -218,13 +218,20 @@ static void init_SI (u8 Mod_id ...@@ -218,13 +218,20 @@ static void init_SI (u8 Mod_id
, ,
&eNB_rrc_inst[Mod_id].sib13, &eNB_rrc_inst[Mod_id].sib13,
eNB_rrc_inst[Mod_id].MBMS_flag eNB_rrc_inst[Mod_id].MBMS_flag
#endif
#if defined(ENABLE_ITTI)
, configuration
#endif #endif
); );
/* /*
eNB_rrc_inst[Mod_id].sizeof_SIB23 = do_SIB2_AT4(Mod_id, eNB_rrc_inst[Mod_id].sizeof_SIB23 = do_SIB2_AT4(Mod_id,
eNB_rrc_inst[Mod_id].SIB23, eNB_rrc_inst[Mod_id].SIB23,
&eNB_rrc_inst[Mod_id].systemInformation, &eNB_rrc_inst[Mod_id].systemInformation,
&eNB_rrc_inst[Mod_id].sib2); &eNB_rrc_inst[Mod_id].sib2,
#if defined(ENABLE_ITTI)
, configuration
#endif
);
*/ */
if (eNB_rrc_inst[Mod_id].sizeof_SIB23 == 255) if (eNB_rrc_inst[Mod_id].sizeof_SIB23 == 255)
mac_xface->macphy_exit ("[RRC][init_SI] FATAL, eNB_rrc_inst[Mod_id].sizeof_SIB23 == 255"); mac_xface->macphy_exit ("[RRC][init_SI] FATAL, eNB_rrc_inst[Mod_id].sizeof_SIB23 == 255");
......
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