signalk-server
Version:
An implementation of a [Signal K](http://signalk.org) server for boats.
47 lines • 1.5 kB
TypeScript
import { AlarmStatus, Context, Delta, Notification, NotificationId, Path, Update, AlarmProperties } from '@signalk/server-api';
export declare class Alarm {
private external;
status: AlarmStatus;
private context;
private update;
private path;
value: Notification;
constructor(notificationId?: NotificationId);
/**
* Extract and populate attributes from update and context
*/
private parseDelta;
/**
* Align notification alarm method with state and recorded user action
*/
private alignAlarmMethod;
/** Update the timestamp to the current date / time */
private timeStamp;
/**
* Create / update alarm from incoming update and context
*/
syncFromNotificationUpdate(update: Update, context: Context): void;
setContext(context: Context): void;
/**
* Returns true if Alarm is external (generated from incoming Delta message)
*/
get isExternal(): boolean;
/**
* Generates and returns the delta payload for use with `handleMessage()`
*/
get delta(): Delta;
/** Return Alarm properties */
get properties(): AlarmProperties;
/**
* Return the external key (context/path/$source) of an alarm generated from incoming Delta.
*/
get extKey(): string;
/**
* Sets the path associated with the alarm.
*/
setPath(path: Path, id?: string): void;
silence(): void;
acknowledge(): void;
clear(): void;
}
//# sourceMappingURL=alarm.d.ts.map