node-pdu
    Preparing search index...

    Class PID

    Represents the Protocol Identifier (PID) of an SMS message.

    Specifies the type or nature of the message, allowing the system to handle it appropriately. It can indicate special types of messages such as voicemail notifications or system messages, among others.

    Index

    Constructors

    • Constructs a Protocol Identifier (PID) instance.

      Parameters

      • options: PIDOptions = {}

        An object containing optional parameters for the PID instance

      Returns PID

    Properties

    PID_ASSIGNED: 0 = 0x00
    PID_GSM_03_40: 1 = 0x01
    PID_RESERVED: 2 = 0x02
    PID_SPECIFIC: 3 = 0x03
    TYPE_ERMES: 5 = 0x05
    TYPE_IEM: 18 = 0x12
    TYPE_IMPLICIT: 0 = 0x00
    TYPE_NPS: 6 = 0x06
    TYPE_TELEFAX: 2 = 0x02
    TYPE_TELEX: 1 = 0x01
    TYPE_VOICE: 4 = 0x04
    TYPE_X_400: 17 = 0x11

    Accessors

    • get indicates(): number

      Retrieves the indicates value.

      This value is part of determining how the message should be handled or processed by the receiving entity, contributing to the overall interpretation of the PID.

      Returns number

      The current indicates value

    • get pid(): number

      Retrieves the Protocol Identifier (PID) value.

      The PID value is crucial for identifying the nature and handling of the SMS message within the network. It determines if the message is of a specific type, such as voicemail notifications or system messages.

      Returns number

      The current PID value

    • get type(): number

      Retrieves the type of the SMS message.

      The type provides further specification within the PID, defining the exact nature or handling instructions for the message, such as whether it's a voice message or an email.

      Returns number

      The current type value

    Methods

    • Computes and returns the combined value of the PID, including its indicates and type parts.

      This value is used for encoding the PID field in the SMS message, combining the general PID with specific flags for message handling.

      Returns number

      The combined PID value as a number

    • Sets the indicates value.

      Modifies part of the PID to influence how the SMS message is processed by the network or receiving device. The value is masked to ensure it adheres to the expected range.

      Parameters

      • indicates: number

        The new indicates value, which is masked to the allowed range

      Returns PID

      The instance of this PID, allowing for method chaining

    • Sets the Protocol Identifier (PID) value.

      Allows specifying the nature of the SMS message by setting an appropriate PID value. The value is masked to ensure it fits the allowed range defined by the protocol.

      Parameters

      • pid: number

        The new PID value, which is masked to fit into the allowed range

      Returns PID

      The instance of this PID, allowing for method chaining

    • Sets the type of the SMS message.

      This method allows for detailed specification of the message's nature, affecting how it is processed. The type is masked to ensure it complies with the defined protocol specifications.

      Parameters

      • type: number

        The new type value, masked to fit the allowed protocol range

      Returns PID

      The instance of this PID, allowing for method chaining

    • Provides a string representation of the PID's combined value.

      Useful for logging or debugging, this method returns a string that represents the encoded value of the PID, including its general identifier, indicates, and type components.

      Returns string

      The PID's combined value as a string