public ServiceControl(Service service, TrafficCollectionModel model, FormOpenType formOpenType) { this.m_UnionPsService = service as Huawei.UNet.Traffic.Interface.UnionPsService; this.m_Model = model; this.InitManagement(); if (formOpenType == FormOpenType.New) { this.InitService(); } this.m_LTEService = this.m_UnionPsService.PSServiceDic[NetWorkType.LTE] as Huawei.UNet.Traffic.LTEModel.LTEService; }
private float CalculateUserAvgThroughput(int endStaTime, int beginStaTime, int accessTime, LTEService service, float totalThroughput, float packetSize) { if (service.Type == ServiceType.Voice) { if (totalThroughput == 0f) { return 0f; } return ((packetSize * 1000f) / ((float) SimulationConstant.UL_VIOCE_SERVICE_PERIOD)); } int num2 = Math.Max(beginStaTime, accessTime); int num3 = (endStaTime - num2) + 1; return (totalThroughput / ((float) num3)); }
public LTEServiceDesc(LTEService service) { this.m_Entity = service; }
private void InitService() { this.m_UnionPsService.Name = this.GenerateName(); this.m_UnionPsService.UlActivity = TrafficConstant.SERVICE_ULACTIVITY; this.m_UnionPsService.DlActivity = TrafficConstant.SERVICE_DLACTIVITY; this.m_UnionPsService.UlTxEff = TrafficConstant.SERVICE_ULTXEFF; this.m_UnionPsService.DlTxEff = TrafficConstant.SERVICE_DLTXEFF; this.m_UnionPsService.DlAveThroughputDemand = 0f; this.m_UnionPsService.UlAveThroughputDemand = 0f; this.m_UnionPsService.Technology = NetWorkType.LTE; this.m_UnionPsService.BodyLoss = TrafficConstant.SERVICE_BODYLOSS; this.m_UnionPsService.Type = ServiceType.Voice; this.m_UnionPsService.DlOffset = TrafficConstant.SERVICE_ULOFFSET; this.m_UnionPsService.UlOffset = TrafficConstant.SERVICE_DLOFFSET; Huawei.UNet.Traffic.LTEModel.LTEService service = new Huawei.UNet.Traffic.LTEModel.LTEService(); service.Priority = TrafficConstant.SERVICE_PRIORTY; service.Type = ServiceType.Voice; this.m_UnionPsService.PSServiceDic = new Dictionary<NetWorkType, Service>(); this.m_UnionPsService.PSServiceDic.Add(NetWorkType.LTE, service); }
private void SetServiceData(UnionPsService unionPsService, LTEService lteservice, ServiceType serviceType, float ulActivity, float dlActivity) { lteservice.Type = serviceType; unionPsService.Type = serviceType; unionPsService.UlActivity = ulActivity; unionPsService.DlActivity = dlActivity; }
private UnionPsService GenerateService() { UnionPsService unionPsService = new UnionPsService(); unionPsService.Name = this.tbName.Text.Trim(); unionPsService.UlMaxThroughputDemand = (float) this.tbUlMaxThroughput.Value; unionPsService.DlMaxThroughputDemand = (float) this.tbDlMaxThroughput.Value; unionPsService.UlMinThroughputDemand = (float) this.tbUlMinThroughput.Value; unionPsService.DlMinThroughputDemand = (float) this.tbDlMinThroughput.Value; unionPsService.UlAveThroughputDemand = (float) this.tbUlAveThroughput.Value; unionPsService.DlAveThroughputDemand = (float) this.tbDlAveThroughput.Value; unionPsService.UlTxEff = (float) this.tbUlTransEff.Value; unionPsService.DlTxEff = (float) this.tbDlTransEff.Value; unionPsService.UlOffset = (float) this.tbUlOffset.Value; unionPsService.DlOffset = (float) this.tbDlOffset.Value; unionPsService.BodyLoss = (float) this.tbBodyLoss.Value; unionPsService.DlAMRRate = float.Parse(this.cmbDlAmrRate.Text); unionPsService.UlAMRRate = float.Parse(this.cmbUlAmrRate.Text); unionPsService.Technology = NetWorkType.LTE; LTEService lteservice = new LTEService(); lteservice.Name = this.tbName.Text; lteservice.Priority = (int) this.tbPriority.Value; lteservice.DLBLER = ((float) this.dlBLER.Value) / 100f; lteservice.ULBLER = ((float) this.ulBLER.Value) / 100f; lteservice.IsGBR = this.chkGBR.Checked; if (this.cmbType.Text == ServiceType.Voice.ToString()) { this.SetServiceData(unionPsService, lteservice, ServiceType.Voice, (float) this.tbUlActivity.Value, (float) this.tbDlActivity.Value); } else { this.SetServiceData(unionPsService, lteservice, ServiceType.Data, 0f, 0f); } unionPsService.PSServiceDic = new Dictionary<NetWorkType, Service>(); unionPsService.PSServiceDic.Add(NetWorkType.LTE, lteservice); return unionPsService; }