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

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

Huawei's EMS VAG Entity Framework class for Fixed Telecommunications Network (FTN) business model.

    1: using System;
    2: using System.Collections.Generic;
    3:  
    4: namespace Ia.Ftn.Cl.Model.Business.Huawei
    5: {
    6:     ////////////////////////////////////////////////////////////////////////////
    7:  
    8:     /// <summary publish="true">
    9:     /// Huawei's EMS VAG Entity Framework class for 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 Vag
   26:     {
   27:         /// <summary/>
   28:         public static Dictionary<int, string> SupportedDevices { get; } = new Dictionary<int, string>
   29:         {
   30:             { 100, "MA5616" },
   31:             { 249, "MA5600T" },
   32:             { 95, "MA5603T" },
   33:             { 219, "UA5000" },
   34:             { 2331, "MA5608T" }
   35:         };
   36:  
   37:         ////////////////////////////////////////////////////////////////////////////
   38:  
   39:         /// <summary>
   40:         ///
   41:         /// </summary>
   42:         public Vag() { }
   43:  
   44:         ////////////////////////////////////////////////////////////////////////////
   45:  
   46:         /// <summary>
   47:         ///
   48:         /// </summary>
   49:         public static string VagId(string ontId, int vagId)
   50:         {
   51:             /// VAGID INTEGER 0-16777215 Indicates the MG ID.
   52:             /// 
   53:             return ontId + vagId.ToString().PadLeft(8, '0'); // 8 because VAGID is an int between 0-16777215
   54:         }
   55:  
   56:         ////////////////////////////////////////////////////////////////////////////
   57:  
   58:         /// <summary>
   59:         ///
   60:         /// </summary>
   61:         public static int SpecialIntegerParameterHandling(string parameterName, string parameterValue)
   62:         {
   63:             int i;
   64:  
   65:             if (parameterName == "SIGVLANID") parameterValue = parameterValue.Replace("--", "-1");
   66:             else if (parameterName == "SIGDSCP") parameterValue = parameterValue.Replace("--", "-1");
   67:             else if (parameterName == "SIGIPPRI") parameterValue = parameterValue.Replace("--", "-1");
   68:             else if (parameterName == "SIGTOSPRI") parameterValue = parameterValue.Replace("--", "-1");
   69:             else if (parameterName == "SIGVLANPRI") parameterValue = parameterValue.Replace("--", "-1");
   70:             else if (parameterName == "MEDIAPORT") parameterValue = parameterValue.Replace("--", "-1");
   71:             else if (parameterName == "MEDIAVLANID") parameterValue = parameterValue.Replace("--", "-1");
   72:             else if (parameterName == "MEDIADSCP") parameterValue = parameterValue.Replace("--", "-1");
   73:             else if (parameterName == "MEDIAIPPRI") parameterValue = parameterValue.Replace("--", "-1");
   74:             else if (parameterName == "MEDIATOSPRI") parameterValue = parameterValue.Replace("--", "-1");
   75:             else if (parameterName == "MEDIAVLANPRI") parameterValue = parameterValue.Replace("--", "-1");
   76:             else
   77:             {
   78:  
   79:             }
   80:  
   81:             i = int.Parse(parameterValue);
   82:  
   83:             return i;
   84:         }
   85:  
   86:         ////////////////////////////////////////////////////////////////////////////
   87:         ////////////////////////////////////////////////////////////////////////////
   88:     }
   89:  
   90:     ////////////////////////////////////////////////////////////////////////////
   91:     ////////////////////////////////////////////////////////////////////////////
   92: }