edgeport - v1.0.3
    Preparing search index...

    Function encodePdu

    • Wraps a command body in the 16-byte SMPP header.

      Computes command_length from the body, then writes the four big-endian header words followed by the body.

      Parameters

      • command: number

        The command_id.

      • status: number

        The command_status (0 for a request).

      • sequence: number

        The sequence_number.

      • body: Uint8Array

        The already-encoded command body (empty for header-only PDUs).

      Returns Uint8Array

      The complete PDU bytes.

      1.0.3

      import { encodePdu, Command } from 'edgeport/smpp';

      const enquireLink = encodePdu(Command.EnquireLink, 0, 1, new Uint8Array(0));