Beispiel #1
0
            public byte[] ToByteArray()
            {
                var builder = new ByteBuilder(100);

                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_SystemId)));
                return(builder.ToArray());
            }
Beispiel #2
0
            public byte[] ToByteArray()
            {
                var builder = new ByteBuilder(30);

                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_MessageId)));
                builder.Add(_SourceAddressTon);
                builder.Add(_SourceAddressNpi);
                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_SourceAddress)));
                return(builder.ToArray());
            }
Beispiel #3
0
 public void SetString(string value)
 {
     if (IsCString(TagId))
     {
         _Value = SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(value));
     }
     else
     {
         _Value = SmppDataCoding.BaseEncoding.GetBytes(value);
     }
 }
Beispiel #4
0
            public byte[] ToByteArray()
            {
                var builder = new ByteBuilder(90);

                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_SystemId)));
                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_Password)));
                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_SystemType)));
                builder.Add(_InterfaceVersion);
                builder.Add(_AddressTon);
                builder.Add(_AddressNpi);
                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_AddressRange)));
                return(builder.ToArray());
            }
Beispiel #5
0
            public byte[] ToByteArray()
            {
                var builder = new ByteBuilder(100);

                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_ServiceType.Value)));
                builder.Add(_SourceAddressTon);
                builder.Add(_SourceAddressNpi);
                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_SourceAddress)));
                builder.Add(_DestinationAddressTon);
                builder.Add(_DestinationAddressNpi);
                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_DestinationAddress)));
                builder.Add(_EsmClass.Value);
                builder.Add(_RegisteredDelivery.Value);
                builder.Add(_DataCoding.Value);
                return(builder.ToArray());
            }
Beispiel #6
0
            public byte[] ToByteArray()
            {
                var builder = new ByteBuilder(30);

                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_MessageId)));
                if (_FinalDate == null)
                {
                    builder.AddRange(SmppConverter.SmppNullEnd(null));
                }
                else
                {
                    builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_FinalDate.SmppDate)));
                }
                builder.Add(_MessageState);
                builder.Add(_ErrorCode);
                return(builder.ToArray());
            }
            public byte[] ToByteArray()
            {
                var builder = new ByteBuilder(300);

                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_ServiceType.Value)));
                builder.Add(_SourceAddressTon);
                builder.Add(_SourceAddressNpi);
                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_SourceAddress)));
                builder.Add(_DestinationAddressTon);
                builder.Add(_DestinationAddressNpi);
                builder.AddRange(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_DestinationAddress)));
                builder.Add(_EsmClass.Value);
                builder.Add(_ProtocolId);
                builder.Add(_PriorityFlag);
                if (_ScheduleDeliveryTime == null)
                {
                    builder.AddRange(SmppConverter.SmppNullEnd(null));
                }
                else
                {
                    builder.AddRange(
                        SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_ScheduleDeliveryTime.SmppDate)));
                }
                if (_ValidityPeriod == null)
                {
                    builder.AddRange(SmppConverter.SmppNullEnd(null));
                }
                else
                {
                    builder.AddRange(
                        SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_ValidityPeriod.SmppDate)));
                }
                builder.Add(_RegisteredDelivery.Value);
                builder.Add(_ReplaceIfPresent);
                builder.Add(_ShortMessage.DataCoding.Value);
                builder.Add(_SmDefaultMessageId);
                builder.Add(Convert.ToByte(_ShortMessage.Length));
                builder.AddRange(_ShortMessage.Value);
                return(builder.ToArray());
            }
Beispiel #8
0
 public byte[] ToByteArray()
 {
     return(SmppConverter.SmppNullEnd(SmppDataCoding.BaseEncoding.GetBytes(_MessageId)));
 }