)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Skip Navigation Links

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

AGCF Users (ASBR) support class for Huawei's Optical Fiber Network (OFN) business model.

    1:  
    2: using System.Collections.Generic;
    3:  
    4: namespace Ia.Ngn.Cl.Model.Business.Huawei
    5: {
    6:     ////////////////////////////////////////////////////////////////////////////
    7:  
    8:     /// <summary publish="true">
    9:     /// AGCF Users (ASBR) support class for Huawei's Optical Fiber Network (OFN) 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 Asbr
   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 Asbr() { }
   38:  
   39:         ////////////////////////////////////////////////////////////////////////////
   40:  
   41:         /// <summary>
   42:         ///
   43:         /// </summary>
   44:         public static string AsbrId(string networkElementDomain, string impuSipDomain)
   45:         {
   46:             return networkElementDomain + ":" + impuSipDomain;
   47:         }
   48:  
   49:         ////////////////////////////////////////////////////////////////////////////
   50:  
   51:         /// <summary>
   52:         ///
   53:         /// </summary>
   54:         public static Ia.Ngn.Cl.Model.Business.Default.SwitchRoute RnidxRouteToSwitchRoute(int rnidxRoute)
   55:         {
   56:             Ia.Ngn.Cl.Model.Business.Default.SwitchRoute switchRoute;
   57:  
   58:             switch (rnidxRoute)
   59:             {
   60:                 case 0: switchRoute = Ia.Ngn.Cl.Model.Business.Default.SwitchRoute.HuaweiIms; break;
   61:                 case 1: switchRoute = Ia.Ngn.Cl.Model.Business.Default.SwitchRoute.NokiaIms; break;
   62:                 case 2: switchRoute = Ia.Ngn.Cl.Model.Business.Default.SwitchRoute.SiemensEwsdCopper; break;
   63:                 default: switchRoute = Ia.Ngn.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.Ngn.Cl.Model.Business.Default.SwitchRoute switchRoute)
   75:         {
   76:             int rnidxRoute;
   77:  
   78:             switch (switchRoute)
   79:             {
   80:                 case Ia.Ngn.Cl.Model.Business.Default.SwitchRoute.HuaweiIms: rnidxRoute = 0; break;
   81:                 case Ia.Ngn.Cl.Model.Business.Default.SwitchRoute.NokiaIms: rnidxRoute = 1; break;
   82:                 case Ia.Ngn.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: }