variable ntp

Codec for <Ntp>.

Examples

Build an <Ntp> element for cmd 39

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

const xml = ntp.encode({ enable: 1, server: "time.example.com", port: 123 });

assertStringIncludes(xml, "<server>time.example.com</server>");

Type

XmlParam<"Ntp", Ntp>

Usage

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