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

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

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

    1: using System;
    2: using System.Collections.Generic;
    3: using System.ComponentModel.DataAnnotations;
    4: using System.ComponentModel.DataAnnotations.Schema;
    5: using System.Linq;
    6: using System.Threading;
    7: using System.Threading.Tasks;
    8:  
    9: namespace Ia.Ftn.Cl.Model.Huawei
   10: {
   11:     ////////////////////////////////////////////////////////////////////////////
   12:  
   13:     /// <summary publish="true">
   14:     /// Huawei's EMS Ont Entity Framework class for Fixed Telecommunications Network (FTN) entity model.
   15:     /// </summary>
   16:     /// 
   17:     /// <remarks> 
   18:     /// Copyright © 2016-2021 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   19:     ///
   20:     /// 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
   21:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   22:     ///
   23:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   24:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   25:     /// 
   26:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   27:     /// 
   28:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   29:     /// </remarks> 
   30:     public class EmsOnt
   31:     {
   32:         /*
   33:          * iManager_NCE_V200R014C60_TL1_NBI_User_Guide_13.pdf
   34:          * 
   35:          * 14.7.4 Querying the List of ONUs (LST-ONT)
   36:          * 
   37:          * Command Format LST-ONT::[NAME=onu-name|ONTSN=ont-serianu|PWD=ont-password][[,]((DID=Device-ID| DEV=Device-name)[,FN=Frame-id[,SN=Slot-id[,PN=Port-id[,ONTID=ont-id]]]][, (ONTSN=ont-serianum)|(RUNSTAT=run stat)])|(ONUDID=Mdu-Device-id|ONUDEV=Mdu-Devicename)]:{ctag}::[SHOWOPTION=SERIALNUM PWD LOID CHECKCODE ALMPROF DEV VLAN PRI IP MASK GATE ROUTEIP ROUTEMASK NEXTHOP SNMPPROF OPTALMPROF VAPROF MACLEARN SRVLEVELPROF HARDWAREVERSION LSTUPTIME LSTDOWNTIME DEVCURRENTTIME VASPROFILESET OPERSTATE DEVNAME DEVIP BINDWIDTHTYPE];          * 
   38:          */
   39:  
   40:         /// <summary/>
   41:         //public enum ServiceTypeList { IMPU = 1, TEMPLATEIDX, DSPIDX, LP, CSC, UNAME, VCCFLAG, VTFLAG, NSCFU, NSCFUVM, NSCFB, NSCFBVM, NSCFNR, NSCFNRVM, NSCFNL, NSCFNLVM, NSCD, NSCDVM, NSCFNRC, NSCFNRCVM, NSCLIP, NSCIDCW, NSRIO, NSCNIP, NSCLIR, NSRIP, NSCNIR, NSRID, NSNRID, NSRND, NSNRND, NSCW, NSCCW, NSOIP, NSACRM, NSGOIR, NSMOIR, NSTIP, NSTIR, NSOTIR, NSCLIPNOSCREENING, NSCR, NSWAKE_UP, NSAOC_D, NSAOC_E, NSXEXH, NSXEGJ, NSCWCFNR, NSIIFC, NSDN_CALL_OUT_BAR, NSCCBS, NSCCNR, NSCCBSR, NSCCNRR, NS3PTY, NSNPTY, NSDND, NSMCR, NSCBA, NSTMP_LIN, NSCODEC_CNTRL, NSMWI, NSDC, NSHOLD, NSECT, NSCFTB, NSDAN, NSSTOP_SECRET, NSMCID, NSEBO, NSICO, NSOUTG, NSINQYH, NSUINFO, NSDN_CALL_OUT_ALLOW, NSSIC, NSSOC, NSSETCFNRTIME, NSCFS, NSCFSB, NSFAX, NSABRC, NSACRTOVM, NSPREPAID, NSCRBT, NSICB, NSMRINGING, NSCIS, NSCBEG, NSCOLP, NSCOLR, NSCOLPOVR, NSBAOC, NSBOIC, NSBOICEXHC, NSBAIC, NSBICROM, NSSPEED_DIAL, NSSD1D, NSSD2D, NSGRNCALL, NSCPARK, NSGAA, NSQSNS, NSMSN, NSHOTLINE, NSAOC_S, NSNIGHTSRV, NSBACKNUM, NSAUTOCON, NSCAMPON, NSCTD, NSCLICKHOLD, NSQUEUE, NSSANSWER, NSICENCF, NSCFGO, NSCECT, NSCTGO, NSCTIO, NSSETBUSY, NSOVERSTEP, NSABSENT, NSMONITOR, NSFMONITOR, NSDISCNT, NSFDISCNT, NSINSERT, NSFINSERT, NSASI, NSPWCB, NSRD, NSLCPS, NSNCPS, NSICPS, NSCBCLOCK, NSMINIBAR, NSMCN, NSDSTR, NSOPRREG, NSONEKEY, NSINBOUND, NSOUTBOUND, NSCALLERID, NSCUN, NSIPTVVC, NSNP, NSSEC, NSSECSTA, NSHRCN, NSSB, NSOCCR, LCO, LC, LCT, NTT, ITT, ICTX, OCTX, INTT, IITT, ICLT, ICDDD, ICIDD, IOLT, CTLCO, CTLCT, CTLD, CTINTNANP, CTINTWORLD, CTDA, CTOSM, CTOSP, CTOSP1, CCO1, CCO2, CCO3, CCO4, CCO5, CCO6, CCO7, CCO8, CCO9, CCO10, CCO11, CCO12, CCO13, CCO14, CCO15, CCO16, HIGHENTCO, OPERATOR, SUPYSRV, IDDCI, NTCI, LTCI, RSC, CIG, OUTRST, INRST, NOAT, RINGCOUNT, VMAIND, VDMAIND, TGRP, TIDHLD, TIDCW, SCF, LMTGRP, FLBGRP, SLBGRP, COP, G711_64K_A_LAW, G711_64K_U_LAW, G722, G723, G726, G728, G729, CODEC_MP4A, CODEC2833, CODEC2198, G726_40, G726_32, G726_24, G726_16, AMR, CLEARMODE, ILBC, SPEEX, G729EV, EVRC, EVRCB, H261, H263, CODEC_MP4V, H264, T38, T120, G711A_VBD, G711U_VBD, G726_VBD, G726_40_VBD, G726_32_VBD, G726_24_VBD, G726_16_VBD, WIND_BAND_AMR, GSM610, H263_2000, BROADVOICE_32, UNKNOWN_CODEC, ACODEC, VCODEC, POLIDX, NCPI, ICPI, EBOCL, EBOPL, EBOIT, RM, CPC, PCHG, TFPT, CHT, MCIDMODE, MCIDCMODE, MCIDAMODE, PREPAIDIDX, CRBTID, ODBBICTYPE, ODBBOCTYPE, ODBBARTYPE, ODBSS, ODBBRCFTYPE, PNOTI, MAXPARACALL, ATSDTMBUSY, CALLCOUNT, CDNOTICALLER, ISCHGFLAG, CHC, CUSER, CGRP, CUSERGRP, STCF, CHARSC, REGUIDX, SOCBFUNC, SOCBPTONEIDX, ADMINCBA, ADCONTROL_DIVERSION, DPR, PRON, CPCRUS, CUSCAT, SPT100REL }
   42:  
   43:         /// <summary/>
   44:         public EmsOnt() { }
   45:  
   46:         /// <summary/>
   47:         [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
   48:         public string Id { get; set; }
   49:  
   50:         /// <summary>
   51:         /// Last ResultCode of device
   52:         /// </summary>
   53:         public long ResultCode { get; set; }
   54:  
   55:         /// <summary>
   56:         /// Operational state ID of the device
   57:         /// </summary>
   58:         public int StateId { get; set; }
   59:  
   60:         /// <summary>        
   61:         /// DID INTEGER - Indicates the device ID of the OLT. 
   62:         /// </summary>
   63:         public int DID { get; set; }
   64:  
   65:         /// <summary>        
   66:         /// FN INTEGER 0-255 Indicates the subrack ID of the OLT. 
   67:         /// </summary>
   68:         public int FN { get; set; }
   69:  
   70:         /// <summary>        
   71:         /// SN INTEGER 0-35 Indicates the slot ID of the OLT. 
   72:         /// </summary>
   73:         public int SN { get; set; }
   74:  
   75:         /// <summary>        
   76:         /// PN INTEGER 0-63 Indicates the port ID of the OLT. 
   77:         /// </summary>
   78:         public int PN { get; set; }
   79:  
   80:         /// <summary>        
   81:         /// ONTID INTEGER 0-255 NOTE If the UNI port is of 10G GPON, the value range is 0-255; if the UNI port is of 1G GPON, the value range is 0-127. Indicates the ONT ID. 
   82:         /// </summary>
   83:         public int ONTID { get; set; }
   84:  
   85:         /// <summary>        
   86:         /// NAME OCTET STRING SIZE (255) Indicates the name of the ONU. 
   87:         /// </summary>
   88:         public string NAME { get; set; }
   89:  
   90:         /// <summary>        
   91:         /// ALIAS OCTET STRING SIZE (128) NOTE For the MA5600 V800R005C03, MA5600 V800R005C23, and MA5600 V800R005C33, the alias consists of up to 32 characters. Indicates the alias for the ONU. NOTE The following characters are supported: l English letters: A-Z and a-z. l Numbers: 0-9. l Symbols: ( ) _ - + . / \ | and space.
   92:         /// </summary>
   93:         public string ALIAS { get; set; }
   94:  
   95:         /// <summary>
   96:         /// CAPABPROF OCTET STRING SIZE (64) Indicates the name of the capability set profile. The parameter is available only when the ONU is in the discrete mode.
   97:         /// </summary>
   98:         public string CAPABPROF { get; set; }
   99:  
  100:         /// <summary>
  101:         /// VENDORID OCTET STRING SIZE (32) Indicates the vendor ID.
  102:         /// </summary>
  103:         public string VENDORID { get; set; }
  104:  
  105:         /// <summary>
  106:         /// EQUIPMENTID OCTET STRING SIZE (40) Indicates the ONU ID.
  107:         /// </summary>
  108:         public string EQUIPMENTID { get; set; }
  109:  
  110:         /// <summary>
  111:         /// MAINSOFTVERSION OCTET STRING SIZE (14) Indicates the software version.
  112:         /// </summary>
  113:         public string MAINSOFTVERSION { get; set; }
  114:  
  115:         /// <summary>
  116:         /// AUTH OCTET STRING l SN l SN_PASSWO RD l ALWAYS_ON l ONCE_ON l LOID l LOID_ONCE ON l LOID_CHEC KCODE l LOID_CHEC KCODE_ONC EON Indicates the authentication mode.
  117:         /// </summary>
  118:         public string AUTH { get; set; }
  119:  
  120:         /// <summary>
  121:         /// AUTHTIMEOUT INTEGER 1-168 Disable Indicates the timeout period of the authentication. This parameter is valid only when the AUTH parameter is set to ONCE_ON. If you do not set this parameter, the value is returned as Disable in the output information. Unit: h.
  122:         /// </summary>
  123:         public int AUTHTIMEOUT { get; set; }
  124:  
  125:         /// <summary>
  126:         /// LINEPROF OCTET STRING SIZE (32) Indicates the name of the line profile. The parameter is available only when the ONU is in the profile mode.
  127:         /// </summary>
  128:         public string LINEPROF { get; set; }
  129:  
  130:         /// <summary>
  131:         /// SRVPROF OCTET STRING SIZE (32) Indicates the name of the service profile. The parameter is available only when the ONU is in the profile mode.
  132:         /// </summary>
  133:         public string SRVPROF { get; set; }
  134:  
  135:         /// <summary>
  136:         /// SERIALNUM OCTET STRING SIZE (16) Indicates the serial number. Format: 12byte character string XXXXXXXXXXXX or 16-byte character string XXXXXXXXXXXXXXXX. For details about how to modify the format of the returned SN, see C.12 How to Modify the Format of the Returned SN.
  137:         /// </summary>
  138:         public string SERIALNUM { get; set; }
  139:  
  140:         /// <summary>
  141:         /// LOID OCTET STRING SIZE (24) Indicates the logical authentication code of the ONT.
  142:         /// </summary>
  143:         public string LOID { get; set; }
  144:  
  145:         /// <summary>
  146:         /// CHECKCODE OCTET STRING SIZE (12) Indicates the logical verification code of the ONT.
  147:         /// </summary>
  148:         public string CHECKCODE { get; set; }
  149:  
  150:         /// <summary>
  151:         /// PWD OCTET STRING SIZE (36) NOTE For the OLTs earlier than V800R011C00, the maximum length of password for ONTs connected to the OLTs is 10 characters. Indicates the password.
  152:         /// </summary>
  153:         public string PWD { get; set; }
  154:  
  155:         /// <summary>
  156:         /// ALMPROF OCTET STRING SIZE (32) Indicates the alarm profile name.
  157:         /// </summary>
  158:         public string ALMPROF { get; set; }
  159:  
  160:         /// <summary>
  161:         /// DEV OCTET STRING SIZE (192) Indicates the default OLT name. If the value of the configuration item DEVMEAN is 1, the DEV parameter indicates the IP address of the device. For details about how to modify configuration items, see C.7 How to Locate a Device According to the IP Address. 
  162:         /// </summary>
  163:         public string DEV { get; set; }
  164:  
  165:         /// <summary>
  166:         /// VLAN INTEGER 1-4095 Indicates the management VLAN of the ONU. When the location information contains NAME and SHOWOPTION=VLAN is entered, this parameter is displayed as --. 
  167:         /// </summary>
  168:         public int VLAN { get; set; }
  169:  
  170:         /// <summary>
  171:         /// PRI INTEGER 0-7 Indicates the priority of the ONU. When the location information contains NAME and SHOWOPTION=PRI is entered, this parameter is displayed as --. 
  172:         /// </summary>
  173:         public int PRI { get; set; }
  174:  
  175:         /// <summary>
  176:         /// IP IPADDRESS N/A Indicates the IP address of the ONU. When the location information contains NAME and SHOWOPTION=IP is entered, this parameter is displayed as --.
  177:         /// </summary>
  178:         public string IP { get; set; }
  179:  
  180:         /// <summary>
  181:         /// MASK IPADDRESS N/A Indicates the IP mask of the ONU. When the location information contains NAME and SHOWOPTION=MASK is entered, this parameter is displayed as --. 
  182:         /// </summary>
  183:         public string MASK { get; set; }
  184:  
  185:         /// <summary>
  186:         /// GATE IPADDRESS N/A Indicates the default gateway of the ONU. When the location information contains NAME and SHOWOPTION=GATE is entered, this parameter is displayed as --. 
  187:         /// </summary>
  188:         public string GATE { get; set; }
  189:  
  190:         /// <summary>
  191:         /// ROUTEIP OCTET STRING SIZE (255) Indicates the destination IP address of the ONU. When the location information contains NAME and SHOWOPTION=ROUTEIP is entered, this parameter is displayed as --. 
  192:         /// </summary>
  193:         public string ROUTEIP { get; set; }
  194:  
  195:         /// <summary>
  196:         /// ROUTEMASK OCTET STRING SIZE (255) Indicates the destination mask of the ONU. When the location information contains NAME and SHOWOPTION=ROUTEMASK is entered, this parameter is displayed as --. 
  197:         /// </summary>
  198:         public string ROUTEMASK { get; set; }
  199:  
  200:         /// <summary>
  201:         /// NEXTHOP OCTET STRING SIZE (255) Indicates the next hop IP address of the ONU. When the location information contains NAME and SHOWOPTION=NEXTHOP is entered, this parameter is displayed as --. 
  202:         /// </summary>
  203:         public string NEXTHOP { get; set; }
  204:  
  205:         /// <summary>
  206:         /// SNMPPROF OCTET STRING SIZE (32) Indicates the SNMP profile name of the ONU. When the location informat on contains NAME and SHOWOPTION=SNMPPROF is entered, this parameter is displayed as --. 
  207:         /// </summary>
  208:         public string SNMPPROF { get; set; }
  209:  
  210:         /// <summary>
  211:         /// OPTALMPROF OCTET STRING SIZE (32) When the location information contains NAME and SHOWOPTION=OPTALMPROF is entered, this parameter is displayed as --. 
  212:         /// </summary>
  213:         public string OPTALMPROF { get; set; }
  214:  
  215:         /// <summary>
  216:         /// VAPROF OCTET STRING SIZE (32) Indicates the name of a global ONT VAS profile or general ONT VAS profile. When the location information contains NAME and SHOWOPTION=VAPROF is entered, this parameter is displayed as --.
  217:         /// </summary>
  218:         public string VAPROF { get; set; }
  219:         /// <summary>
  220:         /// MACLEARN OCTET STRING l ENABLE l DISABLE Specifies whether to enable the MAC address learning function for ONUs. When the location information contains NAME and SHOWOPTION=MACLEARN is entered, this parameter is displayed as --. NOTE Only the OLT devices in discrete mode support this parameter.
  221:         /// </summary>
  222:         public string MACLEARN { get; set; }
  223:  
  224:         /// <summary>
  225:         /// SRVLEVELPROF OCTET STRING SIZE (32) Indicates the name of a service level profile. When the location information contains NAME and SHOWOPTION=SRVLEVELPROF is entered, this parameter is displayed as --. NOTE MA5600 V800R008C05 and later versions (excluding MA5600 V800R009) support this parameter.
  226:         /// </summary>
  227:         public string SRVLEVELPROF { get; set; }
  228:  
  229:         /// <summary>
  230:         /// LSTUPTIME INTEGER Format: YYYYMM-DD HH:MM:SS Indicates the last time when the ONT was online. The time is in UTC format. NOTE You cannot enter NAME as location information for this parameter.
  231:         /// </summary>
  232:         public int LSTUPTIME { get; set; }
  233:  
  234:         /// <summary>
  235:         /// LSTDOWNTIME INTEGER Format: YYYYMM-DD HH:MM:SS Indicates the last time when the ONT was offline. The time is in UTC format. NOTE You cannot enter NAME as location information for this parameter.
  236:         /// </summary>
  237:         public int LSTDOWNTIME { get; set; }
  238:  
  239:         /// <summary>
  240:         /// DEVCURRENTTIME INTEGER Format: YYYYMM-DD HH:MM:SS Indicates the current device time. The time is in UTC format. NOTE You cannot enter NAME as location information for this parameter.
  241:         /// </summary>
  242:         public int DEVCURRENTTIME { get; set; }
  243:  
  244:         /// <summary>
  245:         /// VASPROFILESET OCTET STRING SIZE (32) Indicates the profile set where the general ONT VAS profile resides. NOTE You cannot enter NAME as location information for this parameter.
  246:         /// </summary>
  247:         public string VASPROFILESET { get; set; }
  248:  
  249:         /// <summary>
  250:         /// HARDWAREVERSION OCTET STRING SIZE (32) Indicates the ONU hardware version. NOTE You cannot enter NAME as location information for this parameter.
  251:         /// </summary>
  252:         public string HARDWAREVERSION { get; set; }
  253:  
  254:         /// <summary>
  255:         /// OPERSTATE OCTET STRING l ACTIVATE l DEACTIVATE Indicates the operating status of the ONU. NOTE You cannot enter NAME as location information for this parameter.
  256:         /// </summary>
  257:         public string OPERSTATE { get; set; }
  258:  
  259:         /// <summary>
  260:         /// DEVNAME OCTET STRING SIZE (192) Indicates the name of the OLT.
  261:         /// </summary>
  262:         public string DEVNAME { get; set; }
  263:  
  264:         /// <summary>
  265:         /// BINDWIDTHTYPE INTEGER l 2.5G-1.25G l 10G-2.5G l 10G-10G l AUTO Indicates the upstream and downstream
  266:         /// </summary>
  267:         public int BINDWIDTHTYPE { get; set; }
  268:  
  269:         /// <summary/>
  270:         public DateTime Created { get; set; }
  271:  
  272:         /// <summary/>
  273:         public DateTime Updated { get; set; }
  274:  
  275:         /// <summary/>
  276:         [ForeignKey("Access_Id")]
  277:         public virtual Access Access { get; set; }
  278:  
  279:         /// <summary/>
  280:         [ForeignKey("EmsPort_Id")]
  281:         public virtual Ia.Ftn.Cl.Model.Huawei.EmsPort EmsPort { get; set; }
  282:  
  283:         /// <summary/>
  284:         public virtual ICollection<Ia.Ftn.Cl.Model.Huawei.EmsOntSipInfo> EmsOntSipInfos { get; set; }
  285:  
  286:         /// <summary/>
  287:         public virtual ICollection<Ia.Ftn.Cl.Model.Huawei.EmsVoipPstnUser> EmsVoipPstnUsers { get; set; }
  288:  
  289:         ////////////////////////////////////////////////////////////////////////////
  290:  
  291:         /// <summary>
  292:         ///
  293:         /// </summary>
  294:         [NotMapped]
  295:         public string ResultCodeString
  296:         {
  297:             get
  298:             {
  299:                 return this.ResultCode.ToString();
  300:             }
  301:         }
  302:  
  303:         ////////////////////////////////////////////////////////////////////////////
  304:  
  305:         /// <summary>
  306:         ///
  307:         /// </summary>
  308:         [NotMapped]
  309:         public string State
  310:         {
  311:             get
  312:             {
  313:                 return Ia.Ftn.Cl.Model.Data.Huawei.Ems.BellcoreStateFromId(this.StateId);
  314:             }
  315:         }
  316:  
  317:         ////////////////////////////////////////////////////////////////////////////
  318:  
  319:         /// <summary>
  320:         ///
  321:         /// </summary>
  322:         [NotMapped]
  323:         public Ia.Ftn.Cl.Model.Business.Huawei.Ont.EquipmentType EquipmentType
  324:         {
  325:             get
  326:             {
  327:                 Ia.Ftn.Cl.Model.Business.Huawei.Ont.EquipmentType equipmentType;
  328:  
  329:                 equipmentType = Ia.Ftn.Cl.Model.Business.Huawei.Ont.EquipmentTypeFromOntIdAndFamilyTypeAndEquipmentId(this.FamilyType, this.EQUIPMENTID, this.Id);
  330:  
  331:                 return equipmentType;
  332:             }
  333:         }
  334:  
  335:         ////////////////////////////////////////////////////////////////////////////
  336:  
  337:         /// <summary>
  338:         ///
  339:         /// </summary>
  340:         [NotMapped]
  341:         public Ia.Ftn.Cl.Model.Business.Huawei.Ont.FamilyType FamilyType
  342:         {
  343:             get
  344:             {
  345:                 var familyType = (from e in Ia.Ftn.Cl.Model.Business.Huawei.Ont.EquipmentTypeList
  346:                                   where e.SystemNameList.Contains(this.EQUIPMENTID)
  347:                                   select e.FamilyType).Distinct().SingleOrDefault();
  348:  
  349:                 return familyType;
  350:             }
  351:         }
  352:  
  353:         ////////////////////////////////////////////////////////////////////////////
  354:  
  355:         /// <summary>
  356:         ///
  357:         /// </summary>
  358:         public bool Equal(Ia.Ftn.Cl.Model.Huawei.EmsOnt b)
  359:         {
  360:             // below: this will not check the Id, Created, Updated fields
  361:             bool areEqual;
  362:  
  363:             if (this.ResultCode != b.ResultCode) areEqual = false;
  364:             else if (this.StateId != b.StateId) areEqual = false;
  365:             else if (this.DID != b.DID) areEqual = false;
  366:             else if (this.FN != b.FN) areEqual = false;
  367:             else if (this.SN != b.SN) areEqual = false;
  368:             else if (this.PN != b.PN) areEqual = false;
  369:             else if (this.ONTID != b.ONTID) areEqual = false;
  370:             else if (this.NAME != b.NAME) areEqual = false;
  371:             else if (this.ALIAS != b.ALIAS) areEqual = false;
  372:             else if (this.CAPABPROF != b.CAPABPROF) areEqual = false;
  373:             else if (this.VENDORID != b.VENDORID) areEqual = false;
  374:             else if (this.EQUIPMENTID != b.EQUIPMENTID) areEqual = false;
  375:             else if (this.MAINSOFTVERSION != b.MAINSOFTVERSION) areEqual = false;
  376:             else if (this.AUTH != b.AUTH) areEqual = false;
  377:             else if (this.AUTHTIMEOUT != b.AUTHTIMEOUT) areEqual = false;
  378:             else if (this.LINEPROF != b.LINEPROF) areEqual = false;
  379:             else if (this.SRVPROF != b.SRVPROF) areEqual = false;
  380:             else if (this.SERIALNUM != b.SERIALNUM) areEqual = false;
  381:             else if (this.LOID != b.LOID) areEqual = false;
  382:             else if (this.CHECKCODE != b.CHECKCODE) areEqual = false;
  383:             else if (this.PWD != b.PWD) areEqual = false;
  384:             else if (this.ALMPROF != b.ALMPROF) areEqual = false;
  385:             else if (this.DEV != b.DEV) areEqual = false;
  386:             else if (this.VLAN != b.VLAN) areEqual = false;
  387:             else if (this.PRI != b.PRI) areEqual = false;
  388:             else if (this.IP != b.IP) areEqual = false;
  389:             else if (this.MASK != b.MASK) areEqual = false;
  390:             else if (this.GATE != b.GATE) areEqual = false;
  391:             else if (this.ROUTEIP != b.ROUTEIP) areEqual = false;
  392:             else if (this.ROUTEMASK != b.ROUTEMASK) areEqual = false;
  393:             else if (this.NEXTHOP != b.NEXTHOP) areEqual = false;
  394:             else if (this.SNMPPROF != b.SNMPPROF) areEqual = false;
  395:             else if (this.OPTALMPROF != b.OPTALMPROF) areEqual = false;
  396:             else if (this.VAPROF != b.VAPROF) areEqual = false;
  397:             else if (this.MACLEARN != b.MACLEARN) areEqual = false;
  398:             else if (this.SRVLEVELPROF != b.SRVLEVELPROF) areEqual = false;
  399:             else if (this.LSTUPTIME != b.LSTUPTIME) areEqual = false;
  400:             else if (this.LSTDOWNTIME != b.LSTDOWNTIME) areEqual = false;
  401:             else if (this.DEVCURRENTTIME != b.DEVCURRENTTIME) areEqual = false;
  402:             else if (this.VASPROFILESET != b.VASPROFILESET) areEqual = false;
  403:             else if (this.HARDWAREVERSION != b.HARDWAREVERSION) areEqual = false;
  404:             else if (this.OPERSTATE != b.OPERSTATE) areEqual = false;
  405:             else if (this.DEVNAME != b.DEVNAME) areEqual = false;
  406:             else if (this.BINDWIDTHTYPE != b.BINDWIDTHTYPE) areEqual = false;
  407:             else if (this.EmsPort != null && b.EmsPort != null && this.EmsPort.Id != b.EmsPort.Id) areEqual = false; // temp
  408:             else if (this.Access.Id != b.Access.Id) areEqual = false;
  409:             else areEqual = true;
  410:  
  411:             return areEqual;
  412:         }
  413:  
  414:         ////////////////////////////////////////////////////////////////////////////
  415:  
  416:         /// <summary>
  417:         ///
  418:         /// </summary>
  419:         public bool Update(Ia.Ftn.Cl.Model.Huawei.EmsOnt updatedItem)
  420:         {
  421:             // below: this will not update Id, Created
  422:             bool updated;
  423:  
  424:             updated = false;
  425:  
  426:             if (this.ResultCode != updatedItem.ResultCode) { this.ResultCode = updatedItem.ResultCode; updated = true; }
  427:             if (this.StateId != updatedItem.StateId) { this.StateId = updatedItem.StateId; updated = true; }
  428:             if (this.DID != updatedItem.DID) { this.DID = updatedItem.DID; updated = true; }
  429:             if (this.FN != updatedItem.FN) { this.FN = updatedItem.FN; updated = true; }
  430:             if (this.SN != updatedItem.SN) { this.SN = updatedItem.SN; updated = true; }
  431:             if (this.PN != updatedItem.PN) { this.PN = updatedItem.PN; updated = true; }
  432:             if (this.ONTID != updatedItem.ONTID) { this.ONTID = updatedItem.ONTID; updated = true; }
  433:             if (this.NAME != updatedItem.NAME) { this.NAME = updatedItem.NAME; updated = true; }
  434:             if (this.ALIAS != updatedItem.ALIAS) { this.ALIAS = updatedItem.ALIAS; updated = true; }
  435:             if (this.CAPABPROF != updatedItem.CAPABPROF) { this.CAPABPROF = updatedItem.CAPABPROF; updated = true; }
  436:             if (this.VENDORID != updatedItem.VENDORID) { this.VENDORID = updatedItem.VENDORID; updated = true; }
  437:             if (this.EQUIPMENTID != updatedItem.EQUIPMENTID) { this.EQUIPMENTID = updatedItem.EQUIPMENTID; updated = true; }
  438:             if (this.MAINSOFTVERSION != updatedItem.MAINSOFTVERSION) { this.MAINSOFTVERSION = updatedItem.MAINSOFTVERSION; updated = true; }
  439:             if (this.AUTH != updatedItem.AUTH) { this.AUTH = updatedItem.AUTH; updated = true; }
  440:             if (this.AUTHTIMEOUT != updatedItem.AUTHTIMEOUT) { this.AUTHTIMEOUT = updatedItem.AUTHTIMEOUT; updated = true; }
  441:             if (this.LINEPROF != updatedItem.LINEPROF) { this.LINEPROF = updatedItem.LINEPROF; updated = true; }
  442:             if (this.SRVPROF != updatedItem.SRVPROF) { this.SRVPROF = updatedItem.SRVPROF; updated = true; }
  443:             if (this.SERIALNUM != updatedItem.SERIALNUM) { this.SERIALNUM = updatedItem.SERIALNUM; updated = true; }
  444:             if (this.LOID != updatedItem.LOID) { this.LOID = updatedItem.LOID; updated = true; }
  445:             if (this.CHECKCODE != updatedItem.CHECKCODE) { this.CHECKCODE = updatedItem.CHECKCODE; updated = true; }
  446:             if (this.PWD != updatedItem.PWD) { this.PWD = updatedItem.PWD; updated = true; }
  447:             if (this.ALMPROF != updatedItem.ALMPROF) { this.ALMPROF = updatedItem.ALMPROF; updated = true; }
  448:             if (this.DEV != updatedItem.DEV) { this.DEV = updatedItem.DEV; updated = true; }
  449:             if (this.VLAN != updatedItem.VLAN) { this.VLAN = updatedItem.VLAN; updated = true; }
  450:             if (this.PRI != updatedItem.PRI) { this.PRI = updatedItem.PRI; updated = true; }
  451:             if (this.IP != updatedItem.IP) { this.IP = updatedItem.IP; updated = true; }
  452:             if (this.MASK != updatedItem.MASK) { this.MASK = updatedItem.MASK; updated = true; }
  453:             if (this.GATE != updatedItem.GATE) { this.GATE = updatedItem.GATE; updated = true; }
  454:             if (this.ROUTEIP != updatedItem.ROUTEIP) { this.ROUTEIP = updatedItem.ROUTEIP; updated = true; }
  455:             if (this.ROUTEMASK != updatedItem.ROUTEMASK) { this.ROUTEMASK = updatedItem.ROUTEMASK; updated = true; }
  456:             if (this.NEXTHOP != updatedItem.NEXTHOP) { this.NEXTHOP = updatedItem.NEXTHOP; updated = true; }
  457:             if (this.SNMPPROF != updatedItem.SNMPPROF) { this.SNMPPROF = updatedItem.SNMPPROF; updated = true; }
  458:             if (this.OPTALMPROF != updatedItem.OPTALMPROF) { this.OPTALMPROF = updatedItem.OPTALMPROF; updated = true; }
  459:             if (this.VAPROF != updatedItem.VAPROF) { this.VAPROF = updatedItem.VAPROF; updated = true; }
  460:             if (this.MACLEARN != updatedItem.MACLEARN) { this.MACLEARN = updatedItem.MACLEARN; updated = true; }
  461:             if (this.SRVLEVELPROF != updatedItem.SRVLEVELPROF) { this.SRVLEVELPROF = updatedItem.SRVLEVELPROF; updated = true; }
  462:             if (this.LSTUPTIME != updatedItem.LSTUPTIME) { this.LSTUPTIME = updatedItem.LSTUPTIME; updated = true; }
  463:             if (this.LSTDOWNTIME != updatedItem.LSTDOWNTIME) { this.LSTDOWNTIME = updatedItem.LSTDOWNTIME; updated = true; }
  464:             if (this.DEVCURRENTTIME != updatedItem.DEVCURRENTTIME) { this.DEVCURRENTTIME = updatedItem.DEVCURRENTTIME; updated = true; }
  465:             if (this.VASPROFILESET != updatedItem.VASPROFILESET) { this.VASPROFILESET = updatedItem.VASPROFILESET; updated = true; }
  466:             if (this.HARDWAREVERSION != updatedItem.HARDWAREVERSION) { this.HARDWAREVERSION = updatedItem.HARDWAREVERSION; updated = true; }
  467:             if (this.OPERSTATE != updatedItem.OPERSTATE) { this.OPERSTATE = updatedItem.OPERSTATE; updated = true; }
  468:             if (this.DEVNAME != updatedItem.DEVNAME) { this.DEVNAME = updatedItem.DEVNAME; updated = true; }
  469:             if (this.BINDWIDTHTYPE != updatedItem.BINDWIDTHTYPE) { this.BINDWIDTHTYPE = updatedItem.BINDWIDTHTYPE; updated = true; }
  470:             if (this.EmsPort != updatedItem.EmsPort) { this.EmsPort = updatedItem.EmsPort; updated = true; }
  471:             if (this.Access != updatedItem.Access) { this.Access = updatedItem.Access; updated = true; }
  472:  
  473:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
  474:  
  475:             return updated;
  476:         }
  477:  
  478:         ////////////////////////////////////////////////////////////////////////////
  479:         ////////////////////////////////////////////////////////////////////////////
  480:  
  481:         /// <summary>
  482:         ///
  483:         /// </summary>
  484:         public string ToSimpleTextString()
  485:         {
  486:             return Ia.Ftn.Cl.Model.Data.Huawei.Ont.ToSimpleTextString(this);
  487:         }
  488:  
  489:         ////////////////////////////////////////////////////////////////////////////
  490:         ////////////////////////////////////////////////////////////////////////////
  491:     }
  492:  
  493:     ////////////////////////////////////////////////////////////////////////////
  494:     ////////////////////////////////////////////////////////////////////////////
  495: }