Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected override void SourceEvents_ProcedureStarted(DTEUtranL3.IRrcProcedure Proc, object pDisp)
- {
- try
- {
- Logger.WriteDebugLog($"SourceEvents_ProcedureStarted Start...");
- base.SourceEvents_ProcedureStarted(Proc, pDisp);
- DTEUtranL3.UEProxyRrc ueProxyRrc = pDisp as DTEUtranL3.UEProxyRrc;
- //EnableStrongestCellMeasurement property is at UEProxyRrc and needs to be set before L3 encodes the default Rrc Connection Reconfiguration Message
- ueProxyRrc.EnableStrongestCellMeasurement = this.Context.ModelReader[this.CellId].CellTap.CellHost.UEReport;
- // IPrimaryComponentCarrier
- //if (this.Context.CurrentUeProxyRrc != null)
- //{
- // var cc = this.Context.CurrentUeProxyRrc.UEProxyEx.ComponentCarriers.Find(COMPONENT_CARRIER_TYPE.PRIMARY_CC, 1);
- // cc.PrimaryComponentCarrier.PucchFormat3 = (this.Context.ModelReader[this.CellId].PhyTap.PucchFormat == PUCCHFormatType.T3);
- //}
- IConnectionReconfiguration connReconfigProc = Proc as IConnectionReconfiguration;
- // Pointer to Target Drbs List.
- //var drbs = connReconfigProc.TargetDrbList;
- //DapiUtils.SetDRBProperties(drbs, this.Context.ModelReader[this.CellId]);
- //Overwrite message if required
- if (m_overwriteMsg != null)
- {
- Logger.WriteDebugLog("LTE RRC Connection Reconfiguration procedure started, overwriting DL message");
- Logger.WriteDebugLog("Setting AutoEncodeDLMessage to false");
- connReconfigProc.AutoEncodeDLMessage = false;
- Logger.WriteDebugLog("Setting ConfigureMode to LOCAL_RESOURCE_CONFIGURATION_MODE_AUTO_USING_DL_MESSAGE ");
- connReconfigProc.ConfigureMode = LOCAL_RESOURCE_CONFIGURATION_MODE.LOCAL_RESOURCE_CONFIGURATION_MODE_AUTO_USING_DL_MESSAGE;
- // set proc DLMessage to ours
- DTUtils.DataUnit overwriteReconfigMsgUnitData = new DTUtils.DataUnit();
- overwriteReconfigMsgUnitData.SetDataBits(m_overwriteMsg.Length * 8, ref m_overwriteMsg[0]);
- connReconfigProc.DLMessage = overwriteReconfigMsgUnitData;
- m_overwriteMsg = null;
- }
- else
- {
- Logger.WriteDebugLog("LTE RRC Connection Reconfiguration procedure started, no overwrite message");
- Logger.WriteDebugLog("Setting AutoEncodeDLMessage to true");
- connReconfigProc.AutoEncodeDLMessage = true;
- Logger.WriteDebugLog("Setting ConfigureMode to LOCAL_RESOURCE_CONFIGURATION_MODE_AUTO_DEFAULT ");
- connReconfigProc.ConfigureMode = LOCAL_RESOURCE_CONFIGURATION_MODE.LOCAL_RESOURCE_CONFIGURATION_MODE_AUTO_DEFAULT;
- }
- if (m_isBho)
- {
- Logger.WriteDebugLog("LTE RRC Connection Reconfiguration procedure started, for BHO; configuring destination Cell DAPI for Cell Id: {0}", this.CellId.ToString());
- var cell = ueProxyRrc.ActiveCellRrcs[(int)this.CellId + 1].Cell;
- var cellId = this.CellId;
- cell.OperatingBand = (uint)(m_lteSettings.DestinationFrequencyBand[CellId].GetValue());
- cell.DLEarfcn = (uint)(m_lteSettings.DestinationDlEarfcn[CellId].GetValue());
- cell.ULEarfcn = (uint)(m_lteSettings.DestinationUlEarfcn[CellId].GetValue());
- if (AppSettings.GetBool("PCCBandwidthBlindHandoverEnabled"))
- {
- LteSystemBandwidth bw = (LteSystemBandwidth)(m_lteSettings.DestinationDlBandwidth[CellId].GetValue());
- cell.DownlinkBandwidth = this.ConvertToDouble(bw);
- LteSystemBandwidth ulBw = (LteSystemBandwidth)(m_lteSettings.DestinationUlBandwidth[CellId].GetValue());
- cell.UplinkBandwidth = this.ConvertToDouble(ulBw);
- }
- uint destCellId = (uint)(m_lteSettings.DestinationCellId[CellId].GetValue());
- // Cell ID [0..503] is derived from PhysicalLayerCellIdentityGroup [0..167] and PhysicalLayerCellIdentity [0..2]
- if (!((cell.PhysicalLayerCellIdentity == destCellId % 3) && (cell.PhysicalLayerCellIdentityGroup == destCellId / 3)))
- {
- cell.PhysicalLayerCellIdentity = destCellId % 3;
- cell.PhysicalLayerCellIdentityGroup = destCellId / 3;
- }
- MacPaddingHandlerForBho(true);
- Logger.WriteDebugLog("BHO DAPI configuration completed");
- Logger.WriteDebugLog("LTE RRC Connection Reconfiguration procedure started, for BHO; configuring Cell UI for Cell Id: {0}", this.CellId.ToString());
- updateCellConfigWithBHOSettings();
- }
- else
- {
- Logger.WriteDebugLog("LTE RRC Connection Reconfiguration procedure started, no BHO");
- }
- Logger.WriteDebugLog($"SourceEvents_ProcedureStarted End.");
- }
- catch (Exception e)
- {
- Logger.WriteError($"SourceEvents_ProcedureStarted Exception: {e}");
- Logger.WriteError($"SourceEvents_ProcedureStarted #Call Trace#: {Environment.StackTrace}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement