node-pdu
    Preparing search index...

    Class Report

    Represents a GSM SMS delivery Report PDU.

    Provides feedback on the delivery status of sent SMS messages, indicating success, failure, or delay. This is crucial for ensuring message reliability in services that require confirmation of message delivery, such as transaction alerts and critical notifications.

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructs a Report PDU instance.

      Parameters

      • address: string | SCA

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

      • reference: number

        The reference number of the SMS message for which this report is generated

      • dateTime: SCTS

        The original message submission timestamp represented by an SCTS instance

      • discharge: SCTS

        The discharge time indicating the completion of the delivery process, as an SCTS instance

      • status: number

        The status code indicating the outcome of the delivery attempt

      • options: ReportOptions = {}

        An object containing optional parameters for the Report instance

      Returns Report

    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 dateTime(): SCTS

      Retrieves the original message submission timestamp.

      This timestamp represents when the SMS message was originally submitted for delivery, providing context for the delivery process and timing.

      Returns SCTS

      The SCTS (Service Center Time Stamp) instance representing the submission timestamp

    • get discharge(): SCTS

      Retrieves the discharge time of the SMS message.

      The discharge time indicates when the message delivery process was completed, whether successfully or not, providing precise timing information about the delivery status.

      Returns SCTS

      The SCTS (Service Center Time Stamp) instance representing the discharge time

    • 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 reference(): number

      Retrieves the message reference number.

      This number uniquely identifies the SMS message for which this delivery report is generated, allowing for correlation between sent messages and their respective delivery reports.

      Returns number

      The reference number of the SMS message

    • 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 status(): number

      Retrieves the status of the SMS message delivery.

      This status provides detailed information about the outcome of the delivery attempt, such as success, failure, or specific error conditions.

      Returns number

      The status code representing the delivery outcome

    • get type(): ReportType

      Retrieves the message type for this Report PDU.

      This property indicates the specific type of delivery report, such as whether it's a delivery acknowledgment or a failure report, providing context for the reported delivery status.

      Returns ReportType

      The current ReportType instance, defining the report type

    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 Report

      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 Report

      The instance of this PDU, allowing for method chaining

    • Sets the original message submission timestamp.

      Updates the timestamp indicating when the SMS message was submitted, which is useful for tracking the duration between message submission and its final delivery status.

      Parameters

      • dateTime: SCTS

        The new SCTS instance representing the submission timestamp

      Returns Report

      The instance of this Report, allowing for method chaining

    • Sets the discharge time of the SMS message.

      Updates the discharge time to accurately reflect when the message delivery process concluded, essential for detailed delivery reporting.

      Parameters

      • discharge: SCTS

        The new SCTS instance representing the discharge time

      Returns Report

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

      The instance of this PDU, allowing for method chaining

    • Sets the message reference number.

      Updates the reference number to match the SMS message this delivery report pertains to, ensuring accurate identification and tracking of message delivery status.

      Parameters

      • reference: number

        The new reference number for the SMS message

      Returns Report

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

      The instance of this PDU, allowing for method chaining

    • Sets the status of the SMS message delivery.

      Updates the delivery status to accurately represent the outcome of the delivery attempt, critical for applications requiring confirmation of message delivery.

      Parameters

      • status: number

        The new status code indicating the delivery outcome

      Returns Report

      The instance of this Report, allowing for method chaining

    • Sets the message type for this Report PDU.

      Allows for specifying the type of delivery report, which impacts the interpretation of the report's content and the delivery status it conveys.

      Parameters

      • type: ReportType

        The new ReportType instance to set as the report type

      Returns Report

      The instance of this Report, allowing for method chaining