Esempio n. 1
0
        /// <summary>
        /// This method retrieves the C-Octet string from the byte stream
        /// </summary>
        /// <param name="reader">Byte stream</param>
        public void GetFromStream(SmppReader reader)
        {
            int len = (int)reader.ReadByte();

            if (len > 0)
            {
                data_ = reader.ReadString(len);
            }
            ValidateData();
        }
Esempio n. 2
0
        /// <summary>
        /// This method implements the ISupportSmppByteStream.GetFromStream
        /// method so that the PDU can serialize itself from the data stream.
        /// </summary>
        /// <param name="reader">StreamReader</param>
        public override void GetFromStream(SmppReader reader)
        {
            distList_ = new List <string>();
            int count = (int)reader.ReadByte();

            for (int i = 0; i < count; i++)
            {
                distList_.Add(reader.ReadString());
            }
        }
Esempio n. 3
0
        /// <summary>
        /// This method implements the ISupportSmppByteStream.GetFromStream
        /// method so that the PDU can serialize itself from the data stream.
        /// </summary>
        /// <param name="reader">StreamReader</param>
        public override void GetFromStream(SmppReader reader)
        {
            distList_.Clear();
            int count = reader.ReadByte();

            for (int i = 0; i < count; i++)
            {
                dl_member_details dtls = new dl_member_details();
                dtls.GetFromStream(reader);
                distList_.Add(dtls);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// This method retrieves the address array from the byte stream
        /// </summary>
        /// <param name="reader">Byte stream</param>
        public void GetFromStream(SmppReader reader)
        {
            int count = (int)reader.ReadByte();

            for (int i = 0; i < count; ++i)
            {
                unsuccess_sme addr = new unsuccess_sme();
                addr.GetFromStream(reader);
                Add(addr);
            }
            if (this.Count > MAX_COUNT)
            {
                throw new ArgumentException("Too many address objects in collection, max count allowed is " + MAX_COUNT.ToString());
            }
        }
Esempio n. 5
0
 /// <summary>
 /// This method implements the ISupportSmppByteStream.GetFromStream
 /// method so that the PDU can serialize itself from the data stream.
 /// </summary>
 /// <param name="reader">StreamReader</param>
 public override void GetFromStream(SmppReader reader)
 {
     reader.ReadObject(sourceAddr_);
     reader.ReadObject(dlname_);
     type_ = (DistributionListModifyType)reader.ReadByte();
     if (type_ == DistributionListModifyType.AddMember)
     {
         reader.ReadObject(memberDetails_);
     }
     else
     {
         memberDetails_.Address     = new address();
         memberDetails_.Description = reader.ReadString();
     }
 }
Esempio n. 6
0
 /// <summary>
 /// This method retrieves the byte from the byte stream
 /// </summary>
 /// <param name="reader">Byte stream</param>
 public void GetFromStream(SmppReader reader)
 {
     data_ = reader.ReadByte();
     ValidateData();
 }