type alias SmartRule

What a region and a crossing line have in common.

Examples

Describe a rule

import { assertEquals } from "@std/assert";
import type { SmartRule } from "./rule-fields.ts";

const rule: SmartRule = {
  id: 1,
  enabled: true,
  coordinates: [{ x: 0, y: 0 }, { x: 1000, y: 1000 }],
  detectionTarget: ["human"],
};

assertEquals(rule.detectionTarget, ["human"]);

Properties

id: number

<id>, from 1.

enabled: boolean

<enabled>.

optional
sensitivityLevel: number

<sensitivityLevel>, 0 to 100.

The shape's points in the normalized screen space.

<detectionTarget> split on commas, such as ["human", "vehicle"], or ["all"] on some firmware.

optional
alarmConfidence: string

<alarmConfidence>: low, mediumLow, mediumHigh or high.