1 | import { IAlarm, IAlarmRule } from './alarm-base';
|
2 | /**
|
3 | * Enumeration indicates state of Alarm used in building Alarm Rule.
|
4 | */
|
5 | export declare enum AlarmState {
|
6 | /**
|
7 | * State indicates resource is in ALARM
|
8 | */
|
9 | ALARM = "ALARM",
|
10 | /**
|
11 | * State indicates resource is not in ALARM
|
12 | */
|
13 | OK = "OK",
|
14 | /**
|
15 | * State indicates there is not enough data to determine is resource is in ALARM
|
16 | */
|
17 | INSUFFICIENT_DATA = "INSUFFICIENT_DATA"
|
18 | }
|
19 | /**
|
20 | * Class with static functions to build AlarmRule for Composite Alarms.
|
21 | */
|
22 | export declare class AlarmRule {
|
23 | /**
|
24 | * function to join all provided AlarmRules with AND operator.
|
25 | *
|
26 | * @param operands IAlarmRules to be joined with AND operator.
|
27 | */
|
28 | static allOf(...operands: IAlarmRule[]): IAlarmRule;
|
29 | /**
|
30 | * function to join all provided AlarmRules with OR operator.
|
31 | *
|
32 | * @param operands IAlarmRules to be joined with OR operator.
|
33 | */
|
34 | static anyOf(...operands: IAlarmRule[]): IAlarmRule;
|
35 | /**
|
36 | * function to wrap provided AlarmRule in NOT operator.
|
37 | *
|
38 | * @param operand IAlarmRule to be wrapped in NOT operator.
|
39 | */
|
40 | static not(operand: IAlarmRule): IAlarmRule;
|
41 | /**
|
42 | * function to build TRUE/FALSE intent for Rule Expression.
|
43 | *
|
44 | * @param value boolean value to be used in rule expression.
|
45 | */
|
46 | static fromBoolean(value: boolean): IAlarmRule;
|
47 | /**
|
48 | * function to build Rule Expression for given IAlarm and AlarmState.
|
49 | *
|
50 | * @param alarm IAlarm to be used in Rule Expression.
|
51 | * @param alarmState AlarmState to be used in Rule Expression.
|
52 | */
|
53 | static fromAlarm(alarm: IAlarm, alarmState: AlarmState): IAlarmRule;
|
54 | /**
|
55 | * function to build Rule Expression for given Alarm Rule string.
|
56 | *
|
57 | * @param alarmRule string to be used in Rule Expression.
|
58 | */
|
59 | static fromString(alarmRule: string): IAlarmRule;
|
60 | private static concat;
|
61 | }
|