node-pdu
    Preparing search index...

    Function parse

    • Parses a PDU string into an instance of a PDU object (Deliver, Submit, or Report).

      This function is a high-level entry point for parsing PDU strings into their corresponding PDU object types based on the detected PDU type within the provided string. It handles the initial parsing steps common to all PDU types, such as the Service Center Address (SCA) and PDU type determination, and then delegates to specific parsing functions based on the PDU type.

      Parameters

      • str: string

        The PDU string to be parsed

      Returns Submit | Deliver | Report

      An instance of a PDU object (Deliver, Submit, or Report) depending on the PDU type detected in the input string

      Throws an error if an unknown SMS type is encountered