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

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

SERUATTR Signaling Service Processing System (SPS) support class for Huawei's Fixed Telecommunications Network (FTN) entity model.

    1: using System;
    2: using System.ComponentModel.DataAnnotations;
    3: using System.ComponentModel.DataAnnotations.Schema;
    4: using System.Linq;
    5: using System.Threading;
    6: using System.Threading.Tasks;
    7:  
    8: namespace Ia.Ftn.Cl.Models.Huawei
    9: {
   10:     ////////////////////////////////////////////////////////////////////////////
   11:  
   12:     /// <summary publish="true">
   13:     /// SERUATTR Signaling Service Processing System (SPS) support class for Huawei's Fixed Telecommunications Network (FTN) entity model.
   14:     /// </summary>
   15:     /// 
   16:     /// <remarks> 
   17:     /// Copyright © 2018-2021 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   18:     ///
   19:     /// 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
   20:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   21:     ///
   22:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   23:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   24:     /// 
   25:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   26:     /// 
   27:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   28:     /// </remarks> 
   29:     public class Seruattr
   30:     {
   31:         /*
   32:          * HUAWEI SPS Signaling Service Processing System
   33:          * V300R008C10
   34:          * SPS V300R008C10 PGW MML Command Protocol (NP)
   35:          */
   36:  
   37:         /// <summary/>
   38:         public Seruattr() { }
   39:  
   40:         /// <summary/>
   41:         [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
   42:         public string Id { get; set; }
   43:  
   44:         /// <summary>
   45:         /// int SERVATTR Whether enable related services (e.g. OMNP-1) Enumerated This parameter specifies which service is enabled. It is a mandatory parameter. Value: OMNP(Enable MNP service). No default value
   46:         /// </summary>
   47:         public int SERVATTR { get; set; }
   48:  
   49:         /// <summary>
   50:         /// int NUMTYPE Number type Enumerated This parameter specifies the type of a subscriber. It is a mandatory parameter. 
   51:         /// </summary>
   52:         public int NUMTYPE { get; set; }
   53:  
   54:         /// <summary>
   55:         /// string USRNUM MSISDN String (16) The parameter specifies the MSISDN of a service subscriber. It is the key parameter that identifies a service subscriber. It is mandatory. 
   56:         /// </summary>
   57:         public string USRNUM { get; set; }
   58:  
   59:         /// <summary>
   60:         /// string IMSINUM User IMSI number String (16) This parameter specifies the IMSI of a subscriber. 
   61:         /// </summary>
   62:         public string IMSINUM { get; set; }
   63:  
   64:         /// <summary>
   65:         /// string DESC Description 
   66:         /// </summary>
   67:         public string DESC { get; set; }
   68:  
   69:         /// <summary>
   70:         /// int RNIDXTYPE Route index type Enumerated This parameter specifies the route index type of a subscriber. It is a mandatory parameter. 
   71:         /// </summary>
   72:         public int RNIDXTYPE { get; set; }
   73:  
   74:         /// <summary>
   75:         /// int HLRIDX HLR address index e.g. HLRIDX=1 HLRIDX HLR address index Numeric This parameter specifies the homing HLR index of a subscriber. It is valid only when Route index type is set to HLR(HLR number index) or ALL(HLR+RN). This parameter must be defined by running ADD SEMNPHLRADDR before being used. Value range: 0 to 65535. Default value: 65535
   76:         /// </summary>
   77:         public int HLRIDX { get; set; }
   78:  
   79:         /// <summary>
   80:         /// int RNIDX NP route index (e.g. RNIDX=0) NP route index Numeric This parameter specifies the route number index of the network where a subscriber belongs. It is valid only when Route index type is set to RN(Route number index). This parameter must be defined by running ADD SEMNPROUTENUM before being used. Value range: 0 to 65535. Default value: 65535
   81:         /// </summary>
   82:         public int RNIDX { get; set; }
   83:  
   84:         /// <summary>
   85:         /// int RNIDX2 Routing number index Numeric This parameter specifies the route number index of the network where a subscriber belongs. It is valid only when Route index type is set to ALL(HLR+RN). This parameter must be defined by running ADD SEMNPROUTENUM before being used. Value range: 0 to 65535. Default value: 65535
   86:         /// </summary>
   87:         public int RNIDX2 { get; set; }
   88:  
   89:         /// <summary>
   90:         /// string RN Routing number String (16) This parameter specifies the route number of the network where a subscriber belongs. It is valid only when Route index type is set to ALL(HLR+RN). This parameter must be defined by running ADD SEMNPROUTENUM before being used.. Value: a number of a maximum of 16 hexadecimal digits. No default value
   91:         /// </summary>
   92:         public string RN { get; set; }
   93:  
   94:         /// <summary/>
   95:         public DateTime Created { get; set; }
   96:  
   97:         /// <summary/>
   98:         public DateTime Updated { get; set; }
   99:  
  100:         ////////////////////////////////////////////////////////////////////////////
  101:  
  102:         /// <summary>
  103:         ///
  104:         /// </summary>
  105:         public bool Equal(Ia.Ftn.Cl.Models.Huawei.Seruattr b)
  106:         {
  107:             // below: this will not check the Id, Created, Updated fields
  108:             bool areEqual;
  109:  
  110:             if (this.SERVATTR != b.SERVATTR) areEqual = false;
  111:             else if (this.NUMTYPE != b.NUMTYPE) areEqual = false;
  112:             else if (this.USRNUM != b.USRNUM) areEqual = false;
  113:             else if (this.IMSINUM != b.IMSINUM) areEqual = false;
  114:             else if (this.DESC != b.DESC) areEqual = false;
  115:             else if (this.RNIDXTYPE != b.RNIDXTYPE) areEqual = false;
  116:             else if (this.HLRIDX != b.HLRIDX) areEqual = false;
  117:             else if (this.RNIDX != b.RNIDX) areEqual = false;
  118:             else if (this.RNIDX2 != b.RNIDX2) areEqual = false;
  119:             else if (this.RN != b.RN) areEqual = false;
  120:             else areEqual = true;
  121:  
  122:             return areEqual;
  123:         }
  124:  
  125:         ////////////////////////////////////////////////////////////////////////////
  126:  
  127:         /// <summary>
  128:         ///
  129:         /// </summary>
  130:         public bool Update(Ia.Ftn.Cl.Models.Huawei.Seruattr updatedItem)
  131:         {
  132:             // below: this will not update Id, Created
  133:             bool updated;
  134:  
  135:             updated = false;
  136:  
  137:             if (this.SERVATTR != updatedItem.SERVATTR) { this.SERVATTR = updatedItem.SERVATTR; updated = true; }
  138:             if (this.NUMTYPE != updatedItem.NUMTYPE) { this.NUMTYPE = updatedItem.NUMTYPE; updated = true; }
  139:             if (this.USRNUM != updatedItem.USRNUM) { this.USRNUM = updatedItem.USRNUM; updated = true; }
  140:             if (this.IMSINUM != updatedItem.IMSINUM) { this.IMSINUM = updatedItem.IMSINUM; updated = true; }
  141:             if (this.DESC != updatedItem.DESC) { this.DESC = updatedItem.DESC; updated = true; }
  142:             if (this.RNIDXTYPE != updatedItem.RNIDXTYPE) { this.RNIDXTYPE = updatedItem.RNIDXTYPE; updated = true; }
  143:             if (this.HLRIDX != updatedItem.HLRIDX) { this.HLRIDX = updatedItem.HLRIDX; updated = true; }
  144:             if (this.RNIDX != updatedItem.RNIDX) { this.RNIDX = updatedItem.RNIDX; updated = true; }
  145:             if (this.RNIDX2 != updatedItem.RNIDX2) { this.RNIDX2 = updatedItem.RNIDX2; updated = true; }
  146:             if (this.RN != updatedItem.RN) { this.RN = updatedItem.RN; updated = true; }
  147:  
  148:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
  149:  
  150:             return updated;
  151:         }
  152:  
  153:         ////////////////////////////////////////////////////////////////////////////
  154:         ////////////////////////////////////////////////////////////////////////////
  155:  
  156:         /// <summary>
  157:         ///
  158:         /// </summary>
  159:         public string ToSimpleTextString()
  160:         {
  161:             return Ia.Ftn.Cl.Models.Data.Huawei.Seruattr.ToSimpleTextString(this);
  162:         }
  163:  
  164:         ////////////////////////////////////////////////////////////////////////////
  165:         ////////////////////////////////////////////////////////////////////////////
  166:     }
  167:  
  168:     ////////////////////////////////////////////////////////////////////////////
  169:     ////////////////////////////////////////////////////////////////////////////
  170: }