node-pdu
    Preparing search index...

    Class PDUAbstract

    An abstract base class for Protocol Data Units (PDU) in SMS messaging.

    Defines the basic structure and functionalities common to all types of PDUs used in the GSM SMS system. This class serves as a foundation for more specific PDU classes like Submit, Deliver, and Report.

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructs a Protocol Description Unit (PDU) instance.

      Parameters

      • address: string | SCA

        The address as a string or SCA instance

      • options: PDUOptions = {}

        An object containing optional parameters for the PDU instance

      Returns PDU

    Properties

    Accessors

    • get address(): SCA

      Represents the address of the recipient.

      Returns SCA

      The current address as an SCA instance

    • get dataCodingScheme(): DCS

      Retrieves the Data Coding Scheme (DCS) of the SMS message.

      The DCS indicates the data type of the message content (e.g., text, UCS2, etc.) and may influence how the message is displayed on the recipient's device.

      Returns DCS

      The current data coding scheme as a DCS instance

    • get protocolIdentifier(): PID

      Retrieves the Protocol Identifier (PID) of the SMS message.

      The PID is used to indicate interworking and teleservices. It determines how the message should be processed by the receiving entity.

      Returns PID

      The current protocol identifier as a PID instance

    • get serviceCenterAddress(): SCA

      Returns the Service Center Address (SCA) of the SMS message.

      The Service Center Address is used by the GSM network to know where to send the SMS.

      Returns SCA

      The current service center address as an SCA instance

    Methods

    • Sets the address of the recipient.

      This method updates the address for the PDU. It accepts either a string or an SCA instance. If a string is provided, it converts it to an SCA instance.

      Parameters

      • address: string | SCA

        The new address, either as a string or an SCA instance

      Returns PDU

      The instance of this PDU, allowing for method chaining

    • Sets the Data Coding Scheme (DCS) for the SMS message.

      Adjusting the DCS can change how the message content is interpreted and displayed by the recipient's device. This method accepts only DCS instances to ensure proper format.

      Parameters

      • dcs: DCS

        The new data coding scheme as a DCS instance

      Returns PDU

      The instance of this PDU, allowing for method chaining

    • Sets the Protocol Identifier (PID) for the SMS message.

      This method allows customization of the message's PID, which can affect delivery and processing. Only PID instances are accepted to ensure correct format and compatibility.

      Parameters

      • pid: PID

        The new protocol identifier as a PID instance

      Returns PDU

      The instance of this PDU, allowing for method chaining

    • Sets the Service Center Address (SCA) for the SMS message.

      This address is crucial for routing the message through the GSM network. The method accepts either an SCA instance directly or a string that will be converted into an SCA.

      Parameters

      • address: string | SCA

        The new service center address, either as a string or an SCA instance

      Returns PDU

      The instance of this PDU, allowing for method chaining