internal BodyPdu(ByteBuilder bb, ref int StartPosition)
            {
                _ServiceType        = SmppServiceType.Default;
                _SourceAddress      = string.Empty;
                _DestinationAddress = string.Empty;
                _EsmClass           = new BitBuilder();
                _RegisteredDelivery = new BitBuilder();
                _ShortMessage       = new SmppString();
                _ServiceType        =
                    SmppServiceType.FromValue(
                        SmppDataCoding.BaseEncoding.GetString(bb.ReadBytesUntil(ref StartPosition, 0)));
                _SourceAddressTon      = bb.ReadByte(ref StartPosition);
                _SourceAddressNpi      = bb.ReadByte(ref StartPosition);
                _SourceAddress         = SmppDataCoding.BaseEncoding.GetString(bb.ReadBytesUntil(ref StartPosition, 0));
                _DestinationAddressTon = bb.ReadByte(ref StartPosition);
                _DestinationAddressNpi = bb.ReadByte(ref StartPosition);
                _DestinationAddress    = SmppDataCoding.BaseEncoding.GetString(bb.ReadBytesUntil(ref StartPosition, 0));
                _EsmClass.Value        = bb.ReadByte(ref StartPosition);
                _ProtocolId            = bb.ReadByte(ref StartPosition);
                _PriorityFlag          = bb.ReadByte(ref StartPosition);
                _ScheduleDeliveryTime  =
                    new SmppDateTime(SmppDataCoding.BaseEncoding.GetString(bb.ReadBytesUntil(ref StartPosition, 0)));
                _ValidityPeriod =
                    new SmppDateTime(SmppDataCoding.BaseEncoding.GetString(bb.ReadBytesUntil(ref StartPosition, 0)));
                _RegisteredDelivery.Value = bb.ReadByte(ref StartPosition);
                _ReplaceIfPresent         = bb.ReadByte(ref StartPosition);
                _ShortMessage.DataCoding  = SmppDataCoding.FromValue(bb.ReadByte(ref StartPosition));
                _SmDefaultMessageId       = bb.ReadByte(ref StartPosition);
                byte length = bb.ReadByte(ref StartPosition);

                _ShortMessage.Value = bb.ReadBytes(ref StartPosition, length);
            }
 public BodyPdu()
 {
     _ServiceType        = SmppServiceType.Default;
     _SourceAddress      = string.Empty;
     _DestinationAddress = string.Empty;
     _EsmClass           = new BitBuilder();
     _RegisteredDelivery = new BitBuilder();
     _ShortMessage       = new SmppString();
 }