UNPKG

signalk-server

Version:

An implementation of a [Signal K](http://signalk.org) server for boats.

29 lines (28 loc) 885 B
import { Delta, Path } from '@signalk/server-api'; import { StreamBundle } from './streambundle'; type ZoneState = 'nominal' | 'alert' | 'warn' | 'alarm' | 'emergency'; interface Zone { lower: number | undefined; upper: number | undefined; state: ZoneState; message: string; } type Method = 'visual' | 'sound'; type ZoneMethod = Method[]; interface ZoneMethods { normalMethod?: ZoneMethod; nominalMethod?: ZoneMethod; alertMethod?: ZoneMethod; warnMethod?: ZoneMethod; alarmMethod?: ZoneMethod; emergencyMethod?: ZoneMethod; } export declare class Zones { private streambundle; private sendDelta; private unsubscribesForPaths; constructor(streambundle: StreamBundle, sendDelta: (delta: Delta) => void); sendNormalDelta(path: Path): void; watchForZones(path: Path, zones: Zone[], methods: ZoneMethods): void; } export {};