variable record

Codec for <Record>.

Examples

Record continuously every hour of the week

import { assertStringIncludes } from "@std/assert";
import { record } from "@hertzg/reolink-api/protocol/params";

const xml = record.encode({
  channelId: 0,
  enable: 1,
  typeScheduleList: [{ type: "Normal", valueTable: "1".repeat(168) }],
});

assertStringIncludes(xml, "<typeScheduleList><item><type>Normal</type>");

Type

Usage

import { record } from "protocol/params/mod.ts";