Пример #1
0
 internal BindRequest(PDUHeader header)
     : base(header)
 {
     vSystemID = "";
     vPassword = "";
     vSystemType = "";
     vAddressTon = TypeOfNumber.International; //International
     vAddressNpi = NumberingPlanIndicator.ISDN; //ISDN
     vInterfaceVersion = 34; //SMPP 3.4 version
     vAddressRange = "";
 }
Пример #2
0
 public SessionBindInfo()
 {
     vHost = "";
     vSystemID = "";
     vPassword = "";
     vSystemType = "";
     vInterfaceVersion = InterfaceVersion.v34;
     vAllowReceive = true;
     vAllowTransmit = true;
     vAddressTon = TypeOfNumber.International;
     vAddressNpi = NumberingPlanIndicator.ISDN;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of <see cref="SmppConnectionProperties"/>
 /// </summary>
 public SmppConnectionProperties()
 {
     vSystemID = "";
     vPassword = "";
     vHost = "";
     vAddressTon = TypeOfNumber.International;
     vAddressNpi = NumberingPlanIndicator.ISDN;
     vInterfaceVersion = InterfaceVersion.v34;
     vSystemType = "";
     vDefaultServiceType = "";
     SmscID = "";
     vSyncRoot = new object();
 }
Пример #4
0
 public SmppAddress(TypeOfNumber ton, NumberingPlanIndicator npi, string address)
 {
     vTon = ton;
     vNpi = npi;
     vAddress = address;
 }
Пример #5
0
 public SmppAddress()
 {
     vTon = TypeOfNumber.International;
     vNpi = NumberingPlanIndicator.ISDN;
     vAddress = "";
 }
Пример #6
0
 protected override void Parse(ByteBuffer buffer)
 {
     if (buffer == null) { throw new ArgumentNullException("buffer"); }
     const int minBytes = 7;
     if (buffer.Length < minBytes) { throw new NotEnoughBytesException("BindRequest requires at least 7 bytes for body parameters"); }
     try
     {
         vSystemID = DecodeCString(buffer);
         vPassword = DecodeCString(buffer);
         vSystemType = DecodeCString(buffer);
         vInterfaceVersion = GetByte(buffer);
         vAddressTon = (TypeOfNumber)GetByte(buffer);
         vAddressNpi = (NumberingPlanIndicator)GetByte(buffer);
         vAddressRange = DecodeCString(buffer);
     }
     catch (InvalidOperationException ex)
     {
         //ByteBuffer.Remove() throws InvalidOperationException exception if called on a empty ByteBuffer instance
         //Wrap this exception as a NotEnoughBytesException exception
         throw new NotEnoughBytesException(ex.Message,ex);
     }
     if (buffer.Length > 0) //If there are some bytes left
     { throw new TooManyBytesException(); }
 }