variable hddInfoList

Codec for <HddInfoList>.

Examples

Build an <HddInfoList> element

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

const xml = hddInfoList.encode({
  HddInfo: [{
    number: 0,
    capacity: 59,
    capacityM: 640,
    format: 1,
    mount: 1,
    remainSize: 12,
    remainSizeM: 3,
  }],
});

assertStringIncludes(xml, "<HddInfo><number>0</number><capacity>59</capacity>");

Type

XmlParam<"HddInfoList", HddInfoList>

Usage

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