예제 #1
0
        protected override byte[] GetBodyData()
        {
            ByteBuffer buffer = new ByteBuffer(16);

            buffer.Append(EncodeCString(VMessageId));
            buffer.Append(VSourceAddress.GetBytes());
            return(buffer.ToBytes());
        }
예제 #2
0
        protected override byte[] GetBodyData()
        {
            byte[]     sourceAddrBytes = VSourceAddress.GetBytes();
            byte[]     esmeAddresBytes = _vEsmeAddress.GetBytes();
            ByteBuffer buffer          = new ByteBuffer(sourceAddrBytes.Length + esmeAddresBytes.Length);

            buffer.Append(sourceAddrBytes);
            buffer.Append(esmeAddresBytes);
            return(buffer.ToBytes());
        }
예제 #3
0
        protected override byte[] GetBodyData()
        {
            ByteBuffer buffer = new ByteBuffer();

            buffer.Append(EncodeCString(VServiceType));
            buffer.Append(VSourceAddress.GetBytes());
            buffer.Append(VDestinationAddress.GetBytes());
            buffer.Append((byte)VEsmClass);
            buffer.Append((byte)VRegisteredDelivery);
            buffer.Append((byte)VDataCoding);
            return(buffer.ToBytes());
        }
예제 #4
0
        protected override byte[] GetBodyData()
        {
            ByteBuffer buffer = new ByteBuffer(64);

            buffer.Append(EncodeCString(VMessageId));
            buffer.Append(VSourceAddress.GetBytes());
            buffer.Append(EncodeCString(_vScheduleDeliveryTime));
            buffer.Append(EncodeCString(_vValidityPeriod));
            buffer.Append((byte)_vRegisteredDelivery);
            buffer.Append((byte)_vSmDefaultMessageId);
            byte[] shortMessage = EncodeCString(_vShortMessage);
            _vSmLength = (byte)shortMessage.Length;
            buffer.Append((byte)_vSmLength);
            buffer.Append(shortMessage);
            return(buffer.ToBytes());
        }
예제 #5
0
        protected override byte[] GetBodyData()
        {
            ByteBuffer buffer = new ByteBuffer(256);

            buffer.Append(EncodeCString(VServiceType));
            buffer.Append(VSourceAddress.GetBytes());
            buffer.Append(VDestinationAddress.GetBytes());
            buffer.Append((byte)VEsmClass);
            buffer.Append(_vProtocolId);
            buffer.Append((byte)_vPriorityFlag);
            buffer.Append(EncodeCString(_vScheduleDeliveryTime));
            buffer.Append(EncodeCString(_vValidityPeriod));
            buffer.Append((byte)VRegisteredDelivery);
            buffer.Append(_vReplaceIfPresent ? (byte)1 : (byte)0);
            buffer.Append((byte)VDataCoding);
            buffer.Append(_vSmDefalutMessageId);
            //Check if vMessageBytes is not null
            if (_vMessageBytes == null)
            {
                //Check whether optional field is used
                if (VTlv.GetTlvByTag(Tag.MessagePayload) == null)
                {
                    //Create an empty message
                    _vMessageBytes = new byte[] { 0x00 };
                }
            }
            if (_vMessageBytes == null)
            {
                buffer.Append(0);
            }
            else
            {
                buffer.Append((byte)_vMessageBytes.Length);
                buffer.Append(_vMessageBytes);
            }
            return(buffer.ToBytes());
        }