edgeport - v1.0.3
    Preparing search index...

    Function encodeTlv

    • Encodes one optional parameter (TLV): a big-endian tag, a big-endian length, then the value.

      Parameters

      • tlv: Tlv

        The tag and value to encode.

      Returns Uint8Array

      The encoded TLV bytes.

      1.0.3

      import { encodeTlv, Tag } from 'edgeport/smpp';

      const bytes = encodeTlv({ tag: Tag.MessagePayload, value: new TextEncoder().encode('hi') });