edgeport - v1.0.3
    Preparing search index...

    Function encodeSubmitSm

    • Encodes a submit_sm PDU.

      Writes the full mandatory body in spec order, prefixing short_message with its length byte, then appends any TLVs. A body longer than MAX_SHORT_MESSAGE is rejected; the session layer moves oversized messages into a message_payload TLV instead.

      Parameters

      • sequence: number

        The sequence_number.

      • params: SubmitSmParams

        The addresses, flags, and message body.

      Returns Uint8Array

      The complete submit_sm PDU bytes.

      If shortMessage exceeds MAX_SHORT_MESSAGE octets.

      1.0.3

      import { encodeSubmitSm } from 'edgeport/smpp';

      const bytes = encodeSubmitSm(2, {
      sourceAddr: '12065550100',
      destinationAddr: '12065550111',
      shortMessage: new TextEncoder().encode('hello')
      });