node-pdu
    Preparing search index...

    Class SubmitType

    Represents the PDU type for an SMS-SUBMIT message in GSM SMS messaging.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    messageTypeIndicator: 1 = PDUType.SMS_SUBMIT
    SMS_DELIVER: 0 = 0x00
    SMS_REPORT: 2 = 0x02
    SMS_SUBMIT: 1 = 0x01
    VPF_ABSOLUTE: 3 = 0x03
    VPF_NONE: 0 = 0x00
    VPF_RELATIVE: 2 = 0x02
    VPF_SIEMENS: 1 = 0x01

    Accessors

    • get statusReportRequest(): number

      Retrieves the Status Report Request (SRR) status.

      The SRR is a feature in SMS that requests the network to send a delivery report for the sent message. This indicator specifies whether such a report is requested.

      Returns number

      The current status of the Status Report Request indicator

    • get userDataHeader(): number

      Retrieves the User Data Header (UDH) indicator status.

      The User Data Header is part of the SMS payload and can contain various control information such as concatenated message reference numbers, port numbers for WAP Push, and other service indications. This indicator specifies whether UDH is present.

      Returns number

      The current status of the User Data Header indicator

    • get validityPeriodFormat(): number

      Retrieves the Validity Period Format (VPF).

      The VPF specifies the format of the validity period of the SMS message, dictating how long the message should be stored in the network before delivery is attempted. It supports several formats including none, relative, and absolute.

      Returns number

      The current format of the validity period

    Methods

    • Calculates and returns the overall value of the PDU type based on its components.

      This method aggregates the various indicators and settings into a single value, which represents the configuration of the PDU type. It is used for generating the final PDU string representation.

      Returns number

      The aggregated value of the PDU type settings

    • Sets the Status Report Request (SRR) indicator.

      This method enables or disables the request for a delivery report for the SMS message. It ensures the delivery status can be tracked. The value is masked to ensure it is within valid range.

      Parameters

      • srr: number

        The desired status for the SRR indicator (0 or 1)

      Returns SubmitType

      The instance of this PDUType, allowing for method chaining

    • Sets the User Data Header (UDH) indicator.

      This method configures the presence of a User Data Header in the SMS message. It is primarily used for advanced messaging features such as concatenated SMS or application port addressing. The value is masked to ensure it is within valid range.

      Parameters

      • userDataHeader: number

        The desired status for the UDH indicator (0 or 1)

      Returns SubmitType

      The instance of this PDUType, allowing for method chaining

    • Sets the Validity Period Format (VPF) for the SMS message.

      This method configures the time frame in which the SMS should be delivered. It is crucial for time-sensitive messages. The value is masked and validated to ensure it corresponds to one of the predefined formats. An error is thrown for invalid formats.

      Parameters

      • validityPeriodFormat: number

        The desired format for the message validity period

      Returns SubmitType

      The instance of this PDUType, allowing for method chaining

    • Generates a string representation of the PDU type value.

      This method utilizes a helper function to convert the aggregated PDU type value into a hexadecimal string. It is useful for logging and debugging purposes to see the encoded PDU type.

      Returns string

      A hexadecimal string representation of the PDU type value