Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.63 KB | None | 0 0
  1. protected override void SourceEvents_ProcedureStarted(DTEUtranL3.IRrcProcedure Proc, object pDisp)
  2. {
  3. try
  4. {
  5.  
  6. Logger.WriteDebugLog($"SourceEvents_ProcedureStarted Start...");
  7.  
  8. base.SourceEvents_ProcedureStarted(Proc, pDisp);
  9.  
  10. DTEUtranL3.UEProxyRrc ueProxyRrc = pDisp as DTEUtranL3.UEProxyRrc;
  11. //EnableStrongestCellMeasurement property is at UEProxyRrc and needs to be set before L3 encodes the default Rrc Connection Reconfiguration Message
  12. ueProxyRrc.EnableStrongestCellMeasurement = this.Context.ModelReader[this.CellId].CellTap.CellHost.UEReport;
  13. // IPrimaryComponentCarrier
  14. //if (this.Context.CurrentUeProxyRrc != null)
  15. //{
  16. // var cc = this.Context.CurrentUeProxyRrc.UEProxyEx.ComponentCarriers.Find(COMPONENT_CARRIER_TYPE.PRIMARY_CC, 1);
  17. // cc.PrimaryComponentCarrier.PucchFormat3 = (this.Context.ModelReader[this.CellId].PhyTap.PucchFormat == PUCCHFormatType.T3);
  18. //}
  19.  
  20. IConnectionReconfiguration connReconfigProc = Proc as IConnectionReconfiguration;
  21.  
  22. // Pointer to Target Drbs List.
  23. //var drbs = connReconfigProc.TargetDrbList;
  24.  
  25. //DapiUtils.SetDRBProperties(drbs, this.Context.ModelReader[this.CellId]);
  26.  
  27. //Overwrite message if required
  28. if (m_overwriteMsg != null)
  29. {
  30. Logger.WriteDebugLog("LTE RRC Connection Reconfiguration procedure started, overwriting DL message");
  31. Logger.WriteDebugLog("Setting AutoEncodeDLMessage to false");
  32. connReconfigProc.AutoEncodeDLMessage = false;
  33.  
  34. Logger.WriteDebugLog("Setting ConfigureMode to LOCAL_RESOURCE_CONFIGURATION_MODE_AUTO_USING_DL_MESSAGE ");
  35. connReconfigProc.ConfigureMode = LOCAL_RESOURCE_CONFIGURATION_MODE.LOCAL_RESOURCE_CONFIGURATION_MODE_AUTO_USING_DL_MESSAGE;
  36.  
  37. // set proc DLMessage to ours
  38. DTUtils.DataUnit overwriteReconfigMsgUnitData = new DTUtils.DataUnit();
  39. overwriteReconfigMsgUnitData.SetDataBits(m_overwriteMsg.Length * 8, ref m_overwriteMsg[0]);
  40. connReconfigProc.DLMessage = overwriteReconfigMsgUnitData;
  41. m_overwriteMsg = null;
  42. }
  43. else
  44. {
  45. Logger.WriteDebugLog("LTE RRC Connection Reconfiguration procedure started, no overwrite message");
  46. Logger.WriteDebugLog("Setting AutoEncodeDLMessage to true");
  47. connReconfigProc.AutoEncodeDLMessage = true;
  48. Logger.WriteDebugLog("Setting ConfigureMode to LOCAL_RESOURCE_CONFIGURATION_MODE_AUTO_DEFAULT ");
  49. connReconfigProc.ConfigureMode = LOCAL_RESOURCE_CONFIGURATION_MODE.LOCAL_RESOURCE_CONFIGURATION_MODE_AUTO_DEFAULT;
  50. }
  51.  
  52. if (m_isBho)
  53. {
  54. Logger.WriteDebugLog("LTE RRC Connection Reconfiguration procedure started, for BHO; configuring destination Cell DAPI for Cell Id: {0}", this.CellId.ToString());
  55. var cell = ueProxyRrc.ActiveCellRrcs[(int)this.CellId + 1].Cell;
  56. var cellId = this.CellId;
  57.  
  58. cell.OperatingBand = (uint)(m_lteSettings.DestinationFrequencyBand[CellId].GetValue());
  59. cell.DLEarfcn = (uint)(m_lteSettings.DestinationDlEarfcn[CellId].GetValue());
  60. cell.ULEarfcn = (uint)(m_lteSettings.DestinationUlEarfcn[CellId].GetValue());
  61.  
  62. if (AppSettings.GetBool("PCCBandwidthBlindHandoverEnabled"))
  63. {
  64. LteSystemBandwidth bw = (LteSystemBandwidth)(m_lteSettings.DestinationDlBandwidth[CellId].GetValue());
  65. cell.DownlinkBandwidth = this.ConvertToDouble(bw);
  66. LteSystemBandwidth ulBw = (LteSystemBandwidth)(m_lteSettings.DestinationUlBandwidth[CellId].GetValue());
  67. cell.UplinkBandwidth = this.ConvertToDouble(ulBw);
  68. }
  69.  
  70. uint destCellId = (uint)(m_lteSettings.DestinationCellId[CellId].GetValue());
  71. // Cell ID [0..503] is derived from PhysicalLayerCellIdentityGroup [0..167] and PhysicalLayerCellIdentity [0..2]
  72. if (!((cell.PhysicalLayerCellIdentity == destCellId % 3) && (cell.PhysicalLayerCellIdentityGroup == destCellId / 3)))
  73. {
  74. cell.PhysicalLayerCellIdentity = destCellId % 3;
  75. cell.PhysicalLayerCellIdentityGroup = destCellId / 3;
  76. }
  77.  
  78. MacPaddingHandlerForBho(true);
  79.  
  80. Logger.WriteDebugLog("BHO DAPI configuration completed");
  81.  
  82. Logger.WriteDebugLog("LTE RRC Connection Reconfiguration procedure started, for BHO; configuring Cell UI for Cell Id: {0}", this.CellId.ToString());
  83.  
  84. updateCellConfigWithBHOSettings();
  85. }
  86. else
  87. {
  88. Logger.WriteDebugLog("LTE RRC Connection Reconfiguration procedure started, no BHO");
  89. }
  90.  
  91. Logger.WriteDebugLog($"SourceEvents_ProcedureStarted End.");
  92.  
  93. }
  94. catch (Exception e)
  95. {
  96. Logger.WriteError($"SourceEvents_ProcedureStarted Exception: {e}");
  97. Logger.WriteError($"SourceEvents_ProcedureStarted #Call Trace#: {Environment.StackTrace}");
  98. }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement