Beispiel #1
0
 /// <summary>
 /// 根据Cir和终端类型判断该cir是否达到解调门限
 /// </summary>
 /// <param name="cir"></param>
 /// <param name="gsmTechnologyType"></param>
 /// <returns></returns>
 public bool GetPsDemodulationThreshold(float cir, GsmTechnologyType gsmTechnologyType)
 {
     if (gsmTechnologyType == GsmTechnologyType.EGPRS)
         return cir >= m_EgprsThreshold;
     else
         return cir >= m_GprsThreshold;
 }
Beispiel #2
0
        //private void InitDictionary()
        //{
        //    m_InitRate.Add("CS-1", new CSRateInit(InitCS1Rate));
        //    m_InitRate.Add("CS-2", new CSRateInit(InitCS2Rate));
        //    m_InitRate.Add("CS-3", new CSRateInit(InitCS3Rate));
        //    m_InitRate.Add("CS-4", new CSRateInit(InitCS4Rate));

        //    m_InitRate.Add("MCS-1", new CSRateInit(InitMCS1Rate));
        //    m_InitRate.Add("MCS-2", new CSRateInit(InitMCS2Rate));
        //    m_InitRate.Add("MCS-3", new CSRateInit(InitMCS3Rate));
        //    m_InitRate.Add("MCS-4", new CSRateInit(InitMCS4Rate));
        //    m_InitRate.Add("MCS-5", new CSRateInit(InitMCS5Rate));
        //    m_InitRate.Add("MCS-6", new CSRateInit(InitMCS6Rate));
        //    m_InitRate.Add("MCS-7", new CSRateInit(InitMCS7Rate));
        //    m_InitRate.Add("MCS-8", new CSRateInit(InitMCS8Rate));
        //    m_InitRate.Add("MCS-9", new CSRateInit(InitMCS9Rate));
        //}

        //private void InitEDGECirRate()
        //{
        //    m_EDGECirToRate.Add(CS.Mcs1, new Dictionary<float, float>());
        //    m_EDGECirToRate.Add(CS.Mcs2, new Dictionary<float, float>());
        //    m_EDGECirToRate.Add(CS.Mcs3, new Dictionary<float, float>());
        //    m_EDGECirToRate.Add(CS.Mcs4, new Dictionary<float, float>());
        //    m_EDGECirToRate.Add(CS.Mcs5, new Dictionary<float, float>());
        //    m_EDGECirToRate.Add(CS.Mcs6, new Dictionary<float, float>());
        //    m_EDGECirToRate.Add(CS.Mcs7, new Dictionary<float, float>());
        //    m_EDGECirToRate.Add(CS.Mcs8, new Dictionary<float, float>());
        //    m_EDGECirToRate.Add(CS.Mcs9, new Dictionary<float, float>());
        //}

        //private void InitCirRate()
        //{
        //    m_CirToRate.Add(CS.Cs1, new Dictionary<float, float>());
        //    m_CirToRate.Add(CS.Cs2, new Dictionary<float, float>());
        //    m_CirToRate.Add(CS.Cs3, new Dictionary<float, float>());
        //    m_CirToRate.Add(CS.Cs4, new Dictionary<float, float>());
        //}


        //private void InitCS1Rate(float cir, float rate, float threshold)
        //{
        //    m_CirToRate[CS.Cs1].Add(cir, rate);
        //    InitCSTrheshold(CS.Cs1, threshold);

        //}

        //private void InitCS2Rate(float cir, float rate, float threshold)
        //{
        //    m_CirToRate[CS.Cs2].Add(cir, rate);
        //    InitCSTrheshold(CS.Cs2, threshold);
        //}

        //private void InitCS3Rate(float cir, float rate, float threshold)
        //{
        //    m_CirToRate[CS.Cs3].Add(cir, rate);
        //    InitCSTrheshold(CS.Cs3, threshold);
        //}

        //private void InitCS4Rate(float cir, float rate, float threshold)
        //{
        //    m_CirToRate[CS.Cs4].Add(cir, rate);
        //    InitCSTrheshold(CS.Cs4, threshold);
        //}

        //private void InitMCS1Rate( float cir, float rate, float threshold)
        //{
        //    m_EDGECirToRate[CS.Mcs1].Add(cir, rate);
        //    InitMCSTrheshold(CS.Mcs1, threshold);
        //}

        //private void InitMCS2Rate(float cir, float rate, float threshold)
        //{
        //    m_EDGECirToRate[CS.Mcs2].Add(cir, rate);
        //    InitMCSTrheshold(CS.Mcs2, threshold);
        //}

        //private void InitMCS3Rate(float cir, float rate, float threshold)
        //{
        //    m_EDGECirToRate[CS.Mcs3].Add(cir, rate);
        //    InitMCSTrheshold(CS.Mcs3, threshold);
        //}

        //private void InitMCS4Rate(float cir, float rate, float threshold)
        //{
        //    m_EDGECirToRate[CS.Mcs4].Add(cir, rate);
        //    InitMCSTrheshold(CS.Mcs4, threshold);
        //}

        //private void InitMCS5Rate(float cir, float rate, float threshold)
        //{
        //    m_EDGECirToRate[CS.Mcs5].Add(cir, rate);
        //    InitMCSTrheshold(CS.Mcs5, threshold);
        //}

        //private void InitMCS6Rate(float cir, float rate, float threshold)
        //{
        //    m_EDGECirToRate[CS.Mcs6].Add(cir, rate);
        //    InitMCSTrheshold(CS.Mcs6, threshold);
        //}

        //private void InitMCS7Rate(float cir, float rate, float threshold)
        //{
        //    m_EDGECirToRate[CS.Mcs7].Add(cir, rate);
        //    InitMCSTrheshold(CS.Mcs7, threshold);
        //}

        //private void InitMCS8Rate(float cir, float rate, float threshold)
        //{
        //    m_EDGECirToRate[CS.Mcs8].Add(cir, rate);
        //    InitMCSTrheshold(CS.Mcs8, threshold);
        //}

        //private void InitMCS9Rate(float cir, float rate, float threshold)
        //{
        //    m_EDGECirToRate[CS.Mcs9].Add(cir, rate);
        //    InitMCSTrheshold(CS.Mcs9, threshold);
        //}



        //private void InitCSTrheshold(CS codeScheme, float threshold)
        //{
        //    if (m_CsToCir.ContainsKey(codeScheme) == false )
        //    {
        //        m_CsToCir.Add(codeScheme, threshold);
        //        m_CsThreshold.Add(threshold, codeScheme);
        //    }


        //}

        //private void InitMCSTrheshold(CS codeScheme, float threshold)
        //{
        //    if (m_MCSToCir.ContainsKey(codeScheme) == false)
        //    {
        //        m_MCSToCir.Add(codeScheme, threshold);
        //        m_MCSThreshold.Add(threshold, codeScheme);
        //    }
        //}


        /// <summary>
        /// 根据数据用户的cir和终端类型获得用户的编码方式,同时输出吞吐率。
        /// 如果cir找不到编码方式,返回CS.empty
        /// </summary>
        /// <param name="cir"></param>
        /// <param name="gsmTechnologyType">终端的类型</param>
        /// <param name="throughput">输出的吞吐率</param>
        /// <returns></returns>
        public CS PsCodeSeceme(float cir, GsmTechnologyType gsmTechnologyType, out float throughput)
        {
            if (gsmTechnologyType == GsmTechnologyType.EGPRS)
            {
                //如果小于解调门限,直接返回空
                if (cir < m_EgprsThreshold)
                {
                    throughput = 0f;
                    return CS.empty;
                }
                return CalcCodeSeceme(cir, m_EgprsBear, out throughput);
            }
            else
            {
                //如果小于解调门限,直接返回空
                if (cir < m_GprsThreshold)
                {
                    throughput = 0f;
                    return CS.empty;
                }
                return CalcCodeSeceme(cir, m_GprsBear, out throughput);
            }
        }