/// <summary> Called to return the buffer of byte for this object </summary> /// <returns> A byte array </returns> public byte[] GetPDU() { SmppBuffer tmpBuff = new SmppBuffer(DefaultEncoding, this); tmpBuff.AddFinalLength(); return tmpBuff.Buffer; }
/// <summary> Called to return the PDU for this type of object </summary> /// <returns> byte[] </returns> byte[] IPacket.GetPDU() { // Create buffer and add header information SmppBuffer tmpBuff = new SmppBuffer(DefaultEncoding, this); // Insert final length tmpBuff.AddFinalLength(); // Return byte array return tmpBuff.Buffer; }
/// <summary> Called to return the PDU for this type of object </summary> /// <returns> byte[] </returns> public byte[] GetPDU() { // Create buffer and add header information SmppBuffer tmpBuff = new SmppBuffer(DefaultEncoding, this); // Add properties tmpBuff.AddCString(ServiceType); tmpBuff.AddCString(MessageId); tmpBuff.AddByte(SourceTon); tmpBuff.AddByte(SourceNpi); tmpBuff.AddCString(SourceAddr); tmpBuff.AddByte(DestTon); tmpBuff.AddByte(DestNpi); tmpBuff.AddCString(DestAddr); // Insert final length tmpBuff.AddFinalLength(); // Return byte array return tmpBuff.Buffer; }
/// <summary> Called to return the PDU for this type of object </summary> /// <returns> A byte array </returns> public byte[] GetPDU() { if (UserData.Headers.Count > 0) { EsmClass |= 0x40; } SmppBuffer tmpBuff = new SmppBuffer(DefaultEncoding, this); tmpBuff.AddCString(ServiceType); tmpBuff.AddByte(SourceTon); tmpBuff.AddByte(SourceNpi); tmpBuff.AddCString(SourceAddr); tmpBuff.AddByte(DestTon); tmpBuff.AddByte(DestNpi); tmpBuff.AddCString(DestAddr); tmpBuff.AddByte(EsmClass); tmpBuff.AddByte(ProtocolId); tmpBuff.AddByte(PriorityFlag); tmpBuff.AddTimeString(ScheduleDeliveryTime, 17); tmpBuff.AddTimeString(ValidityPeriod, 17); tmpBuff.AddByte(RegisteredDelivery); tmpBuff.AddByte(ReplaceIfPresent); tmpBuff.AddByte((byte) DataCoding); tmpBuff.AddByte(DefaultMessageId); tmpBuff.AddUserData(UserData); tmpBuff.AddTLVCollection(Optional); tmpBuff.AddFinalLength(); return tmpBuff.Buffer; }
/// <summary> Called to return the PDU for this type of object </summary> /// <returns> byte[] </returns> public byte[] GetPDU() { SmppBuffer tmpBuff = new SmppBuffer(DefaultEncoding, this); tmpBuff.AddCString(MessageId); if (Optional.Count > 0) { tmpBuff.AddTLVCollection(Optional); } tmpBuff.AddFinalLength(); return tmpBuff.Buffer; }
/// <summary> Called to return the PDU for this type of object </summary> /// <returns> byte[] </returns> public byte[] GetPDU() { SmppBuffer tmpBuff = new SmppBuffer(DefaultEncoding, this); tmpBuff.AddCString(SystemId); tmpBuff.AddCString(Password); tmpBuff.AddCString(SystemType); tmpBuff.AddByte(InterfaceVersion); tmpBuff.AddByte(AddrTon); tmpBuff.AddByte(AddrNpi); tmpBuff.AddCString(AddressRange); tmpBuff.AddFinalLength(); return tmpBuff.Buffer; }
/// <summary> Called to return the PDU for this type of object </summary> /// <returns> byte[] </returns> public byte[] GetPDU() { SmppBuffer tmpBuff = new SmppBuffer(DefaultEncoding, this); tmpBuff.AddCString(MessageId); tmpBuff.AddByte(SourceTon); tmpBuff.AddByte(SourceNpi); tmpBuff.AddCString(SourceAddr); tmpBuff.AddFinalLength(); return tmpBuff.Buffer; }
/// <summary> Called to return the PDU for this type of object </summary> /// <returns> byte[] </returns> public byte[] GetPDU() { SmppBuffer tmpBuff = new SmppBuffer(DefaultEncoding, this); tmpBuff.AddCString(MessageId); tmpBuff.AddCString(FinalDateString); tmpBuff.AddByte((byte) MessageState); tmpBuff.AddByte((byte) ErrorCode); tmpBuff.AddFinalLength(); return tmpBuff.Buffer; }
/// <summary> Called to return the PDU for this type of object </summary> /// <returns> byte[] </returns> public byte[] GetPDU() { if (UserData.Headers.Count > 0) { EsmClass |= 0x40; } SmppBuffer tmpBuff = new SmppBuffer(DefaultEncoding, this); tmpBuff.AddCString(ServiceType); tmpBuff.AddByte(SourceTon); tmpBuff.AddByte(SourceNpi); tmpBuff.AddCString(SourceAddr); tmpBuff.AddByte(DestTon); tmpBuff.AddByte(DestNpi); tmpBuff.AddCString(DestAddr); tmpBuff.AddByte(EsmClass); tmpBuff.AddByte(RegisteredDelivery); tmpBuff.AddByte((byte) DataCoding); tmpBuff.AddTLVCollection(Optional); tmpBuff.AddFinalLength(); return tmpBuff.Buffer; }