node-pdu
    Preparing search index...

    Class Header

    Represents the header information in a segmented SMS message part.

    Contains metadata essential for the reassembly of segmented SMS messages, such as part numbering and reference identifiers. It ensures that multipart messages are correctly reconstructed upon receipt.

    Index

    Constructors

    Properties

    IE_CONCAT_16BIT_REF: 8 = 0x08
    IE_CONCAT_8BIT_REF: 0 = 0x00

    Methods

    • Retrieves the current segment number of this part of the segmented SMS message.

      This number indicates the order of the current segment in the sequence of the total message parts, aiding in proper reconstruction.

      Returns undefined | number

      The current segment number, or 1 if no concatenation IE is present

    • Retrieves the message reference number for the segmented SMS message.

      This number is used to correlate all segments of a multi-part SMS message, ensuring they can be correctly reassembled upon receipt.

      Returns undefined | number

      The message reference number, or 0 if no concatenation IE is present

    • Gets the size of the pointer (message reference number) in bytes.

      The size is determined based on the type of concatenation IE present, reflecting the length of the message reference number field.

      Returns number

      The size of the pointer in bytes, or 0 if no concatenation IE is present

    • Gets the total number of segments in the segmented SMS message.

      This information is critical for understanding how many parts the message has been divided into, enabling correct reassembly.

      Returns undefined | number

      The total number of segments, or 1 if no concatenation IE is present

    • Calculates the total size of the User Data Header Length (UDHL).

      The size is calculated based on the length of all Information Elements (IEs) included in the header. This is crucial for correctly encoding and decoding segmented SMS messages.

      Returns number

      The total size of the UDHL

    • Retrieves the type of the concatenation Information Element (IE).

      This method checks if there's a known concatenation IE present and returns its type. It distinguishes between 8-bit and 16-bit reference numbers for concatenated messages.

      Returns undefined | number

      The type of the concatenation IE, or undefined if not present

    • Converts the header information to an object.

      This function is useful for serializing the header information, including the message reference number, total number of segments, and current segment number. It's particularly useful for diagnostics or interfacing with systems that require these details in a structured format.

      Returns {
          CURRENT: undefined | number;
          POINTER: undefined | number;
          SEGMENTS: undefined | number;
      }

      An object containing the pointer

    • Generates a string representation of the User Data Header (UDH).

      This method constructs the UDH string by concatenating the encoded lengths and data of all Information Elements (IEs), prefixed with the overall UDH length. It's essential for encoding the header part of segmented SMS messages.

      Returns string

      A string representing the encoded User Data Header