fieldDetection(options?: { channel?: number; }): Resource<FieldDetection>
The field detection (intrusion) document of one channel.
A device without the feature
A device without the feature
import { assertEquals, assertThrows } from "@std/assert"; import { IsapiError } from "../status/isapi-error.ts"; import { fieldDetection } from "./field-detection.ts"; assertEquals(fieldDetection({ channel: 2 }).path, "/ISAPI/Smart/FieldDetection/2"); assertThrows( () => fieldDetection().codec.parse( "<ResponseStatus><statusCode>4</statusCode>" + "<subStatusCode>notSupport</subStatusCode></ResponseStatus>", ), IsapiError, );
The resource: its path and the codec that reads it.