PITrail Event

This event is fired once for each PDU sent between the client and server.

Syntax

public event OnPITrailHandler OnPITrail;

public delegate void OnPITrailHandler(object sender, SmppPITrailEventArgs e);

public class SmppPITrailEventArgs : EventArgs {
  public int Direction { get; }
  public string PDU { get; }
public byte[] PDUB { get; } public int CommandLength { get; } public int CommandId { get; } public string CommandDescription { get; } public string CommandStatus { get; } public int SequenceNumber { get; } }
Public Event OnPITrail As OnPITrailHandler

Public Delegate Sub OnPITrailHandler(sender As Object, e As SmppPITrailEventArgs)

Public Class SmppPITrailEventArgs Inherits EventArgs
  Public ReadOnly Property Direction As Integer
  Public ReadOnly Property PDU As String
Public ReadOnly Property PDUB As Byte() Public ReadOnly Property CommandLength As Integer Public ReadOnly Property CommandId As Integer Public ReadOnly Property CommandDescription As String Public ReadOnly Property CommandStatus As String Public ReadOnly Property SequenceNumber As Integer End Class

Remarks

Whenever either the component or the SMPPServer sends any data across the connection, the component will fire a PITrail event containing that data. It will usually be in SMPP-PDU format.

A PDU will contain at least the SMPP header, which is always 16 bytes long. The first four bytes represent the total length of the PDU, including the 16-byte header. The next four bytes are the command id associated with the PDU. The command id of a response PDU is always the command id to which it is responding plus 0x80000000.

The component parses the values contained in the PDU header into the appropriate fields. The CommandLength, CommandId, CommandStatus, and SequenceNumber parameters contain these parsed values.

The third set of four bytes are the command status (status code) of the command. All originating commands will have a status code of 0x00000000, which will be ignored by the receiver. The field is only set by in response PDUs to indicate the status of the originating command. The final four bytes represent the sequence number of the command. All response PDUs will contain the same sequence number as the originating command.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 .NET Edition - Version 20.0 [Build 8307]