Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
Skip Navigation LinksHome » Code Library » EmsDev

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

Huawei's EMS Dev Entity Framework class for Next Generation Network (NGN) entity model.

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.ComponentModel.DataAnnotations;
   4:  using System.ComponentModel.DataAnnotations.Schema;
   5:   
   6:  namespace Ia.Ngn.Cl.Model.Huawei
   7:  {
   8:      ////////////////////////////////////////////////////////////////////////////
   9:   
  10:      /// <summary publish="true">
  11:      /// Huawei's EMS Dev Entity Framework class for Next Generation Network (NGN) entity model.
  12:      /// </summary>
  13:      /// 
  14:      /// <remarks> 
  15:      /// Copyright © 2016-2018 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet 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 partial class EmsDev
  28:      {
  29:          /*
  30:           * iManager_U2000_V200R014C60_TL1_NBI_User_Guide_13.pdf
  31:           * 14.1.3 Querying the Information About a Device (LST-DEV)
  32:           * 
  33:           * Usage Note:
  34:           * 
  35:           * The DEV (IP address of an optical line terminal) and ONULOCATEINFO parameters can be used as the location information. Before using these two parameters as the location information, make sure that the DEV parameter indicates the device IP address. For details, see C.7 How to Locate a Device According to the IP Address.
  36:           * 
  37:           * Command Format:
  38:           * 
  39:           * LST-DEV::[(DID=Device-ID)|(DEV=Device-name)|(DEVIP=device-IP)|(DT=device-type)| (DEVVER=device-ver)|(DEV=device-olt-ipaddress,ONULOCATEINFO=onu-locateinformation)]:CTAG::[SHOWOPTION=option of result's attributes][,USERID=user id]; 
  40:           * 
  41:           */
  42:   
  43:          /// <summary/>
  44:          //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 }
  45:   
  46:          /// <summary/>
  47:          public EmsDev() { }
  48:   
  49:          /// <summary/>
  50:          [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
  51:          public int Id { get; set; }
  52:   
  53:          /// <summary>
  54:          /// DID INTEGER - Indicates the device ID. 
  55:          /// </summary>
  56:          public int DID { get; set; }
  57:   
  58:          /// <summary>
  59:          /// DEV OCTET STRING SIZE (192) Indicates the device name. 
  60:          /// </summary>
  61:          public string DEV { get; set; }
  62:   
  63:          /// <summary>
  64:          /// DEVIP IPADDRESS - Indicates the IP address of the device. 
  65:          /// </summary>
  66:          public string DEVIP { get; set; }
  67:   
  68:          /// <summary>
  69:          /// DT OCTET STRING See Supporting Device. Indicates the device type. When you query information about an MA5683T, DT in the response message is related to the TL1_SHOW_MA5683T_S WITCH configuration item setting. For details about the meaning and setting method of the configuration item, see Table 8-1. 
  70:          /// </summary>
  71:          public string DT { get; set; }
  72:   
  73:          /// <summary>
  74:          /// DVER OCTET STRING SIZE (252) Indicates the device version. 
  75:          /// </summary>
  76:          public string DVER { get; set; }
  77:   
  78:          /// <summary>
  79:          /// DSTAT OCTET STRING l Connecting l Disconnecting l WarningFault l MinorFault l MajorFault l CriticalFault l Loop l Test l Unknown Indicates the status of the device. 
  80:          /// </summary>
  81:          public string DSTAT { get; set; }
  82:   
  83:          /// <summary>
  84:          /// DLOC OCTET STRING SIZE (252)
  85:          /// </summary>
  86:          public string DLOC { get; set; }
  87:   
  88:          /// <summary>
  89:          /// AdminStat OCTET STRING l UNKOWN l Plan l Install Indicates the management status of the device. 
  90:          /// </summary>
  91:          public string AdminStat { get; set; }
  92:   
  93:          /// <summary>
  94:          /// WorkMode OCTET STRING l CMSAN l AMSAN Indicates the working mode of the device. Only the UA5000 (IPMB) supports this parameter. The meanings of the options are as follows: l CMSAN: It is short for copper multi-service access node. l AMSAN: It is short for aggregator multi-service access node. 
  95:          /// </summary>
  96:          public string WorkMode { get; set; }
  97:   
  98:          /// <summary>
  99:          /// ADDITIONALINFO OCTET STRING SIZE (252) Indicates the location of the MDU. The format of the value is OLT device name/subrack ID of the PON port/slot ID of the PON port/number of the PON port/MDUID (ONTID), such as 10.71.35.172/0/14/0/0. 
 100:          /// </summary>
 101:          public string ADDITIONALINFO { get; set; }
 102:   
 103:          /// <summary>
 104:          /// CRTID OCTET STRING SIZE (255) Indicates the ID of an NE creator. 
 105:          /// </summary>
 106:          public string CRTID { get; set; }
 107:   
 108:          /// <summary>
 109:          /// CRTADDR OCTET STRING SIZE (255) Indicates the address of an NE creator. 
 110:          /// </summary>
 111:          public string CRTADDR { get; set; }
 112:   
 113:          /// <summary>
 114:          /// CRTTEL OCTET STRING SIZE (255) Indicates the telephone number of an NE creator. The parameter value is a character string in any format that represents a telephone number.
 115:          /// </summary>
 116:          public string CRTTEL { get; set; }
 117:   
 118:          /// <summary>
 119:          /// CRTDATE OCTET STRING SIZE (255) Indicates the time when an NE is created. l the value of configuration item BMS_LST_DEV_CRT DATE_SHOW_GMT is set to 0. Format: yearmonth-day hour:minute:second. For example, 2010-12-16 07:22:57. l the value of configuration item BMS_LST_DEV_CRT DATE_SHOW_GMT is set to 1. Format: yearmonth-day hour:minute:second time zone. For example, 2010-12-16 07:22:57 GMT. For details about the meaning and setting method of the configuration item, see Table 8-1. 
 120:          /// </summary>
 121:          public string CRTDATE { get; set; }
 122:   
 123:          /// <summary>
 124:          /// REMARK OCTET STRING SIZE (255) Indicates remarks. 
 125:          /// </summary>
 126:          public string REMARK { get; set; }
 127:   
 128:          /// <summary>
 129:          /// TYPE OCTET STRING l OLT l ONU l OTHER Indicates the NE type. Options are as follows: l OLT: OLTs l ONU: ONUs l OTHER: Other devices
 130:          /// </summary>
 131:          public string TYPE { get; set; }
 132:   
 133:          /// <summary>
 134:          /// NERATELIST OCTET STRING l 155 M/620 M/1000 M/10000 M l 1000 M/10000 M Indicates the upstream port rate supported by an NE. Options are as follows: l 155M, 620M, 1000M, 10000M: An OLT or another device supports the upstream port rate of 155 Mbit/s, 620 Mbit/s, 1000 Mbit/s, or 10000 Mbit/s. l 1000 M, 10000 M: An ONU supports the upstream port rate of 1000 Mbit/s or 10000 Mbit/s at s. 
 135:          /// </summary>
 136:          public string NERATELIST { get; set; }
 137:   
 138:          /// <summary>
 139:          /// NEPROV OCTET STRING HUAWEI Indicates the NE vender name. 
 140:          /// </summary>
 141:          public string NEPROV { get; set; }
 142:   
 143:          /// <summary>
 144:          /// TOPXY OCTET STRING SIZE (255) Indicates the relative coordinate of an NE in the Main Topology. Format: (horizontal coordinate, vertical coordinate). For example, (106, 225). 
 145:          /// </summary>
 146:          public string TOPXY { get; set; }
 147:   
 148:          /// <summary>
 149:          /// EMSID OCTET STRING HUAWEIEMS Indicates the ID of an EMS. 
 150:          /// </summary>
 151:          public string EMSID { get; set; }
 152:   
 153:          /// <summary>
 154:          /// ALIAS OCTET STRING SIZE (255) Indicates the NE alias. 
 155:          /// </summary>
 156:          public string ALIAS { get; set; }
 157:   
 158:          /// <summary>
 159:          /// PCBVER OCTET STRING SIZE (255) Indicates the hardware version of an NE, that is, the control board version. 
 160:          /// </summary>
 161:          public string PCBVER { get; set; }
 162:   
 163:          /// <summary>
 164:          /// MAINTAINID OCTET STRING SIZE (255) Indicates the ID of an NE maintenance engineer. 
 165:          /// </summary>
 166:          public string MAINTAINID { get; set; }
 167:   
 168:          /// <summary>
 169:          /// MAINTAINADDR OCTET STRING SIZE (255) Indicates the address of an NE maintenance engineer. The parameter value is an email address. For example: w11@huawei.com.
 170:          /// </summary>
 171:          public string MAINTAINADDR { get; set; }
 172:   
 173:          /// <summary>
 174:          /// MAINTAINTEL OCTET STRING SIZE (255) Indicates the telephone number of an NE maintenance engineer. The parameter value is a character string in any format that represents a telephone number. 
 175:          /// </summary>
 176:          public string MAINTAINTEL { get; set; }
 177:   
 178:          /// <summary>
 179:          /// REGISTERSTAT OCTET STRING l registered l unregistered Indicates the registration status of an ONU. Options are as follows: l registered: The ONU has been registered. l unregistered: The ONU has not been registered.
 180:          /// </summary>
 181:          public string REGISTERSTAT { get; set; }
 182:   
 183:          /// <summary/>
 184:          public DateTime Created { get; set; }
 185:   
 186:          /// <summary/>
 187:          public DateTime Updated { get; set; }
 188:   
 189:          /// <summary/>
 190:          public virtual ICollection<Ia.Ngn.Cl.Model.Huawei.EmsBoard> EmsBoards { get; set; }
 191:   
 192:          ////////////////////////////////////////////////////////////////////////////
 193:   
 194:          /// <summary>
 195:          ///
 196:          /// </summary>
 197:          public bool Equal(Ia.Ngn.Cl.Model.Huawei.EmsDev b)
 198:          {
 199:              // below: this will not check the Id, Created, Updated fields
 200:              bool areEqual;
 201:   
 202:              if (this.DID != b.DID) areEqual = false;
 203:              else if (this.DEV != b.DEV) areEqual = false;
 204:              else if (this.DEVIP != b.DEVIP) areEqual = false;
 205:              else if (this.DT != b.DT) areEqual = false;
 206:              else if (this.DVER != b.DVER) areEqual = false;
 207:              else if (this.DSTAT != b.DSTAT) areEqual = false;
 208:              else if (this.DLOC != b.DLOC) areEqual = false;
 209:              else if (this.AdminStat != b.AdminStat) areEqual = false;
 210:              else if (this.WorkMode != b.WorkMode) areEqual = false;
 211:              else if (this.ADDITIONALINFO != b.ADDITIONALINFO) areEqual = false;
 212:              else if (this.CRTID != b.CRTID) areEqual = false;
 213:              else if (this.CRTADDR != b.CRTADDR) areEqual = false;
 214:              else if (this.CRTTEL != b.CRTTEL) areEqual = false;
 215:              else if (this.CRTDATE != b.CRTDATE) areEqual = false;
 216:              else if (this.REMARK != b.REMARK) areEqual = false;
 217:              else if (this.TYPE != b.TYPE) areEqual = false;
 218:              else if (this.NERATELIST != b.NERATELIST) areEqual = false;
 219:              else if (this.NEPROV != b.NEPROV) areEqual = false;
 220:              else if (this.TOPXY != b.TOPXY) areEqual = false;
 221:              else if (this.EMSID != b.EMSID) areEqual = false;
 222:              else if (this.ALIAS != b.ALIAS) areEqual = false;
 223:              else if (this.PCBVER != b.PCBVER) areEqual = false;
 224:              else if (this.MAINTAINID != b.MAINTAINID) areEqual = false;
 225:              else if (this.MAINTAINADDR != b.MAINTAINADDR) areEqual = false;
 226:              else if (this.MAINTAINTEL != b.MAINTAINTEL) areEqual = false;
 227:              else if (this.REGISTERSTAT != b.REGISTERSTAT) areEqual = false;
 228:              else areEqual = true;
 229:   
 230:              return areEqual;
 231:          }
 232:   
 233:          ////////////////////////////////////////////////////////////////////////////
 234:   
 235:          /// <summary>
 236:          ///
 237:          /// </summary>
 238:          public bool Update(Ia.Ngn.Cl.Model.Huawei.EmsDev updatedItem)
 239:          {
 240:              // below: this will not update Id, Created
 241:              bool updated;
 242:   
 243:              updated = false;
 244:   
 245:              if (this.DID != updatedItem.DID) { this.DID = updatedItem.DID; updated = true; }
 246:              if (this.DEV != updatedItem.DEV) { this.DEV = updatedItem.DEV; updated = true; }
 247:              if (this.DEVIP != updatedItem.DEVIP) { this.DEVIP = updatedItem.DEVIP; updated = true; }
 248:              if (this.DT != updatedItem.DT) { this.DT = updatedItem.DT; updated = true; }
 249:              if (this.DVER != updatedItem.DVER) { this.DVER = updatedItem.DVER; updated = true; }
 250:              if (this.DSTAT != updatedItem.DSTAT) { this.DSTAT = updatedItem.DSTAT; updated = true; }
 251:              if (this.DLOC != updatedItem.DLOC) { this.DLOC = updatedItem.DLOC; updated = true; }
 252:              if (this.AdminStat != updatedItem.AdminStat) { this.AdminStat = updatedItem.AdminStat; updated = true; }
 253:              if (this.WorkMode != updatedItem.WorkMode) { this.WorkMode = updatedItem.WorkMode; updated = true; }
 254:              if (this.ADDITIONALINFO != updatedItem.ADDITIONALINFO) { this.ADDITIONALINFO = updatedItem.ADDITIONALINFO; updated = true; }
 255:              if (this.CRTID != updatedItem.CRTID) { this.CRTID = updatedItem.CRTID; updated = true; }
 256:              if (this.CRTADDR != updatedItem.CRTADDR) { this.CRTADDR = updatedItem.CRTADDR; updated = true; }
 257:              if (this.CRTTEL != updatedItem.CRTTEL) { this.CRTTEL = updatedItem.CRTTEL; updated = true; }
 258:              if (this.CRTDATE != updatedItem.CRTDATE) { this.CRTDATE = updatedItem.CRTDATE; updated = true; }
 259:              if (this.REMARK != updatedItem.REMARK) { this.REMARK = updatedItem.REMARK; updated = true; }
 260:              if (this.TYPE != updatedItem.TYPE) { this.TYPE = updatedItem.TYPE; updated = true; }
 261:              if (this.NERATELIST != updatedItem.NERATELIST) { this.NERATELIST = updatedItem.NERATELIST; updated = true; }
 262:              if (this.NEPROV != updatedItem.NEPROV) { this.NEPROV = updatedItem.NEPROV; updated = true; }
 263:              if (this.TOPXY != updatedItem.TOPXY) { this.TOPXY = updatedItem.TOPXY; updated = true; }
 264:              if (this.EMSID != updatedItem.EMSID) { this.EMSID = updatedItem.EMSID; updated = true; }
 265:              if (this.ALIAS != updatedItem.ALIAS) { this.ALIAS = updatedItem.ALIAS; updated = true; }
 266:              if (this.PCBVER != updatedItem.PCBVER) { this.PCBVER = updatedItem.PCBVER; updated = true; }
 267:              if (this.MAINTAINID != updatedItem.MAINTAINID) { this.MAINTAINID = updatedItem.MAINTAINID; updated = true; }
 268:              if (this.MAINTAINADDR != updatedItem.MAINTAINADDR) { this.MAINTAINADDR = updatedItem.MAINTAINADDR; updated = true; }
 269:              if (this.MAINTAINTEL != updatedItem.MAINTAINTEL) { this.MAINTAINTEL = updatedItem.MAINTAINTEL; updated = true; }
 270:              if (this.REGISTERSTAT != updatedItem.REGISTERSTAT) { this.REGISTERSTAT = updatedItem.REGISTERSTAT; updated = true; }
 271:   
 272:              if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
 273:   
 274:              return updated;
 275:          }
 276:   
 277:          ////////////////////////////////////////////////////////////////////////////
 278:          ////////////////////////////////////////////////////////////////////////////
 279:      }
 280:   
 281:      ////////////////////////////////////////////////////////////////////////////
 282:      ////////////////////////////////////////////////////////////////////////////
 283:  }