variable ptzGuard

Codec for <PtzGuard>.

Examples

Store the current position as the guard position

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

const xml = ptzGuard.encode({
  channelId: 0,
  timeout: 120,
  benable: 1,
  needSetPos: 1,
});

assertStringIncludes(xml, "<needSetPos>1</needSetPos>");

Type

XmlParam<"PtzGuard", PtzGuard>

Usage

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