Teltonika SDK Typescript
    Preparing search index...

    Class TeltonikaCodec8Parser

    Parser for Teltonika Codec 8 packets. Extends TeltonikaBaseParser to handle Codec 8 specific packet parsing.

    TeltonikaCodec8Parser

    const parser = new TeltonikaCodec8Parser();
    const packet = parser.parsePacket(rawBuffer);
    console.log(packet.records);

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Checks if the buffer contains a complete Teltonika packet. It compares the length specified in the packet header with the actual payload size.

      Parameters

      • data: Buffer

        The raw buffer from the device.

      Returns boolean

      True if the buffer contains a complete packet.

    • Checks if the buffer contains an IMEI message. IMEI packets are 17 bytes long and start with 0x00 0x0F.

      Parameters

      • data: Buffer

        The raw buffer from the device.

      Returns boolean

      True if the buffer contains an IMEI message.

    • Checks if the buffer contains the start of a Teltonika data packet. Standard packets begin with 4 bytes 0x00 0x00 0x00 0x00.

      Parameters

      • data: Buffer

        The raw buffer from the device.

      Returns boolean

      True if the buffer is a packet.

    • Parses the IMEI string from an IMEI buffer.

      Parameters

      • data: Buffer

        The buffer containing the IMEI.

      Returns string

      The IMEI extracted from the buffer.

    Properties

    codec: TeltonikaCodec = TeltonikaDataCodec.Codec8

    The codec identifier for Codec 8.