variable gopCfg

Codec for <GopCfg>.

Examples

Set the main stream GOP

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

assertEquals(
  gopCfg.encode({ channel: 0, streamType: 0, gopTime: 4 }),
  '<GopCfg version="1.1"><channel>0</channel><streamType>0</streamType>' +
    "<gopTime>4</gopTime></GopCfg>",
);

Type

XmlParam<"GopCfg", GopCfg>

Usage

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