variable alarmEventList

Codec for <AlarmEventList>.

Each <AlarmEvent> the camera writes carries its own version="1.1"; encode writes it only on <AlarmEventList>.

Examples

Build an <AlarmEventList> with motion and an AI detection

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

const xml = alarmEventList.encode({
  AlarmEvent: [{
    channelId: 0,
    status: "MD",
    AItype: "dog_cat",
    recording: 1,
    timeStamp: 0,
  }],
});

assertStringIncludes(xml, "<AItype>dog_cat</AItype>");

Type

XmlParam<"AlarmEventList", AlarmEventList>

Usage

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