)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Mgw (Ia.Ftn.Cl.Model.Business.Huawei)

Public general use code classes and xml files that we've compiled and used over the years:

Media Gateway (MGW) support class for Huawei's Fixed Telecommunications Network (FTN) business model.

    1:  
    2: using System.Collections.Generic;
    3:  
    4: namespace Ia.Ftn.Cl.Model.Business.Huawei
    5: {
    6:     ////////////////////////////////////////////////////////////////////////////
    7:  
    8:     /// <summary publish="true">
    9:     /// Media Gateway (MGW) support class for Huawei's Fixed Telecommunications Network (FTN) business model.
   10:     /// </summary>
   11:     /// 
   12:     /// <remarks> 
   13:     /// Copyright © 2019-2020 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   14:     ///
   15:     /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
   16:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   17:     ///
   18:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   19:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   20:     /// 
   21:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   22:     /// 
   23:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   24:     /// </remarks> 
   25:     public class Mgw
   26:     {
   27:         /// <summary/>
   28:         public static Dictionary<int, string> RnidxRouteName { get; } = new Dictionary<int, string>
   29:         {
   30:             { 0, "Huawei IMS" },
   31:             { 1, "Nokia IMS" },
   32:             { 2, "Siemens EWSD Copper" },
   33:             { -1, "Unknown" }
   34:         };
   35:  
   36:         /// <summary/>
   37:         public Mgw() { }
   38:  
   39:         ////////////////////////////////////////////////////////////////////////////
   40:  
   41:         /// <summary>
   42:         ///
   43:         /// </summary>
   44:         public static string MgwId(string networkElement, string eid)
   45:         {
   46:             return networkElement + ":" + eid;
   47:         }
   48:  
   49:         ////////////////////////////////////////////////////////////////////////////
   50:  
   51:         /// <summary>
   52:         ///
   53:         /// </summary>
   54:         public static Ia.Ftn.Cl.Model.Business.Default.SwitchRoute RnidxRouteToSwitchRoute(int rnidxRoute)
   55:         {
   56:             Ia.Ftn.Cl.Model.Business.Default.SwitchRoute switchRoute;
   57:  
   58:             switch (rnidxRoute)
   59:             {
   60:                 case 0: switchRoute = Ia.Ftn.Cl.Model.Business.Default.SwitchRoute.HuaweiIms; break;
   61:                 case 1: switchRoute = Ia.Ftn.Cl.Model.Business.Default.SwitchRoute.NokiaIms; break;
   62:                 case 2: switchRoute = Ia.Ftn.Cl.Model.Business.Default.SwitchRoute.SiemensEwsdCopper; break;
   63:                 default: switchRoute = Ia.Ftn.Cl.Model.Business.Default.SwitchRoute.Unknown; break;
   64:             }
   65:  
   66:             return switchRoute;
   67:         }
   68:  
   69:         ////////////////////////////////////////////////////////////////////////////
   70:  
   71:         /// <summary>
   72:         ///
   73:         /// </summary>
   74:         public static int SwitchRouteToRnidxRoute(Ia.Ftn.Cl.Model.Business.Default.SwitchRoute switchRoute)
   75:         {
   76:             int rnidxRoute;
   77:  
   78:             switch (switchRoute)
   79:             {
   80:                 case Ia.Ftn.Cl.Model.Business.Default.SwitchRoute.HuaweiIms: rnidxRoute = 0; break;
   81:                 case Ia.Ftn.Cl.Model.Business.Default.SwitchRoute.NokiaIms: rnidxRoute = 1; break;
   82:                 case Ia.Ftn.Cl.Model.Business.Default.SwitchRoute.SiemensEwsdCopper: rnidxRoute = 2; break;
   83:                 default: rnidxRoute = -1; break;
   84:             }
   85:  
   86:             return rnidxRoute;
   87:         }
   88:  
   89:         ////////////////////////////////////////////////////////////////////////////
   90:         ////////////////////////////////////////////////////////////////////////////
   91:     }
   92:  
   93:     ////////////////////////////////////////////////////////////////////////////
   94:     ////////////////////////////////////////////////////////////////////////////
   95: }