Codec for <AlarmEventList>.
Each <AlarmEvent> the camera writes carries its own version="1.1";
encode writes it only on <AlarmEventList>.
Build an <AlarmEventList> with motion and an AI detection
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>");
XmlParam<"AlarmEventList", AlarmEventList>