Esempio n. 1
0
        /// <summary> Called to create a DeliverSmResp object </summary>
        /// <param name="defaultEncoding"></param>
        /// <param name="buf"></param>
        /// <param name="offset"></param>
        /// <returns> DeliverSmResp </returns>
        public static DeliverSmResp Create(DataCodings defaultEncoding, SmppBuffer buf, ref int offset)
        {
            DeliverSmResp deliverSmResp = new DeliverSmResp(defaultEncoding);

            try
            {
                int start_offset = offset;

                buf.ExtractHeader(deliverSmResp, ref offset);

                if (deliverSmResp.Length > Header.HEADER_LENGTH)
                {
                    deliverSmResp.MessageId = buf.ExtractCString(ref offset);

                    while (offset - start_offset < deliverSmResp.Length)
                    {
                        deliverSmResp.Optional.Add(buf.ExtractTLV(ref offset));
                    }
                }
            }

            catch
            {
                deliverSmResp = null;
            }

            return(deliverSmResp);
        }
Esempio n. 2
0
        /// <summary> Called to create a DeliverSmResp object </summary>
        /// <param name="defaultEncoding"></param>
        /// <param name="buf"></param>
        /// <param name="offset"></param>
        /// <returns> DeliverSmResp </returns>
        public static DeliverSmResp Create(DataCodings defaultEncoding, SmppBuffer buf, ref int offset)
        {
            DeliverSmResp deliverSmResp = new DeliverSmResp(defaultEncoding);

            try
            {
                int start_offset = offset;

                buf.ExtractHeader(deliverSmResp, ref offset);

                if (deliverSmResp.Length > Header.HEADER_LENGTH)
                {
                    deliverSmResp.MessageId = buf.ExtractCString(ref offset);

                    while (offset - start_offset < deliverSmResp.Length)
                    {
                        deliverSmResp.Optional.Add(buf.ExtractTLV(ref offset));
                    }
                }
            }

            catch
            {
                deliverSmResp = null;
            }

            return deliverSmResp;
        }
Esempio n. 3
0
        /// <summary> Called to fire the deliver response pdu event </summary>
        /// <param name="data"></param>
        internal void OnDeliverSmResp(DeliverSmResp data)
        {
            try
            {
                if (DeliverSmRespEvent != null)
                {
                    DeliverSmRespEvent(this, data);
                }
            }

            catch
            {
            }
        }