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

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

ONT-ONTPOTS support class of Optical Fiber Network (OFN) Nokia business model.

    1: using System;
    2:  
    3: namespace Ia.Ngn.Cl.Model.Business.Nokia
    4: {
    5:     ////////////////////////////////////////////////////////////////////////////
    6:  
    7:     /// <summary publish="true">
    8:     /// ONT-ONTPOTS support class of Optical Fiber Network (OFN) Nokia business model.
    9:     /// </summary>
   10:     /// 
   11:     /// <remarks> 
   12:     /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   13:     ///
   14:     /// 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
   15:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   16:     ///
   17:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   18:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   19:     /// 
   20:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   21:     /// 
   22:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   23:     /// </remarks> 
   24:     public class OntOntPots
   25:     {
   26:         /// <summary/>
   27:         public OntOntPots() { }
   28:  
   29:         ////////////////////////////////////////////////////////////////////////////
   30:  
   31:         /// <summary>
   32:         ///
   33:         /// </summary>
   34:         public static string OntOntPotsId(string ontId, int card, int port)
   35:         {
   36:             string id;
   37:  
   38:             if (card >= Ia.Ngn.Cl.Model.Business.Nokia.Ont.MinimumCardValue && card <= Ia.Ngn.Cl.Model.Business.Nokia.Ont.MaximumCardValue && port >= Ia.Ngn.Cl.Model.Business.Nokia.Ont.MinimumPortValue && port <= Ia.Ngn.Cl.Model.Business.Nokia.Ont.MaximumPortValue)
   39:             {
   40:                 id = ontId.ToString() + card.ToString().PadLeft(2, '0') + port.ToString().PadLeft(2, '0');
   41:             }
   42:             else
   43:             {
   44:                 throw new ArgumentOutOfRangeException(@"Card and/or port value is invalid: card:" + card + ", port:" + port);
   45:             }
   46:  
   47:             return id;
   48:         }
   49:  
   50:         ////////////////////////////////////////////////////////////////////////////
   51:         ////////////////////////////////////////////////////////////////////////////
   52:     }
   53:  
   54:     ////////////////////////////////////////////////////////////////////////////
   55:     ////////////////////////////////////////////////////////////////////////////
   56: }