Example #1
0
 /// <summary>
 /// 分派Voip用户的初始化
 /// </summary>
 /// <param name="carriers"></param>
 public void init(List<ISimulationCarrier> carriers)
 {
     foreach (SimulationCarrier carrier in carriers)
     {
         VoipNumber number = new VoipNumber();
         this.UpdateVoipNumber(carrier.UlVoiceNewAccessUserList, ref number.ulNum, ref number.ulNumRemainder);
         this.UpdateVoipNumber(carrier.DlVoiceNewAccessUserList, ref number.dlNum, ref number.dlNumRemainder);
         number.stepIndex = 0;
         this.m_CarrierVoipSteps.Add(carrier, number);
         carrier.VoiceNewUserList.AddRange(carrier.UlVoiceNewAccessUserList);
         carrier.VoiceNewUserList.AddRange(carrier.DlVoiceNewAccessUserList);
         carrier.UlVoiceNewAccessUserList.Clear();
         carrier.DlVoiceNewAccessUserList.Clear();
     }
 }
Example #2
0
 /// <summary>
 /// 获得当前TTI下最多能接入的上行和下行语音用户数
 ///(目的是把voice用户均匀的分派在前VOIP_ACCESS_STEP(默认为20)个时隙内)
 /// </summary>
 /// <param name="vn"></param>
 /// <param name="ulNumTarget">当前TTI下最多能接入的上行voice用户数</param>
 /// <param name="dlNumTarget">当前TTI下最多能接入的下行voice用户数</param>
 private void GetUserNumTarget(VoipNumber vn, out int ulNumTarget, out int dlNumTarget)
 {
     ulNumTarget = (vn.stepIndex < vn.ulNumRemainder) ? (vn.ulNum + 1) : vn.ulNum;
     dlNumTarget = (vn.stepIndex < vn.dlNumRemainder) ? (vn.dlNum + 1) : vn.dlNum;
 }