variable BAICHUAN_MESSAGE_CLASS

Message classes (bytes 18-19, read as u16be). The class decides the header length, see headerLength.

Examples

Pick the class for a request

import { assertEquals } from "@std/assert";
import { BAICHUAN_MESSAGE_CLASS } from "@hertzg/reolink-api/encoding/header";

assertEquals(BAICHUAN_MESSAGE_CLASS.MODERN_WITH_OFFSET, 0x1464);

Properties

LEGACY: number

20-byte header with an encryption marker, used for the nonce request.

MODERN: number

20-byte header with an encryption marker, used for replies to it.

24-byte header with a status code and payload offset.

Also 24 bytes with a status code and payload offset.

Usage

import { BAICHUAN_MESSAGE_CLASS } from "encoding/header.ts";