node-pdu
    Preparing search index...

    Class Submit

    Represents a GSM SMS Submit PDU.

    Facilitates sending SMS messages from devices to the SMSC. It's critical for any application or service that needs to initiate outbound text messages.

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructs a SMS Submit PDU instance.

      Parameters

      • address: string | SCA

        The recipents address as a string or an instance of SCA

      • data: string | Data

        The message content as a string or an instance of Data

      • options: SubmitOptions = {}

        An object containing optional parameters for the Submit instance

      Returns Submit

    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 will be 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 messageReference(): number

      Retrieves the message reference number for this Submit PDU.

      The message reference is a unique identifier for the message, used for tracking purposes and to correlate delivery reports with the original messages.

      Returns number

      The current message reference number

    • 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 type(): SubmitType

      Retrieves the message type for this Submit PDU.

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

      Returns SubmitType

      The current SubmitType instance, defining the message type

    • get validityPeriod(): VP

      Retrieves the Validity Period (VP) for the SMS message.

      The validity period indicates how long the message is valid for delivery before it expires. This can be specified as an absolute date/time or as a time interval from the submission.

      Returns VP

      The current validity period as a VP instance

    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, message reference number, sender's address, protocol identifier, data coding scheme, and validity period.

      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 Submit

      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 Submit

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

      The instance of this PDU, allowing for method chaining

    • Sets the message reference number for this Submit PDU.

      This method allows setting a custom message reference number for tracking and correlation purposes.

      Parameters

      • messageReference: number

        The new message reference number

      Returns Submit

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

      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 Submit

      The instance of this PDU, allowing for method chaining

    • Sets the message type for this Submit PDU.

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

      Parameters

      • type: SubmitType

        The new SubmitType instance to set as the message type

      Returns Submit

      The instance of this Submit, allowing for method chaining

    • Sets the Validity Period (VP) for the SMS message.

      This method allows specifying how long the message is valid for delivery before it expires. The validity period can be set as an absolute date/time or as a time interval from the submission.

      Parameters

      • value: string | number | VP

        The new validity period, either as a VP instance, a string (for absolute date/time), or a number (for time interval)

      Returns Submit

      The instance of this Submit, allowing for method chaining

    • Converts the entire Submit PDU into a string representation.

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

      Returns string

      A string representation of the Submit PDU