Esempio n. 1
0
 protected override void Parse(ByteBuffer buffer)
 {
     if (buffer == null)
     {
         throw new ArgumentNullException("buffer");
     }
     vSourceAddress = SmppAddress.Parse(buffer);
     vEsmeAddress   = SmppAddress.Parse(buffer);
     //If there are some bytes left,
     //construct a tlv collection
     if (buffer.Length > 0)
     {
         vTlv = TlvCollection.Parse(buffer);
     }
 }
Esempio n. 2
0
 protected override void Parse(ByteBuffer buffer)
 {
     if (buffer == null)
     {
         throw new ArgumentNullException("buffer");
     }
     vMessageID     = DecodeCString(buffer);
     vSourceAddress = SmppAddress.Parse(buffer);
     //This pdu has no option parameters
     //If there is still something in the buffer,
     //we then have more than required bytes
     if (buffer.Length > 0)
     {
         throw new TooManyBytesException();
     }
 }
Esempio n. 3
0
 protected override void Parse(ByteBuffer buffer)
 {
     if (buffer == null)
     {
         throw new ArgumentNullException("buffer");
     }
     vServiceType        = DecodeCString(buffer, vSmppEncodingService);
     vSourceAddress      = SmppAddress.Parse(buffer, vSmppEncodingService);
     vDestinationAddress = SmppAddress.Parse(buffer, vSmppEncodingService);
     vEsmClass           = (EsmClass)GetByte(buffer);
     vRegisteredDelivery = (RegisteredDelivery)GetByte(buffer);
     vDataCoding         = (DataCoding)GetByte(buffer);
     if (buffer.Length > 0)
     {
         vTlv = TlvCollection.Parse(buffer, vSmppEncodingService);
     }
 }
Esempio n. 4
0
 protected override void Parse(ByteBuffer buffer)
 {
     if (buffer == null)
     {
         throw new ArgumentNullException("buffer");
     }
     vMessageID            = DecodeCString(buffer);
     vSourceAddress        = SmppAddress.Parse(buffer);
     vScheduleDeliveryTime = DecodeCString(buffer);
     vValidityPeriod       = DecodeCString(buffer);
     vRegisteredDelivery   = (RegisteredDelivery)GetByte(buffer);
     vSmDefaultMessageID   = GetByte(buffer);
     vSmLength             = GetByte(buffer);
     vShortMessage         = DecodeString(buffer, (int)vSmLength);
     //This pdu has no option parameters,
     //If there is something left in the buffer,
     //then we have more than required bytes
     if (buffer.Length > 0)
     {
         throw new TooManyBytesException();
     }
 }
Esempio n. 5
0
        protected override void Parse(ByteBuffer buffer)
        {
            if (buffer == null)
            {
                throw new ArgumentNullException("buffer");
            }
            VServiceType           = DecodeCString(buffer);
            VSourceAddress         = SmppAddress.Parse(buffer);
            VDestinationAddress    = SmppAddress.Parse(buffer);
            VEsmClass              = (EsmClass)GetByte(buffer);
            _vProtocolId           = GetByte(buffer);
            _vPriorityFlag         = (PriorityFlag)GetByte(buffer);
            _vScheduleDeliveryTime = DecodeCString(buffer);
            _vValidityPeriod       = DecodeCString(buffer);
            VRegisteredDelivery    = (RegisteredDelivery)GetByte(buffer);
            _vReplaceIfPresent     = GetByte(buffer) == 0 ? false : true;
            VDataCoding            = (DataCoding)GetByte(buffer);
            _vSmDefalutMessageId   = GetByte(buffer);
            int length = GetByte(buffer);

            if (length == 0)
            {
                _vMessageBytes = null;
            }
            else
            {
                if (length > buffer.Length)
                {
                    throw new NotEnoughBytesException("Pdu encoutered less bytes than indicated by message length");
                }
                _vMessageBytes = buffer.Remove(length);
            }
            if (buffer.Length > 0)
            {
                VTlv = TlvCollection.Parse(buffer);
            }
        }
Esempio n. 6
0
 public CancelSm()
     : base(new PDUHeader(CommandType.CancelSm))
 {
     vDestinationAddress = new SmppAddress();
 }
Esempio n. 7
0
 internal SmPDU(PDUHeader header)
     : base(header)
 {
     vSourceAddress = new SmppAddress();
 }
Esempio n. 8
0
 internal SmPDU(PDUHeader header, SmppEncodingService smppEncodingService)
     : base(header, smppEncodingService)
 {
     vSourceAddress = new SmppAddress();
 }
Esempio n. 9
0
 internal SingleDestinationPDU(PDUHeader header)
     : base(header)
 {
     vDestinationAddress = new SmppAddress();
 }
Esempio n. 10
0
 internal SingleDestinationPDU(PDUHeader header)
     : base(header)
 {
     vDestinationAddress = new SmppAddress();
 }
Esempio n. 11
0
 internal AlertNotification(PDUHeader header, SmppEncodingService smppEncodingService)
     : base(header, smppEncodingService)
 {
     vEsmeAddress = new SmppAddress();
 }
Esempio n. 12
0
 internal SingleDestinationPDU(PDUHeader header, SmppEncodingService smppEncodingService)
     : base(header, smppEncodingService)
 {
     vDestinationAddress = new SmppAddress();
 }
Esempio n. 13
0
 public CancelSm(SmppEncodingService smppEncodingService)
     : base(new PDUHeader(CommandType.CancelSm), smppEncodingService)
 {
     vDestinationAddress = new SmppAddress();
 }
Esempio n. 14
0
 internal AlertNotification(PDUHeader header)
     : base(header)
 {
     vEsmeAddress = new SmppAddress();
 }
Esempio n. 15
0
 public AlertNotification()
     : base(new PDUHeader(CommandType.AlertNotification))
 {
     vEsmeAddress = new SmppAddress();
 }
Esempio n. 16
0
 protected override void Parse(ByteBuffer buffer)
 {
     if (buffer == null) { throw new ArgumentNullException("buffer"); }
     vMessageID = DecodeCString(buffer);
     vSourceAddress = SmppAddress.Parse(buffer);
     vDestinationAddress = SmppAddress.Parse(buffer);
     //If this pdu has no option parameters
     //If there is still something in the buffer, we then have more than required bytes
     if (buffer.Length > 0) { throw new TooManyBytesException(); }
 }
Esempio n. 17
0
 internal CancelSm(PDUHeader header)
     : base(header)
 {
     vDestinationAddress = new SmppAddress();
 }
Esempio n. 18
0
 public CancelSm()
     : base(new PDUHeader(CommandType.CancelSm))
 {
     vDestinationAddress = new SmppAddress();
 }
Esempio n. 19
0
 internal CancelSm(PDUHeader header, SmppEncodingService smppEncodingService)
     : base(header, smppEncodingService)
 {
     vDestinationAddress = new SmppAddress();
 }
Esempio n. 20
0
 internal AlertNotification(PDUHeader header)
     : base(header)
 {
     vEsmeAddress = new SmppAddress();
 }
Esempio n. 21
0
 internal CancelSm(PDUHeader header)
     : base(header)
 {
     vDestinationAddress = new SmppAddress();
 }
Esempio n. 22
0
 public AlertNotification()
     : base(new PDUHeader(CommandType.AlertNotification))
 {
     vEsmeAddress = new SmppAddress();
 }
Esempio n. 23
0
 internal SmPDU(PDUHeader header)
     : base(header)
 {
     vSourceAddress = new SmppAddress();
 }
Esempio n. 24
0
 protected override void Parse(ByteBuffer buffer)
 {
     if (buffer == null) { throw new ArgumentNullException("buffer"); }
     vSourceAddress = SmppAddress.Parse(buffer);
     vEsmeAddress = SmppAddress.Parse(buffer);
     //If there are some bytes left,
     //construct a tlv collection
     if (buffer.Length > 0) { vTlv = TlvCollection.Parse(buffer); }
 }
Esempio n. 25
0
 public AlertNotification(SmppEncodingService smppEncodingService)
     : base(new PDUHeader(CommandType.AlertNotification), smppEncodingService)
 {
     vEsmeAddress = new SmppAddress();
 }