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.
command_length
The command_id.
command_id
The command_status (0 for a request).
command_status
The sequence_number.
sequence_number
The already-encoded command body (empty for header-only PDUs).
The complete PDU bytes.
1.0.3
import { encodePdu, Command } from 'edgeport/smpp';const enquireLink = encodePdu(Command.EnquireLink, 0, 1, new Uint8Array(0)); Copy
import { encodePdu, Command } from 'edgeport/smpp';const enquireLink = encodePdu(Command.EnquireLink, 0, 1, new Uint8Array(0));
Wraps a command body in the 16-byte SMPP header.
Computes
command_lengthfrom the body, then writes the four big-endian header words followed by the body.