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

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

ONT support class of Fixed Telecommunications Network (FTN) Nokia business model.

    1: using System.Collections;
    2: using System.Collections.Generic;
    3: using System.Linq;
    4: using System.Text.RegularExpressions;
    5:  
    6: namespace Ia.Ftn.Cl.Models.Business.Nokia
    7: {
    8:     ////////////////////////////////////////////////////////////////////////////
    9:  
   10:     /// <summary publish="true">
   11:     /// ONT support class of Fixed Telecommunications Network (FTN) Nokia business model.
   12:     /// </summary>
   13:     /// 
   14:     /// <remarks> 
   15:     /// Copyright © 2006-2018 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   16:     ///
   17:     /// 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
   18:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   19:     ///
   20:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   21:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   22:     /// 
   23:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   24:     /// 
   25:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   26:     /// </remarks> 
   27:     public class Ont
   28:     {
   29:         /// <summary/>
   30:         public static readonly int MaximumCardValue = 3;
   31:  
   32:         /// <summary/>
   33:         public static readonly int MinimumCardValue = 1;
   34:  
   35:         /// <summary/>
   36:         public static readonly int MaximumPortValue = 24;
   37:  
   38:         /// <summary/>
   39:         public static readonly int MinimumPortValue = 1;
   40:  
   41:         /// <summary/>
   42:         public class EquipmentType
   43:         {
   44:             /// <summary/>
   45:             public string Name;
   46:  
   47:             /// <summary/>
   48:             public string Model;
   49:  
   50:             /// <summary/>
   51:             public string ActiveSoftware;
   52:  
   53:             /// <summary/>
   54:             public string VersionNumber;
   55:  
   56:             /// <summary/>
   57:             public int TelPorts;
   58:  
   59:             /// <summary/>
   60:             public int EthernetPorts;
   61:  
   62:             /// <summary/>
   63:             public Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType FamilyType;
   64:  
   65:             /// <summary/>
   66:             public EquipmentType() { }
   67:         }
   68:  
   69:         /// <summary/>
   70:         public static EquipmentType[] EquipmentTypeList =
   71:             {
   72:             new EquipmentType { Name = "BVM3G00CRAO420EB", Model = "O-420E-B", ActiveSoftware="3FE50853AJJE12 (R05.06.01 H.248)", VersionNumber="3FE50683AD", FamilyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Sfu, EthernetPorts = 2, TelPorts = 4 },
   73:             new EquipmentType { Name = "BVM4310DRAO420EB", Model = "O-420E-B", ActiveSoftware="3FE50853AJJE12 (R05.06.01 H.248)", VersionNumber="3FE50683AM", FamilyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Sfu, EthernetPorts = 2, TelPorts = 4 },
   74:             new EquipmentType { Name = "BVM4X00DRAO821GD", Model = "O-821G-D", ActiveSoftware="3FE51136AJJE12 (R05.06.01 H.248)", VersionNumber="3FE50774AD", FamilyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Sbu, EthernetPorts = 2, TelPorts = 8 },
   75:             new EquipmentType { Name = "BVM5F00CRAO24120", Model = "O-24120G-A", ActiveSoftware="3FE51408AJJE06 (R05.06.01 H.248)", VersionNumber="3FE51185AB", FamilyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Mdu, EthernetPorts = 12, TelPorts = 24 },
   76:             new EquipmentType { Name = "BVM5J00CRAO820GD", Model = "O-820G-D", ActiveSoftware="3FE51136AJJE12 (R05.06.01 H.248)", VersionNumber="3FE50774AG", FamilyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Sbu, EthernetPorts = 2, TelPorts = 8 },
   77:             new EquipmentType { Name = "VAMZS10BRAG440GA", Model = "G-440G-A", ActiveSoftware="3FE56398DFGB42 (R05.06.01 H.248)", VersionNumber="3FE55423BA", FamilyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gfu, EthernetPorts = 4, TelPorts = 4 },
   78:             new EquipmentType { Name = "RVM3G00CRAO420EB", Model = "G-24240E-P", ActiveSoftware="3FE45670AOCK69 (R05.06.01 H.248)", VersionNumber="3FE45307AA", FamilyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gmdu, EthernetPorts = 24, TelPorts = 24 },
   79:  
   80:             //new EquipmentType { Name = "BVMDM00CRBG881GA", Model = "Undefined", ActiveSoftware="", VersionNumber="", FamilyType = Ia.Ftn.Cl.Model.Business.Nokia.Ont.FamilyType.Undefined, EthernetPorts = 0, TelPorts = 0 },
   81:         };
   82:  
   83:         /*
   84: select count(Id) as Count, substring(ActiveSoftware, 1, 6) as ActiveSoftware from Onts group by substring([ActiveSoftware], 1, 6)
   85: 
   86: Count    ActiveSoftware
   87: 160    3FE514
   88: 2    3FE556
   89: 4    3FE511
   90: 26811    3FE508
   91: 46317    NULL
   92: 2    3FE456
   93: 1    3FE559
   94: 108    3FE563       
   95:          */
   96:  
   97:         /*
   98: select count(Id) as Count, '[' + EquipmentId + ']' as EquipmentId from Onts group by EquipmentId
   99: 
  100: Count    EquipmentId
  101: 1    [BVM4X00DRAO821GD]
  102: 2    [RVM3G00CRAO420EB]
  103: 110    [VAMZS10BRAG440GA]
  104: 1    [BVMDM00CRBG881GA]
  105: 3    [BVM5J00CRAO820GD]
  106: 2913    [BVM4310DRAO420EB]
  107: 46376    NULL
  108: 23839    [BVM3G00CRAO420EB]
  109: 160    [BVM5F00CRAO24120]
  110:         */
  111:  
  112:         /// <summary/>
  113:         public enum FamilyType { Undefined = 0, Sfu = 1, Soho = 2, Mdu = 3, Gfu = 4, Sbu = 5, Gmdu = 6 };
  114:  
  115:         /// <summary/>
  116:         public Ont() { }
  117:  
  118:         ////////////////////////////////////////////////////////////////////////////
  119:  
  120:         /// <summary>
  121:         ///
  122:         /// </summary>
  123:         public static string OntId(string ponId, int ontNumber)
  124:         {
  125:             string id;
  126:  
  127:             id = Ia.Ftn.Cl.Models.Business.Default.OntId(ponId, ontNumber);
  128:  
  129:             return id;
  130:         }
  131:  
  132:         ////////////////////////////////////////////////////////////////////////////
  133:  
  134:         /// <summary>
  135:         ///
  136:         /// </summary>
  137:         public static string OntId(string amsName, string cardPortOntSequence)
  138:         {
  139:             string id;
  140:             string ontPosition;
  141:  
  142:             ontPosition = Ia.Ftn.Cl.Models.Business.Nokia.Ams.OntPositionFromAmsNameAndCardPortOntSquence(amsName, cardPortOntSequence);
  143:  
  144:             id = Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.OntIdByPosition(ontPosition);
  145:             //id = (from o in Ia.Ftn.Cl.Model.Data.NetworkDesignDocument.OntList where o.Position == ontPosition select o.Id).SingleOrDefault();
  146:  
  147:             return id;
  148:         }
  149:  
  150:         ////////////////////////////////////////////////////////////////////////////
  151:  
  152:         /// <summary>
  153:         ///
  154:         /// </summary>
  155:         public static Ia.Ftn.Cl.Models.Business.Nokia.Ont.EquipmentType EquipmentTypeFromActiveSoftware(string activeSoftware)
  156:         {
  157:             Ia.Ftn.Cl.Models.Business.Nokia.Ont.EquipmentType equipmentType;
  158:  
  159:             equipmentType = null;
  160:  
  161:             return equipmentType;
  162:         }
  163:  
  164:         ////////////////////////////////////////////////////////////////////////////
  165:  
  166:         /// <summary>
  167:         /// Return the ONT family type id from the software version
  168:         /// </summary>
  169:         public static Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType FamilyTypeIdFromActiveSoftwareAndPlannedSoftware(string activeSoftware, string plannedSoftware)
  170:         {
  171:             Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType familyType;
  172:  
  173:             if (activeSoftware != null)
  174:             {
  175:                 if (activeSoftware == plannedSoftware || plannedSoftware == "auto" || plannedSoftware == "AUTO")
  176:                 {
  177:                     if (activeSoftware.StartsWith("3FE508")) familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Sfu;
  178:                     else if (activeSoftware.StartsWith("3FE563")) familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gfu;
  179:                     else if (activeSoftware.StartsWith("3FE511")) familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Soho;
  180:                     else if (activeSoftware.StartsWith("3FE514")) familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Mdu;
  181:                     else if (activeSoftware.StartsWith("3FE456")) familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gmdu;
  182:                     else familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Undefined;
  183:                 }
  184:                 else familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Undefined;
  185:             }
  186:             else familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Undefined;
  187:  
  188:             return familyType;
  189:         }
  190:  
  191:         ////////////////////////////////////////////////////////////////////////////
  192:  
  193:         /// <summary>
  194:         /// 
  195:         /// </summary>
  196:         public static Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType FamilyTypeFromString(string familyTypeString)
  197:         {
  198:             // this will convert string format of ONU type from both email submittals and from EMSONT EQUIPMENTID values from NCE
  199:  
  200:             Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType familyType;
  201:  
  202:             if (!string.IsNullOrEmpty(familyTypeString))
  203:             {
  204:                 switch (familyTypeString.ToUpper())
  205:                 {
  206:                     case "SFU": familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Sfu; break;
  207:                     case "GFU": familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gfu; break;
  208:                     case "SOHO": familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Soho; break;
  209:                     case "MDU": familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Mdu; break;
  210:                     case "GMDU": familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gmdu; break;
  211:                     default: familyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Undefined; break;
  212:                 }
  213:             }
  214:             else familyType = 0;
  215:  
  216:             return familyType; // Undefined
  217:         }
  218:  
  219:         ////////////////////////////////////////////////////////////////////////////
  220:  
  221:         /// <summary>
  222:         /// 
  223:         /// </summary>
  224:         public static string FamilyTypeStringFromFamilyTypeId(int familyTypeId)
  225:         {
  226:             string familyTypeString;
  227:             Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType familyType;
  228:  
  229:             familyType = (Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType)familyTypeId;
  230:  
  231:             switch (familyType)
  232:             {
  233:                 case Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Sfu: familyTypeString = "SFU"; break;
  234:                 case Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gfu: familyTypeString = "GFU"; break;
  235:                 case Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Soho: familyTypeString = "SOHO"; break;
  236:                 case Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Mdu: familyTypeString = "MDU"; break;
  237:                 case Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gmdu: familyTypeString = "GMDU"; break;
  238:                 default: familyTypeString = string.Empty; break;
  239:             }
  240:  
  241:             return familyTypeString;
  242:         }
  243:  
  244:         ////////////////////////////////////////////////////////////////////////////
  245:  
  246:         /// <summary>
  247:         /// 
  248:         /// </summary>
  249:         public static int PossibleNumberOfTdForOntFamilyType(int familyTypeId)
  250:         {
  251:             Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType familyType;
  252:  
  253:             familyType = (Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType)familyTypeId;
  254:  
  255:             return PossibleNumberOfTdForOntFamilyType(familyType);
  256:         }
  257:  
  258:         ////////////////////////////////////////////////////////////////////////////
  259:  
  260:         /// <summary>
  261:         /// 
  262:         /// </summary>
  263:         public static int PossibleNumberOfTdForOntFamilyType(Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType familyType)
  264:         {
  265:             int number;
  266:  
  267:             switch (familyType)
  268:             {
  269:                 case Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Sfu: number = 4; break;
  270:                 case Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gfu: number = 4; break;
  271:                 case Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Soho: number = 8; break;
  272:                 case Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Mdu: number = 24; break;
  273:                 case Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gmdu: number = 24; break;
  274:                 default: number = 0; break;
  275:             }
  276:  
  277:             return number;
  278:         }
  279:  
  280:         ////////////////////////////////////////////////////////////////////////////
  281:  
  282:         /// <summary>
  283:         /// Get the number of card-port for a parameter of familyType and td
  284:         /// </summary>
  285:         public static void ReturnOntPotsCardAndPortFromFamilyTypeAndTd(Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType familyType, int td, out int card, out int port)
  286:         {
  287:             card = port = 0;
  288:  
  289:             if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Sfu || familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gfu)
  290:             {
  291:                 if (td >= 1 && td <= 4)
  292:                 {
  293:                     card = 2; port = td;
  294:                 }
  295:             }
  296:             else if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Soho)
  297:             {
  298:                 if (td >= 1 && td <= 8)
  299:                 {
  300:                     card = 2; port = td;
  301:                 }
  302:             }
  303:             else if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Mdu)
  304:             {
  305:                 if (td >= 1 && td <= 24)
  306:                 {
  307:                     if (td >= 1 && td <= 4 || td >= 13 && td <= 16)
  308:                     {
  309:                         card = 1;
  310:                         if (td <= 4) port = td;
  311:                         else port = td - 8;
  312:                     }
  313:                     else if (td >= 5 && td <= 8 || td >= 17 && td <= 20)
  314:                     {
  315:                         card = 2;
  316:                         if (td <= 8) port = td - 4;
  317:                         else port = td - 12;
  318:                     }
  319:                     else if (td >= 9 && td <= 12 || td >= 21 && td <= 24)
  320:                     {
  321:                         card = 3;
  322:                         if (td <= 12) port = td - 8;
  323:                         else port = td - 16;
  324:                     }
  325:                 }
  326:             }
  327:             else if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gmdu)
  328:             {
  329:                 if (td >= 1 && td <= 24)
  330:                 {
  331:                     card = 2;
  332:                     port = td;
  333:                 }
  334:             }
  335:         }
  336:  
  337:         ////////////////////////////////////////////////////////////////////////////
  338:  
  339:         /// <summary>
  340:         /// 
  341:         /// </summary>
  342:         public static List<string> PossiblePotsCardPortConfigurationForOntFamilyTypeList(Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType familyType)
  343:         {
  344:             var list = new List<string>(100);
  345:  
  346:             /*
  347:              * see 
  348:         public static readonly int MaximumCardValue = 0;
  349:         public static readonly int MinimumCardValue = 0;
  350:         public static readonly int MaximumPortValue = 0;
  351:         public static readonly int MinimumPortValue = 0;
  352:              */
  353:  
  354:             if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Sfu || familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gfu)
  355:             {
  356:                 list.Add("2-1");
  357:                 list.Add("2-2");
  358:                 list.Add("2-3");
  359:                 list.Add("2-4");
  360:             }
  361:             else if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Soho)
  362:             {
  363:                 list.Add("2-1");
  364:                 list.Add("2-2");
  365:                 list.Add("2-3");
  366:                 list.Add("2-4");
  367:                 list.Add("2-5");
  368:                 list.Add("2-6");
  369:                 list.Add("2-7");
  370:                 list.Add("2-8");
  371:             }
  372:             else if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Mdu)
  373:             {
  374:                 list.Add("1-1");
  375:                 list.Add("1-2");
  376:                 list.Add("1-3");
  377:                 list.Add("1-4");
  378:                 list.Add("1-5");
  379:                 list.Add("1-6");
  380:                 list.Add("1-7");
  381:                 list.Add("1-8");
  382:  
  383:                 list.Add("2-1");
  384:                 list.Add("2-2");
  385:                 list.Add("2-3");
  386:                 list.Add("2-4");
  387:                 list.Add("2-5");
  388:                 list.Add("2-6");
  389:                 list.Add("2-7");
  390:                 list.Add("2-8");
  391:  
  392:                 list.Add("3-1");
  393:                 list.Add("3-2");
  394:                 list.Add("3-3");
  395:                 list.Add("3-4");
  396:                 list.Add("3-5");
  397:                 list.Add("3-6");
  398:                 list.Add("3-7");
  399:                 list.Add("3-8");
  400:             }
  401:             else if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gmdu)
  402:             {
  403:                 list.Add("2-1");
  404:                 list.Add("2-2");
  405:                 list.Add("2-3");
  406:                 list.Add("2-4");
  407:                 list.Add("2-5");
  408:                 list.Add("2-6");
  409:                 list.Add("2-7");
  410:                 list.Add("2-8");
  411:  
  412:                 list.Add("2-9");
  413:                 list.Add("2-10");
  414:                 list.Add("2-11");
  415:                 list.Add("2-12");
  416:                 list.Add("2-13");
  417:                 list.Add("2-14");
  418:                 list.Add("2-15");
  419:                 list.Add("2-16");
  420:  
  421:                 list.Add("2-17");
  422:                 list.Add("2-18");
  423:                 list.Add("2-19");
  424:                 list.Add("2-20");
  425:                 list.Add("2-21");
  426:                 list.Add("2-22");
  427:                 list.Add("2-23");
  428:                 list.Add("2-24");
  429:             }
  430:  
  431:             return list;
  432:         }
  433:  
  434:         ////////////////////////////////////////////////////////////////////////////
  435:  
  436:         /// <summary>
  437:         /// 
  438:         /// </summary>
  439:         public static List<string> PossibleHsiCardPortServiceConfigurationForOntFamilyTypeList(Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType familyType)
  440:         {
  441:             List<string> list;
  442:  
  443:             list = new List<string>(100);
  444:  
  445:             if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Sfu || familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Soho)
  446:             {
  447:                 list.Add("1-1-1");
  448:                 list.Add("1-2-1");
  449:             }
  450:             else if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gfu)
  451:             {
  452:                 list.Add("1-1-1");
  453:                 list.Add("1-2-1");
  454:                 list.Add("1-3-1");
  455:                 list.Add("1-4-1");
  456:             }
  457:             else if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Mdu)
  458:             {
  459:                 list.Add("1-1-1");
  460:                 list.Add("1-2-1");
  461:                 list.Add("1-3-1");
  462:                 list.Add("1-4-1");
  463:                 list.Add("1-5-1");
  464:                 list.Add("1-6-1");
  465:                 list.Add("1-7-1");
  466:                 list.Add("1-8-1");
  467:                 list.Add("1-9-1");
  468:                 list.Add("1-10-1");
  469:                 list.Add("1-11-1");
  470:                 list.Add("1-12-1");
  471:             }
  472:             else if (familyType == Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Gmdu)
  473:             {
  474:                 // not verified
  475:  
  476:                 list.Add("1-1-1");
  477:                 list.Add("1-2-1");
  478:                 list.Add("1-3-1");
  479:                 list.Add("1-4-1");
  480:                 list.Add("1-5-1");
  481:                 list.Add("1-6-1");
  482:                 list.Add("1-7-1");
  483:                 list.Add("1-8-1");
  484:                 list.Add("1-9-1");
  485:                 list.Add("1-10-1");
  486:                 list.Add("1-11-1");
  487:                 list.Add("1-12-1");
  488:  
  489:                 list.Add("1-13-1");
  490:                 list.Add("1-14-1");
  491:                 list.Add("1-15-1");
  492:                 list.Add("1-16-1");
  493:                 list.Add("1-17-1");
  494:                 list.Add("1-18-1");
  495:                 list.Add("1-19-1");
  496:                 list.Add("1-20-1");
  497:                 list.Add("1-21-1");
  498:                 list.Add("1-22-1");
  499:                 list.Add("1-23-1");
  500:                 list.Add("1-24-1");
  501:             }
  502:  
  503:             return list;
  504:         }
  505:  
  506:         ////////////////////////////////////////////////////////////////////////////
  507:  
  508:         /// <summary>
  509:         /// 
  510:         /// </summary>
  511:         public static int PossibleNumberOfHsiCardPortServiceConfigurationForOntFamilyType(int familyType)
  512:         {
  513:             List<string> list;
  514:  
  515:             list = PossibleHsiCardPortServiceConfigurationForOntFamilyTypeList((Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType)familyType);
  516:  
  517:             return list.Count;
  518:         }
  519:  
  520:         ////////////////////////////////////////////////////////////////////////////
  521:  
  522:         /// <summary>
  523:         ///
  524:         /// </summary>
  525:         public static string OntPositionFromOntId(string ontId)
  526:         {
  527:             string rest, ontPosition, amsName;
  528:             int oltId, card, port, ont;
  529:  
  530:             oltId = int.Parse(ontId.Substring(0, 1 + 2 + 2 + 2 + 2)); // network id, site id, router id, odf id, olt id
  531:  
  532:             rest = Regex.Replace(ontId, "^" + oltId.ToString(), "");
  533:  
  534:             card = int.Parse(rest.Substring(4, 2));
  535:             port = int.Parse(rest.Substring(6, 2));
  536:             ont = int.Parse(rest.Substring(8, 2));
  537:  
  538:             amsName = Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.AmsNameFromOltId(oltId);
  539:  
  540:             ontPosition = amsName + "-" + card + "-" + port + "-" + ont;
  541:  
  542:             return ontPosition;
  543:         }
  544:  
  545:         ////////////////////////////////////////////////////////////////////////////
  546:  
  547:         /// <summary>
  548:         ///
  549:         /// </summary>
  550:         public static bool IsValidSerialNumber(string serialNumber)
  551:         {
  552:             bool isValid;
  553:             string s;
  554:  
  555:             if (!string.IsNullOrEmpty(serialNumber))
  556:             {
  557:                 if (serialNumber.Length == 12) // ALCLA0A23C74
  558:                 {
  559:                     s = serialNumber.ToUpper();
  560:  
  561:                     if (s.Substring(0, 4) == "ALCL")
  562:                     {
  563:                         s = s.Substring(4, 8);
  564:  
  565:                         isValid = Ia.Cl.Models.Default.IsHex(s);
  566:                     }
  567:                     else isValid = false;
  568:                 }
  569:                 else isValid = false;
  570:             }
  571:             else isValid = false;
  572:  
  573:             return isValid;
  574:         }
  575:  
  576:         ////////////////////////////////////////////////////////////////////////////
  577:         ////////////////////////////////////////////////////////////////////////////
  578:     }
  579:  
  580:     ////////////////////////////////////////////////////////////////////////////
  581:     ////////////////////////////////////////////////////////////////////////////
  582: }