variable ptz3DLocation

Codec for <Ptz3DLocation>.

Examples

Read back a request

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

const root = parse(
  '<Ptz3DLocation version="1.1"><topLeftX>10.5</topLeftX>' +
    "<streamType>subStream</streamType></Ptz3DLocation>",
).root;

assertEquals(ptz3DLocation.decode(root), {
  topLeftX: 10.5,
  streamType: "subStream",
});

Type

XmlParam<"Ptz3DLocation", Ptz3DLocation>

Usage

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