Codec for <PtzCruise>.
Build a patrol over two presets
Build a patrol over two presets
import { assertStringIncludes } from "@std/assert"; import { ptzCruise } from "@hertzg/reolink-api/protocol/params"; const xml = ptzCruise.encode({ channelId: 0, cruiseList: [{ patrolId: 1, enable: 1, name: "fence", keyPosList: [ { keyPosId: 0, presetId: 2, speed: 20, dwellTime: 10 }, { keyPosId: 1, presetId: 3, speed: 20, dwellTime: 10 }, ], }], }); assertStringIncludes(xml, "<presetId>3</presetId>");