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

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

AGCF Endpoint 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.Models.Nokia
   10: {
   11:     ////////////////////////////////////////////////////////////////////////////
   12:  
   13:     /// <summary publish="true">
   14:     /// AGCF Endpoint Entity Framework class for Fixed Telecommunications Network (FTN) entity model.
   15:     /// </summary>
   16:     /// 
   17:     /// <remarks> 
   18:     /// Copyright � 2014-2021 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   19:     /// </remarks> 
   20:     public class AgcfEndpoint
   21:     {
   22:         /// <summary>
   23:         /// 1360 COM WebAPI User Guide 255-400-419R3.X
   24:         /// ngfs-agcfendpoint-v2(rtrv,ent,ed,dlt)
   25:         /// </summary>
   26:         public AgcfEndpoint() { }
   27:  
   28:         /// <summary/>
   29:         [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
   30:         public string Id { get; set; }
   31:  
   32:         /// <summary>
   33:         /// PrividUser (req for ent,req for ed). LCP Aid of AGCF Endpoint, same value of PrimaryPUID. String (0-32) [+0-9a-zA-Z:,\-_\.'()]*
   34:         /// </summary>
   35:         public string PrividUser { get; set; }
   36:  
   37:         /// <summary>
   38:         /// Slot (opt for ent,na for ed). LCP Integer (1-99)
   39:         /// </summary>
   40:         public int Slot { get; set; }
   41:  
   42:         /// <summary>
   43:         /// Port (opt for ent,na for ed). LCP Integer (1-99), LCP Integer (2048-4047), LCP-CTS R8.0 Integer (2048-18047), LCP-CTS R8.1.1 Integer (2048-502047)
   44:         /// </summary>
   45:         public int Port { get; set; }
   46:  
   47:         /// <summary>
   48:         /// GwId (req for ent,na for ed). LCP-CTS R9.1 Integer (2048-5002047)
   49:         /// </summary>
   50:         public int GwId { get; set; }
   51:  
   52:         /// <summary>
   53:         /// Dn (req for ent,na for ed). LCP String (0-32) [+0-9a-zA-Z:,\-_\.'()]*
   54:         /// </summary>
   55:         public string Dn { get; set; }
   56:  
   57:         /// <summary>
   58:         /// AdditionalDNs (opt for ent,opt for ed). LCP-CTS R8.1 String, up 9 space separated additional DNs. Each can be up to 32 characters long [0-9a-zA-Z&amp;=\+$,\?/\-_\.!~\*'()]*
   59:         /// </summary>
   60:         public string AdditionalDNs { get; set; }
   61:  
   62:         /// <summary>
   63:         /// DomainIndex (opt for ent,na for ed). LCP Integer (0-150)
   64:         /// </summary>
   65:         public int DomainIndex { get; set; }
   66:  
   67:         /// <summary>
   68:         /// FeatureFlag (opt for ent,opt for ed). LCP Valid value: 0, 1, 2, 0 means None, 1 means WarmLine, 2 means HotLine
   69:         /// </summary>
   70:         public int FeatureFlag { get; set; }
   71:  
   72:         /// <summary>
   73:         /// DslamId (opt for ent,na for ed). LCP String (0-32) [a-zA-Z0-9\*#\.,\-+'~`!@$%^:;=(){}\[\]?&quot;&apos;&amp;&gt;&lt;/_|\\ ]*
   74:         /// </summary>
   75:         public string DslamId { get; set; }
   76:  
   77:         /// <summary>
   78:         /// Rack (opt for ent,na for ed). LCP Integer (1-9)
   79:         /// </summary>
   80:         public int Rack { get; set; }
   81:  
   82:         /// <summary>
   83:         /// Shelf (opt for ent,na for ed). LCP Integer (1-99)
   84:         /// </summary>
   85:         public int Shelf { get; set; }
   86:  
   87:         /// <summary>
   88:         /// FlatTermID (opt for ent,na for ed). LCP-CTS R6.1 Integer (1-32767)
   89:         /// If the GwId corresponding PhysicalTermIDScheme is set to FlatTermID, this FlatTermID field can have D. LCP Command. 317
   90:         /// the value between 1-32767 and the other field shall be set as the following default value:
   91:         /// Slot: 0
   92:         /// Port: 0
   93:         /// DslamId : null
   94:         /// Rack: -1
   95:         /// Shelf: 0
   96:         /// LCP-ISC R21.1.1 Integer (0-32767)
   97:         /// When Shelf/Slot/Port is provisioned, this field will be
   98:         /// set to -1 and value will not be send to NE
   99:         /// </summary>
  100:         public int FlatTermID { get; set; }
  101:  
  102:         /// <summary>
  103:         /// SubscriberType (opt for ent,na for ed). LCP-CTS R6.2 Range: Analog or ISDNBRA. Default: Analog
  104:         /// </summary>
  105:         public bool SubscriberType { get; set; }
  106:  
  107:         /// <summary>
  108:         /// ReversePolarity (opt for ent,opt for ed). LCP-CTS R7.1
  109:         /// Enum: NO_POLARITY_REVERSAL, UPON_DIGIT_COLLECTION_ALWAYS, UPON_REMOTE_ANSWER_ALWAYS, UPON_REMOTE_ANSWER_EXCEPT_FREE_CALLS
  110:         /// Default: NO_POLARITY_REVERSAL
  111:         /// </summary>
  112:         public int ReversePolarity { get; set; }
  113:  
  114:         /// <summary>
  115:         /// PayphoneMetering (opt for ent,opt for ed). LCP-CTS R7.1 
  116:         /// enum: PAYPHONE_REVERSE_POLARITY, PAYPHONE_PULSE_METERING_16_KHZ
  117:         /// default: PAYPHONE_PULSE_METERING_16_KHZ
  118:         /// </summary>
  119:         public int PayphoneMetering { get; set; }
  120:  
  121:         /// <summary>
  122:         /// DigitMap1st (opt for ent,opt for ed). LCP-CTS R7.1 Integer: 0-64
  123:         /// </summary>
  124:         public int DigitMap1st { get; set; }
  125:  
  126:         /// <summary>
  127:         /// DigitMap2nd (opt for ent,opt for ed). LCP-CTS R7.1 Integer: 0-64
  128:         /// </summary>
  129:         public int DigitMap2nd { get; set; }
  130:  
  131:         /// <summary>
  132:         /// DialTone2nd (opt for ent,opt for ed). LCP-CTS R7.1 Integer: 0-128
  133:         /// </summary>
  134:         public int DialTone2nd { get; set; }
  135:  
  136:         /// <summary>
  137:         /// CallHoldLc (opt for ent,opt for ed). LCP-CTS R8.0 boolean, default true
  138:         /// </summary>
  139:         public bool CallHoldLc { get; set; }
  140:  
  141:         /// <summary>
  142:         /// CallWaitingLc (opt for ent,opt for ed). LCP-CTS R8.0 boolean, default true
  143:         /// </summary>
  144:         public bool CallWaitingLc { get; set; }
  145:  
  146:         /// <summary>
  147:         /// CallToggleLc (opt for ent,opt for ed). LCP-CTS R8.0 boolean, default true
  148:         /// </summary>
  149:         public bool CallToggleLc { get; set; }
  150:  
  151:         /// <summary>
  152:         /// ThreeWayCallLc (opt for ent,opt for ed). LCP-CTS R8.0 boolean, default true
  153:         /// </summary>
  154:         public bool ThreeWayCallLc { get; set; }
  155:  
  156:         /// <summary>
  157:         /// McidLc (opt for ent,opt for ed). LCP-CTS R8.0 boolean, default false
  158:         /// </summary>
  159:         public bool McidLc { get; set; }
  160:  
  161:         /// <summary>
  162:         /// Password (opt for ent,opt for ed,na for rtrv). LCP-CTS R8.1 String, max length 32. [+0-9a-zA-Z(),':@&=|-_\.!~*%]*
  163:         /// </summary>
  164:         public string Password { get; set; }
  165:  
  166:         /// <summary>
  167:         /// CallTransferLc (opt for ent,opt for ed). LCP-ISC R22.1 boolean, default false
  168:         /// </summary>
  169:         public bool CallTransferLc { get; set; }
  170:  
  171:         /// <summary/>
  172:         [ForeignKey("AgcfGatewayRecord_Id")]
  173:         public virtual AgcfGatewayRecord AgcfGatewayRecord { get; set; }
  174:  
  175:         /// <summary/>
  176:         public virtual ICollection<SubParty> SubParties { get; set; }
  177:  
  178:         /// <summary/>
  179:         public DateTime Created { get; set; }
  180:  
  181:         /// <summary/>
  182:         public DateTime Updated { get; set; }
  183:  
  184:         ////////////////////////////////////////////////////////////////////////////
  185:  
  186:         /// <summary>
  187:         ///
  188:         /// </summary>
  189:         public static string AgcfEndpointId(string prividUser)
  190:         {
  191:             return prividUser;
  192:         }
  193:  
  194:         ////////////////////////////////////////////////////////////////////////////
  195:  
  196:         /// <summary>
  197:         ///
  198:         /// </summary>
  199:         public bool Equal(AgcfEndpoint b)
  200:         {
  201:             // below: this will not check the Id, Created, Updated fields
  202:             bool areEqual;
  203:  
  204:             //if (this.BatteryBackupAvailable != b.BatteryBackupAvailable) areEqual = false;
  205:             //else areEqual = true;
  206:  
  207:             areEqual = false;
  208:  
  209:             return areEqual;
  210:         }
  211:  
  212:         ////////////////////////////////////////////////////////////////////////////
  213:  
  214:         /// <summary>
  215:         ///
  216:         /// </summary>
  217:         public bool Update(AgcfEndpoint updatedAgcfEndpoint)
  218:         {
  219:             // below: this will not update Id, Created
  220:             bool updated;
  221:  
  222:             updated = false;
  223:  
  224:             if (this.PrividUser != updatedAgcfEndpoint.PrividUser) { this.PrividUser = updatedAgcfEndpoint.PrividUser; updated = true; }
  225:             if (this.Slot != updatedAgcfEndpoint.Slot) { this.Slot = updatedAgcfEndpoint.Slot; updated = true; }
  226:             if (this.Port != updatedAgcfEndpoint.Port) { this.Port = updatedAgcfEndpoint.Port; updated = true; }
  227:             if (this.GwId != updatedAgcfEndpoint.GwId) { this.GwId = updatedAgcfEndpoint.GwId; updated = true; }
  228:             if (this.Dn != updatedAgcfEndpoint.Dn) { this.Dn = updatedAgcfEndpoint.Dn; updated = true; }
  229:             if (this.AdditionalDNs != updatedAgcfEndpoint.AdditionalDNs) { this.AdditionalDNs = updatedAgcfEndpoint.AdditionalDNs; updated = true; }
  230:             if (this.DomainIndex != updatedAgcfEndpoint.DomainIndex) { this.DomainIndex = updatedAgcfEndpoint.DomainIndex; updated = true; }
  231:             if (this.FeatureFlag != updatedAgcfEndpoint.FeatureFlag) { this.FeatureFlag = updatedAgcfEndpoint.FeatureFlag; updated = true; }
  232:             if (this.DslamId != updatedAgcfEndpoint.DslamId) { this.DslamId = updatedAgcfEndpoint.DslamId; updated = true; }
  233:             if (this.Rack != updatedAgcfEndpoint.Rack) { this.Rack = updatedAgcfEndpoint.Rack; updated = true; }
  234:             if (this.Shelf != updatedAgcfEndpoint.Shelf) { this.Shelf = updatedAgcfEndpoint.Shelf; updated = true; }
  235:             if (this.FlatTermID != updatedAgcfEndpoint.FlatTermID) { this.FlatTermID = updatedAgcfEndpoint.FlatTermID; updated = true; }
  236:             if (this.SubscriberType != updatedAgcfEndpoint.SubscriberType) { this.SubscriberType = updatedAgcfEndpoint.SubscriberType; updated = true; }
  237:             if (this.ReversePolarity != updatedAgcfEndpoint.ReversePolarity) { this.ReversePolarity = updatedAgcfEndpoint.ReversePolarity; updated = true; }
  238:             if (this.PayphoneMetering != updatedAgcfEndpoint.PayphoneMetering) { this.PayphoneMetering = updatedAgcfEndpoint.PayphoneMetering; updated = true; }
  239:             if (this.DigitMap1st != updatedAgcfEndpoint.DigitMap1st) { this.DigitMap1st = updatedAgcfEndpoint.DigitMap1st; updated = true; }
  240:             if (this.DigitMap2nd != updatedAgcfEndpoint.DigitMap2nd) { this.DigitMap2nd = updatedAgcfEndpoint.DigitMap2nd; updated = true; }
  241:             if (this.DialTone2nd != updatedAgcfEndpoint.DialTone2nd) { this.DialTone2nd = updatedAgcfEndpoint.DialTone2nd; updated = true; }
  242:             if (this.CallHoldLc != updatedAgcfEndpoint.CallHoldLc) { this.CallHoldLc = updatedAgcfEndpoint.CallHoldLc; updated = true; }
  243:             if (this.CallWaitingLc != updatedAgcfEndpoint.CallWaitingLc) { this.CallWaitingLc = updatedAgcfEndpoint.CallWaitingLc; updated = true; }
  244:             if (this.CallToggleLc != updatedAgcfEndpoint.CallToggleLc) { this.CallToggleLc = updatedAgcfEndpoint.CallToggleLc; updated = true; }
  245:             if (this.ThreeWayCallLc != updatedAgcfEndpoint.ThreeWayCallLc) { this.ThreeWayCallLc = updatedAgcfEndpoint.ThreeWayCallLc; updated = true; }
  246:             if (this.McidLc != updatedAgcfEndpoint.McidLc) { this.McidLc = updatedAgcfEndpoint.McidLc; updated = true; }
  247:             if (this.Password != updatedAgcfEndpoint.Password) { this.Password = updatedAgcfEndpoint.Password; updated = true; }
  248:             if (this.CallTransferLc != updatedAgcfEndpoint.CallTransferLc) { this.CallTransferLc = updatedAgcfEndpoint.CallTransferLc; updated = true; }
  249:  
  250:             if (this.AgcfGatewayRecord != updatedAgcfEndpoint.AgcfGatewayRecord) { this.AgcfGatewayRecord = updatedAgcfEndpoint.AgcfGatewayRecord; updated = true; }
  251:  
  252:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
  253:  
  254:             return updated;
  255:         }
  256:  
  257:         ////////////////////////////////////////////////////////////////////////////
  258:         ////////////////////////////////////////////////////////////////////////////
  259:     }
  260:  
  261:     ////////////////////////////////////////////////////////////////////////////
  262:     ////////////////////////////////////////////////////////////////////////////
  263: }