variable ledState

Codec for <LedState>.

Examples

Build a cmd 209 request

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

assertEquals(
  ledState.encode({ channelId: 0, state: "close", lightState: "close" }),
  '<LedState version="1.1"><channelId>0</channelId><state>close</state>' +
    "<lightState>close</lightState></LedState>",
);

Type

XmlParam<"LedState", LedState>

Usage

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