node-pdu
    Preparing search index...

    Class Deliver

    Represents a GSM SMS Deliver PDU.

    Used for receiving SMS messages. It includes information like the sender's address and the message content, essential for any application or service that needs to process or display incoming text messages to users.

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructs a SMS Deliver PDU instance.

      Parameters

      • address: string | SCA

        The sender's address as a string or an instance of SCA

      • data: string | Data

        The message content as a string or an instance of Data

      • options: DeliverOptions = {}

        An object containing optional parameters for the Deliver instance

      Returns Deliver

    Accessors

    • get address(): SCA

      Represents the address of the recipient.

      Returns SCA

      The current address as an SCA instance

    • get data(): Data

      Retrieves the data/content of the SMS message.

      This property holds the actual message content that was sent, which can be in various formats (e.g., plain text, binary data) depending on the data coding scheme.

      Returns Data

      The current Data instance containing the message content

    • 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

    • get serviceCenterTimeStamp(): SCTS

      Retrieves the timestamp from the service center.

      This timestamp represents when the SMS message was received by the service center, providing information about the message's delivery time.

      Returns SCTS

      The current SCTS (Service Center Time Stamp) instance

    • get type(): DeliverType

      Retrieves the message type for this Deliver PDU.

      This property represents the specific characteristics and parameters related to the delivery of the SMS message, such as whether it's a standard message, a status report request, etc.

      Returns DeliverType

      The current DeliverType instance, defining the message type

    Methods

    • Retrieves all parts of the message data.

      For messages that are split into multiple parts (e.g., concatenated SMS), this method returns all parts as an array.

      Returns Part[]

      An array of Data parts representing the message content

    • Retrieves all parts of the message as strings.

      This method is useful for concatenated messages, converting each part of the message data into a string format based on the current data coding scheme.

      Returns string[]

      An array of strings, each representing a part of the message content

    • Generates a string representation of the start of the PDU.

      This method constructs the initial part of the PDU string, including information like the service center address, message type, sender's address, protocol identifier, data coding scheme, and service center timestamp.

      Returns string

      A string representing the start of the PDU

    • 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 Deliver

      The instance of this PDU, allowing for method chaining

    • Sets the data/content of the SMS message.

      This method allows the message content to be updated, accepting either a string (which will be converted to a Data instance internally) or a Data instance directly.

      Parameters

      • data: string | Data

        The new message content, either as a string or a Data instance

      Returns Deliver

      The instance of this Deliver, 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 Deliver

      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 Deliver

      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 Deliver

      The instance of this PDU, allowing for method chaining

    • Sets the service center timestamp for the SMS message.

      This method updates the timestamp indicating when the message was received by the service center. It accepts either a Date object or an SCTS instance. If a Date is provided, it is converted to an SCTS.

      Parameters

      • time: SCTS | Date = ...

        The new timestamp, either as a Date or an SCTS instance

      Returns Deliver

      The instance of this Deliver, allowing for method chaining

    • Sets the message type for this Deliver PDU.

      Allows for specifying the type of SMS deliver message, adjusting its parameters like whether it requests a status report, among other options.

      Parameters

      • type: DeliverType

        The new DeliverType instance to set as the message type

      Returns Deliver

      The instance of this Deliver, allowing for method chaining

    • Converts the entire Deliver PDU into a string representation.

      This method is intended to provide a complete textual representation of the Deliver PDU, including all headers and the message content, formatted according to the PDU protocol.

      Returns string

      A string representation of the Deliver PDU