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