node-pdu
    Preparing search index...

    Class SCA

    Represents the Service Centre Address (SCA) of an SMS message.

    The address of the SMSC responsible for the delivery of the message. It is crucial for routing the SMS through the correct service center to reach the intended recipient.

    Index

    Constructors

    Properties

    type: SCAType

    Accessors

    • get encoded(): string

      Retrieves the encoded representation of the address. The encoding scheme depends on the type of address.

      Returns string

      The encoded address as a hexadecimal string

    • get isAddress(): boolean

      Indicates whether the current instance represents an address.

      Returns boolean

      True if the instance represents an address; otherwise, false

    • get phone(): null | string

      Retrieves the phone number associated with the address.

      Returns null | string

      The phone number associated with the address

    • get size(): number

      Retrieves the size of the encoded address. The size is calculated based on the encoding scheme used.

      Returns number

      The size of the encoded address

    Methods

    • Retrieves the offset for the SCA in the PDU. The offset indicates the position of the SCA within the PDU.

      Returns number

      The offset for the SCA in the PDU

    • Sets the phone number associated with the address.

      This method allows setting the phone number for the address. It also performs encoding based on the address type and detects the type of address if requested.

      Parameters

      • phone: string

        The phone number to set

      • detectType: boolean = true

        Flag indicating whether to detect the address type

      • SC: boolean = false

        Flag indicating whether the address is a service center address

      Returns SCA

      The instance of this SCA, allowing for method chaining

    • Converts the SCA instance to a string representation.

      This method converts the SCA instance to its string representation suitable for inclusion in the PDU.

      Returns string

      The string representation of the SCA

    • Maps and decodes a hexadecimal letter to its corresponding character. This method decodes a hexadecimal letter back to its original character value.

      Parameters

      • letter: string

        The hexadecimal letter to decode

      Returns string

      The decoded character

    • Maps and encodes a character to its corresponding hexadecimal representation. This method encodes a character to its hexadecimal representation.

      Parameters

      • letter: string

        The character to encode

      Returns string

      The encoded hexadecimal representation