Exemple #1
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();
 }
Exemple #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();
 }
Exemple #3
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();
 }
Exemple #4
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();
 }