@yamcs/opi 1.2.6 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -35
- package/dist/fonts/LiberationMono-Bold.woff2 +0 -0
- package/dist/fonts/LiberationMono-BoldItalic.woff2 +0 -0
- package/dist/fonts/LiberationMono-Italic.woff2 +0 -0
- package/dist/fonts/LiberationMono-Regular.woff2 +0 -0
- package/dist/fonts/LiberationSans-Bold.woff2 +0 -0
- package/dist/fonts/LiberationSans-BoldItalic.woff2 +0 -0
- package/dist/fonts/LiberationSans-Italic.woff2 +0 -0
- package/dist/fonts/LiberationSans-Regular.woff2 +0 -0
- package/dist/fonts/LiberationSerif-Bold.woff2 +0 -0
- package/dist/fonts/LiberationSerif-BoldItalic.woff2 +0 -0
- package/dist/fonts/LiberationSerif-Italic.woff2 +0 -0
- package/dist/fonts/LiberationSerif-Regular.woff2 +0 -0
- package/dist/opi.js +1 -1
- package/dist/opi.js.map +1 -1
- package/dist/types/Color.d.ts +36 -36
- package/dist/types/ColorMap.d.ts +23 -23
- package/dist/types/ConsoleHandler.d.ts +10 -10
- package/dist/types/DecimalFormat.d.ts +36 -36
- package/dist/types/DialogHandler.d.ts +14 -0
- package/dist/types/Display.d.ts +141 -130
- package/dist/types/EventHandler.d.ts +34 -34
- package/dist/types/Font.d.ts +15 -13
- package/dist/types/FontResolver.d.ts +4 -0
- package/dist/types/Graphics.d.ts +172 -172
- package/dist/types/HitCanvas.d.ts +14 -14
- package/dist/types/HitRegionSpecification.d.ts +15 -15
- package/dist/types/PathResolver.d.ts +10 -10
- package/dist/types/Range.d.ts +4 -4
- package/dist/types/Widget.d.ts +118 -112
- package/dist/types/XMLNode.d.ts +83 -83
- package/dist/types/actions/Action.d.ts +10 -0
- package/dist/types/actions/ExecuteCommandAction.d.ts +10 -0
- package/dist/types/actions/ExecuteJavaScriptAction.d.ts +10 -0
- package/dist/types/actions/OpenDisplayAction.d.ts +11 -0
- package/dist/types/actions/OpenFileAction.d.ts +8 -0
- package/dist/types/actions/OpenWebpageAction.d.ts +8 -0
- package/dist/types/actions/PlaySoundAction.d.ts +8 -0
- package/dist/types/actions/WritePVAction.d.ts +11 -0
- package/dist/types/actions.d.ts +10 -64
- package/dist/types/events.d.ts +41 -41
- package/dist/types/index.d.ts +11 -8
- package/dist/types/macros.d.ts +9 -9
- package/dist/types/positioning.d.ts +57 -57
- package/dist/types/properties.d.ts +89 -89
- package/dist/types/pv/FormulaPVProvider.d.ts +10 -10
- package/dist/types/pv/LocalPV.d.ts +10 -10
- package/dist/types/pv/PV.d.ts +62 -62
- package/dist/types/pv/PVEngine.d.ts +57 -47
- package/dist/types/pv/PVProvider.d.ts +8 -8
- package/dist/types/pv/Sample.d.ts +11 -11
- package/dist/types/pv/SimulatedPVProvider.d.ts +10 -10
- package/dist/types/pv/formulas/CompiledFormula.d.ts +23 -23
- package/dist/types/pv/formulas/FormulaCompiler.d.ts +5 -5
- package/dist/types/pv/formulas/ast.d.ts +60 -60
- package/dist/types/pv/formulas/manual-test.d.ts +1 -1
- package/dist/types/pv/sim.d.ts +60 -60
- package/dist/types/rules.d.ts +26 -26
- package/dist/types/scale.d.ts +39 -39
- package/dist/types/scripting/ActionWrapper.d.ts +12 -0
- package/dist/types/scripting/ArrayList.d.ts +5 -0
- package/dist/types/scripting/ColorFontUtil.d.ts +19 -19
- package/dist/types/scripting/ConsoleUtil.d.ts +8 -8
- package/dist/types/scripting/DataUtil.d.ts +6 -6
- package/dist/types/scripting/DisplayWrapper.d.ts +9 -7
- package/dist/types/scripting/FileUtil.d.ts +6 -6
- package/dist/types/scripting/GUIUtil.d.ts +11 -8
- package/dist/types/scripting/Java.d.ts +84 -18
- package/dist/types/scripting/MessageDialog.d.ts +8 -5
- package/dist/types/scripting/PVUtil.d.ts +19 -16
- package/dist/types/scripting/PVWrapper.d.ts +11 -10
- package/dist/types/scripting/ScriptEngine.d.ts +12 -8
- package/dist/types/scripting/ScriptUtil.d.ts +7 -7
- package/dist/types/scripting/SpreadSheetTable.d.ts +43 -36
- package/dist/types/scripting/SpreadSheetTableWrapper.d.ts +30 -0
- package/dist/types/scripting/TableWrapper.d.ts +10 -9
- package/dist/types/scripting/WidgetWrapper.d.ts +28 -25
- package/dist/types/scripting/XYGraphWrapper.d.ts +9 -9
- package/dist/types/scripting/utils.d.ts +4 -3
- package/dist/types/scripts.d.ts +19 -19
- package/dist/types/utils.d.ts +2 -2
- package/dist/types/widgets/controls/ActionButton.d.ts +23 -21
- package/dist/types/widgets/controls/BooleanButton.d.ts +37 -37
- package/dist/types/widgets/controls/BooleanSwitch.d.ts +32 -32
- package/dist/types/widgets/controls/CheckBox.d.ts +24 -24
- package/dist/types/widgets/controls/ChoiceButton.d.ts +23 -23
- package/dist/types/widgets/controls/Combo.d.ts +20 -20
- package/dist/types/widgets/controls/ImageBooleanButton.d.ts +33 -33
- package/dist/types/widgets/controls/MenuButton.d.ts +18 -18
- package/dist/types/widgets/controls/NativeButton.d.ts +9 -9
- package/dist/types/widgets/controls/RadioBox.d.ts +26 -26
- package/dist/types/widgets/controls/Scrollbar.d.ts +51 -51
- package/dist/types/widgets/controls/TextInput.d.ts +27 -27
- package/dist/types/widgets/figures/Ramp.d.ts +36 -36
- package/dist/types/widgets/graphics/Arc.d.ts +15 -15
- package/dist/types/widgets/graphics/Ellipse.d.ts +20 -20
- package/dist/types/widgets/graphics/ImageHelper.d.ts +3 -3
- package/dist/types/widgets/graphics/ImageWidget.d.ts +19 -19
- package/dist/types/widgets/graphics/Label.d.ts +15 -15
- package/dist/types/widgets/graphics/Polygon.d.ts +19 -19
- package/dist/types/widgets/graphics/Polyline.d.ts +20 -20
- package/dist/types/widgets/graphics/Rectangle.d.ts +20 -20
- package/dist/types/widgets/graphics/RoundedRectangle.d.ts +22 -22
- package/dist/types/widgets/monitors/ByteMonitor.d.ts +27 -27
- package/dist/types/widgets/monitors/Gauge.d.ts +40 -40
- package/dist/types/widgets/monitors/ImageBooleanIndicator.d.ts +25 -25
- package/dist/types/widgets/monitors/IntensityGraph.d.ts +43 -43
- package/dist/types/widgets/monitors/LED.d.ts +37 -37
- package/dist/types/widgets/monitors/LinearScale.d.ts +66 -66
- package/dist/types/widgets/monitors/Meter.d.ts +39 -39
- package/dist/types/widgets/monitors/ProgressBar.d.ts +64 -64
- package/dist/types/widgets/monitors/Tank.d.ts +52 -52
- package/dist/types/widgets/monitors/TextUpdate.d.ts +17 -17
- package/dist/types/widgets/monitors/Thermometer.d.ts +58 -58
- package/dist/types/widgets/monitors/xygraph/Axis.d.ts +41 -41
- package/dist/types/widgets/monitors/xygraph/CommandBuffer.d.ts +26 -26
- package/dist/types/widgets/monitors/xygraph/PlotAreaRegion.d.ts +22 -22
- package/dist/types/widgets/monitors/xygraph/Trace.d.ts +38 -38
- package/dist/types/widgets/monitors/xygraph/TraceBuffer.d.ts +32 -32
- package/dist/types/widgets/monitors/xygraph/XYGraph.d.ts +44 -44
- package/dist/types/widgets/monitors/xygraph/XYGraphToolbar.d.ts +54 -54
- package/dist/types/widgets/others/AbstractContainerWidget.d.ts +21 -21
- package/dist/types/widgets/others/Connection.d.ts +39 -39
- package/dist/types/widgets/others/DisplayWidget.d.ts +13 -13
- package/dist/types/widgets/others/GroupingContainer.d.ts +8 -8
- package/dist/types/widgets/others/LinkingContainer.d.ts +19 -19
- package/dist/types/widgets/others/TabbedContainer.d.ts +24 -24
- package/dist/types/widgets/others/Table.d.ts +22 -22
- package/dist/types/widgets/others/WebBrowser.d.ts +14 -14
- package/package.json +5 -10
- package/dist/fonts/LiberationMono-Bold.woff +0 -0
- package/dist/fonts/LiberationMono-BoldItalic.woff +0 -0
- package/dist/fonts/LiberationMono-Italic.woff +0 -0
- package/dist/fonts/LiberationMono-Regular.woff +0 -0
- package/dist/fonts/LiberationSans-Bold.woff +0 -0
- package/dist/fonts/LiberationSans-BoldItalic.woff +0 -0
- package/dist/fonts/LiberationSans-Italic.woff +0 -0
- package/dist/fonts/LiberationSans-Regular.woff +0 -0
- package/dist/fonts/LiberationSerif-Bold.woff +0 -0
- package/dist/fonts/LiberationSerif-BoldItalic.woff +0 -0
- package/dist/fonts/LiberationSerif-Italic.woff +0 -0
- package/dist/fonts/LiberationSerif-Regular.woff +0 -0
- package/dist/fonts/stylesheet.css +0 -83
- package/dist/opi.umd.js +0 -2
- package/dist/opi.umd.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PV } from
|
|
2
|
-
import { PVProvider } from
|
|
3
|
-
export declare class SimulatedPVProvider implements PVProvider {
|
|
4
|
-
private pvs;
|
|
5
|
-
canProvide(pvName: string): boolean;
|
|
6
|
-
startProviding(pvs: PV[]): void;
|
|
7
|
-
stopProviding(pvs: PV[]): void;
|
|
8
|
-
isNavigable(): boolean;
|
|
9
|
-
shutdown(): void;
|
|
10
|
-
}
|
|
1
|
+
import { PV } from "./PV";
|
|
2
|
+
import { PVProvider } from "./PVProvider";
|
|
3
|
+
export declare class SimulatedPVProvider implements PVProvider {
|
|
4
|
+
private pvs;
|
|
5
|
+
canProvide(pvName: string): boolean;
|
|
6
|
+
startProviding(pvs: PV[]): void;
|
|
7
|
+
stopProviding(pvs: PV[]): void;
|
|
8
|
+
isNavigable(): boolean;
|
|
9
|
+
shutdown(): void;
|
|
10
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as ast from
|
|
2
|
-
export interface DataSourceStatus {
|
|
3
|
-
value: any;
|
|
4
|
-
acquisitionStatus: any;
|
|
5
|
-
}
|
|
6
|
-
export declare class CompiledFormula {
|
|
7
|
-
pvName: string;
|
|
8
|
-
private formula;
|
|
9
|
-
private pvValues;
|
|
10
|
-
constructor(pvName: string, formula: ast.Formula);
|
|
11
|
-
updateDataSource(pvName: string, status: DataSourceStatus): void;
|
|
12
|
-
clearState(): void;
|
|
13
|
-
getPVNames(): string[];
|
|
14
|
-
private getExpressionParameters;
|
|
15
|
-
execute(): any;
|
|
16
|
-
private executeExpression;
|
|
17
|
-
private executeBinaryExpression;
|
|
18
|
-
private executeLogicalExpression;
|
|
19
|
-
private executeConditionalExpression;
|
|
20
|
-
private executeUnaryExpression;
|
|
21
|
-
private executeCallExpression;
|
|
22
|
-
private callParameterAcquisitionStatus;
|
|
23
|
-
}
|
|
1
|
+
import * as ast from "./ast";
|
|
2
|
+
export interface DataSourceStatus {
|
|
3
|
+
value: any;
|
|
4
|
+
acquisitionStatus: any;
|
|
5
|
+
}
|
|
6
|
+
export declare class CompiledFormula {
|
|
7
|
+
pvName: string;
|
|
8
|
+
private formula;
|
|
9
|
+
private pvValues;
|
|
10
|
+
constructor(pvName: string, formula: ast.Formula);
|
|
11
|
+
updateDataSource(pvName: string, status: DataSourceStatus): void;
|
|
12
|
+
clearState(): void;
|
|
13
|
+
getPVNames(): string[];
|
|
14
|
+
private getExpressionParameters;
|
|
15
|
+
execute(): any;
|
|
16
|
+
private executeExpression;
|
|
17
|
+
private executeBinaryExpression;
|
|
18
|
+
private executeLogicalExpression;
|
|
19
|
+
private executeConditionalExpression;
|
|
20
|
+
private executeUnaryExpression;
|
|
21
|
+
private executeCallExpression;
|
|
22
|
+
private callParameterAcquisitionStatus;
|
|
23
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CompiledFormula } from
|
|
2
|
-
export declare class FormulaCompiler {
|
|
3
|
-
compile(formulaString: string): CompiledFormula;
|
|
4
|
-
execute(formulaString: string): any;
|
|
5
|
-
}
|
|
1
|
+
import { CompiledFormula } from "./CompiledFormula";
|
|
2
|
+
export declare class FormulaCompiler {
|
|
3
|
+
compile(formulaString: string): CompiledFormula;
|
|
4
|
+
execute(formulaString: string): any;
|
|
5
|
+
}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export interface Formula {
|
|
4
|
-
type:
|
|
5
|
-
expression: Expression;
|
|
6
|
-
}
|
|
7
|
-
export interface BinaryExpression {
|
|
8
|
-
type:
|
|
9
|
-
operator:
|
|
10
|
-
left: Expression;
|
|
11
|
-
right: Expression;
|
|
12
|
-
}
|
|
13
|
-
export interface CallExpression {
|
|
14
|
-
type:
|
|
15
|
-
callee: Symbol;
|
|
16
|
-
arguments: Expression[];
|
|
17
|
-
}
|
|
18
|
-
export interface ConditionalExpression {
|
|
19
|
-
type:
|
|
20
|
-
operator: string;
|
|
21
|
-
test: Expression;
|
|
22
|
-
consequent: Expression;
|
|
23
|
-
alternate?: Expression;
|
|
24
|
-
}
|
|
25
|
-
export interface LogicalExpression {
|
|
26
|
-
type:
|
|
27
|
-
operator: string;
|
|
28
|
-
left: Expression;
|
|
29
|
-
right: Expression;
|
|
30
|
-
}
|
|
31
|
-
export interface UnaryExpression {
|
|
32
|
-
type:
|
|
33
|
-
operator:
|
|
34
|
-
argument: Expression;
|
|
35
|
-
prefix: boolean;
|
|
36
|
-
}
|
|
37
|
-
export interface BooleanLiteral {
|
|
38
|
-
type:
|
|
39
|
-
value: boolean;
|
|
40
|
-
}
|
|
41
|
-
export interface ConstantLiteral {
|
|
42
|
-
type:
|
|
43
|
-
value: number;
|
|
44
|
-
}
|
|
45
|
-
export interface ParameterLiteral {
|
|
46
|
-
type:
|
|
47
|
-
value: string;
|
|
48
|
-
}
|
|
49
|
-
export interface NumericLiteral {
|
|
50
|
-
type:
|
|
51
|
-
value: number;
|
|
52
|
-
}
|
|
53
|
-
export interface StringLiteral {
|
|
54
|
-
type:
|
|
55
|
-
value: string;
|
|
56
|
-
}
|
|
57
|
-
export interface Symbol {
|
|
58
|
-
type:
|
|
59
|
-
name: string;
|
|
60
|
-
}
|
|
1
|
+
export type Expression = BinaryExpression | CallExpression | ConditionalExpression | LogicalExpression | UnaryExpression | Literal | Symbol;
|
|
2
|
+
export type Literal = BooleanLiteral | ConstantLiteral | ParameterLiteral | NumericLiteral | StringLiteral;
|
|
3
|
+
export interface Formula {
|
|
4
|
+
type: "Formula";
|
|
5
|
+
expression: Expression;
|
|
6
|
+
}
|
|
7
|
+
export interface BinaryExpression {
|
|
8
|
+
type: "BinaryExpression";
|
|
9
|
+
operator: "+" | "-" | "*" | "/" | "^" | "%" | "==" | "equals" | "!=" | "<>" | "<=" | ">=" | "<" | ">";
|
|
10
|
+
left: Expression;
|
|
11
|
+
right: Expression;
|
|
12
|
+
}
|
|
13
|
+
export interface CallExpression {
|
|
14
|
+
type: "CallExpression";
|
|
15
|
+
callee: Symbol;
|
|
16
|
+
arguments: Expression[];
|
|
17
|
+
}
|
|
18
|
+
export interface ConditionalExpression {
|
|
19
|
+
type: "ConditionalExpression";
|
|
20
|
+
operator: string;
|
|
21
|
+
test: Expression;
|
|
22
|
+
consequent: Expression;
|
|
23
|
+
alternate?: Expression;
|
|
24
|
+
}
|
|
25
|
+
export interface LogicalExpression {
|
|
26
|
+
type: "LogicalExpression";
|
|
27
|
+
operator: string;
|
|
28
|
+
left: Expression;
|
|
29
|
+
right: Expression;
|
|
30
|
+
}
|
|
31
|
+
export interface UnaryExpression {
|
|
32
|
+
type: "UnaryExpression";
|
|
33
|
+
operator: "+" | "-";
|
|
34
|
+
argument: Expression;
|
|
35
|
+
prefix: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface BooleanLiteral {
|
|
38
|
+
type: "BooleanLiteral";
|
|
39
|
+
value: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface ConstantLiteral {
|
|
42
|
+
type: "ConstantLiteral";
|
|
43
|
+
value: number;
|
|
44
|
+
}
|
|
45
|
+
export interface ParameterLiteral {
|
|
46
|
+
type: "ParameterLiteral";
|
|
47
|
+
value: string;
|
|
48
|
+
}
|
|
49
|
+
export interface NumericLiteral {
|
|
50
|
+
type: "NumericLiteral";
|
|
51
|
+
value: number;
|
|
52
|
+
}
|
|
53
|
+
export interface StringLiteral {
|
|
54
|
+
type: "StringLiteral";
|
|
55
|
+
value: string;
|
|
56
|
+
}
|
|
57
|
+
export interface Symbol {
|
|
58
|
+
type: "Symbol";
|
|
59
|
+
name: string;
|
|
60
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/types/pv/sim.d.ts
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { PV } from
|
|
2
|
-
export declare abstract class SimGenerator {
|
|
3
|
-
readonly pv: PV;
|
|
4
|
-
private interval;
|
|
5
|
-
private timer?;
|
|
6
|
-
constructor(pv: PV, interval: number, initialValue?: any);
|
|
7
|
-
protected emit(time: Date, value: any): void;
|
|
8
|
-
stop(): void;
|
|
9
|
-
abstract generateSample(time: Date): void;
|
|
10
|
-
}
|
|
11
|
-
export declare class ConstantGenerator extends SimGenerator {
|
|
12
|
-
constructor(pv: PV, initialValue: any);
|
|
13
|
-
generateSample(): void;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Generates an alternating boolean value
|
|
17
|
-
*/
|
|
18
|
-
export declare class Flipflop extends SimGenerator {
|
|
19
|
-
private state;
|
|
20
|
-
constructor(pv: PV, interval: number);
|
|
21
|
-
generateSample(time: Date): void;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Generates random floats in the range [min, max]
|
|
25
|
-
*/
|
|
26
|
-
export declare class Noise extends SimGenerator {
|
|
27
|
-
private min;
|
|
28
|
-
private max;
|
|
29
|
-
constructor(pv: PV, min: number, max: number, interval: number);
|
|
30
|
-
generateSample(time: Date): void;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Generates random values in the range [min, max]
|
|
34
|
-
*/
|
|
35
|
-
export declare class GaussianNoise extends SimGenerator {
|
|
36
|
-
private avg;
|
|
37
|
-
private stddev;
|
|
38
|
-
constructor(pv: PV, avg: number, stddev: number, interval: number);
|
|
39
|
-
generateSample(time: Date): void;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Generate sine samples between min and max.
|
|
43
|
-
* Warning limits are set at 80%, and alarm limits at 90%.
|
|
44
|
-
*/
|
|
45
|
-
export declare class Sine extends SimGenerator {
|
|
46
|
-
private min;
|
|
47
|
-
private max;
|
|
48
|
-
private samplesPerCycle;
|
|
49
|
-
private currentValue;
|
|
50
|
-
constructor(pv: PV, min: number, max: number, samplesPerCycle: number, interval: number);
|
|
51
|
-
generateSample(time: Date): void;
|
|
52
|
-
}
|
|
53
|
-
export declare class Ramp extends SimGenerator {
|
|
54
|
-
private min;
|
|
55
|
-
private max;
|
|
56
|
-
private inc;
|
|
57
|
-
private currentValue;
|
|
58
|
-
constructor(pv: PV, min: number, max: number, inc: number, interval: number);
|
|
59
|
-
generateSample(time: Date): void;
|
|
60
|
-
}
|
|
1
|
+
import { PV } from "./PV";
|
|
2
|
+
export declare abstract class SimGenerator {
|
|
3
|
+
readonly pv: PV;
|
|
4
|
+
private interval;
|
|
5
|
+
private timer?;
|
|
6
|
+
constructor(pv: PV, interval: number, initialValue?: any);
|
|
7
|
+
protected emit(time: Date, value: any): void;
|
|
8
|
+
stop(): void;
|
|
9
|
+
abstract generateSample(time: Date): void;
|
|
10
|
+
}
|
|
11
|
+
export declare class ConstantGenerator extends SimGenerator {
|
|
12
|
+
constructor(pv: PV, initialValue: any);
|
|
13
|
+
generateSample(): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Generates an alternating boolean value
|
|
17
|
+
*/
|
|
18
|
+
export declare class Flipflop extends SimGenerator {
|
|
19
|
+
private state;
|
|
20
|
+
constructor(pv: PV, interval: number);
|
|
21
|
+
generateSample(time: Date): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Generates random floats in the range [min, max]
|
|
25
|
+
*/
|
|
26
|
+
export declare class Noise extends SimGenerator {
|
|
27
|
+
private min;
|
|
28
|
+
private max;
|
|
29
|
+
constructor(pv: PV, min: number, max: number, interval: number);
|
|
30
|
+
generateSample(time: Date): void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Generates random values in the range [min, max]
|
|
34
|
+
*/
|
|
35
|
+
export declare class GaussianNoise extends SimGenerator {
|
|
36
|
+
private avg;
|
|
37
|
+
private stddev;
|
|
38
|
+
constructor(pv: PV, avg: number, stddev: number, interval: number);
|
|
39
|
+
generateSample(time: Date): void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Generate sine samples between min and max.
|
|
43
|
+
* Warning limits are set at 80%, and alarm limits at 90%.
|
|
44
|
+
*/
|
|
45
|
+
export declare class Sine extends SimGenerator {
|
|
46
|
+
private min;
|
|
47
|
+
private max;
|
|
48
|
+
private samplesPerCycle;
|
|
49
|
+
private currentValue;
|
|
50
|
+
constructor(pv: PV, min: number, max: number, samplesPerCycle: number, interval: number);
|
|
51
|
+
generateSample(time: Date): void;
|
|
52
|
+
}
|
|
53
|
+
export declare class Ramp extends SimGenerator {
|
|
54
|
+
private min;
|
|
55
|
+
private max;
|
|
56
|
+
private inc;
|
|
57
|
+
private currentValue;
|
|
58
|
+
constructor(pv: PV, min: number, max: number, inc: number, interval: number);
|
|
59
|
+
generateSample(time: Date): void;
|
|
60
|
+
}
|
package/dist/types/rules.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Color } from
|
|
2
|
-
export declare class RuleSet {
|
|
3
|
-
rules: Rule[];
|
|
4
|
-
}
|
|
5
|
-
export interface Rule {
|
|
6
|
-
name: string;
|
|
7
|
-
propertyName: string;
|
|
8
|
-
outputExpression: boolean;
|
|
9
|
-
expressions: BooleanExpression[];
|
|
10
|
-
inputs: RuleInput[];
|
|
11
|
-
}
|
|
12
|
-
export
|
|
13
|
-
export interface StringOutputBooleanExpression {
|
|
14
|
-
type:
|
|
15
|
-
expression: string;
|
|
16
|
-
outputValue: string;
|
|
17
|
-
}
|
|
18
|
-
export interface ColorOutputBooleanExpression {
|
|
19
|
-
type:
|
|
20
|
-
expression: string;
|
|
21
|
-
outputValue: Color;
|
|
22
|
-
}
|
|
23
|
-
export interface RuleInput {
|
|
24
|
-
pvName: string;
|
|
25
|
-
trigger: boolean;
|
|
26
|
-
}
|
|
1
|
+
import { Color } from "./Color";
|
|
2
|
+
export declare class RuleSet {
|
|
3
|
+
rules: Rule[];
|
|
4
|
+
}
|
|
5
|
+
export interface Rule {
|
|
6
|
+
name: string;
|
|
7
|
+
propertyName: string;
|
|
8
|
+
outputExpression: boolean;
|
|
9
|
+
expressions: BooleanExpression[];
|
|
10
|
+
inputs: RuleInput[];
|
|
11
|
+
}
|
|
12
|
+
export type BooleanExpression = StringOutputBooleanExpression | ColorOutputBooleanExpression;
|
|
13
|
+
export interface StringOutputBooleanExpression {
|
|
14
|
+
type: "string";
|
|
15
|
+
expression: string;
|
|
16
|
+
outputValue: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ColorOutputBooleanExpression {
|
|
19
|
+
type: "color";
|
|
20
|
+
expression: string;
|
|
21
|
+
outputValue: Color;
|
|
22
|
+
}
|
|
23
|
+
export interface RuleInput {
|
|
24
|
+
pvName: string;
|
|
25
|
+
trigger: boolean;
|
|
26
|
+
}
|
package/dist/types/scale.d.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
export declare class AutoScaleWidgets {
|
|
2
|
-
/**
|
|
3
|
-
* If true, ScaleOptions from widgets are applied.
|
|
4
|
-
*
|
|
5
|
-
* This is not the same as "scaling", but acts more like
|
|
6
|
-
* a stretch to fillup some externally set dimension. It somehow
|
|
7
|
-
* distributes space among all the widgets (repositioning x/y coordinates),
|
|
8
|
-
* and then the widgets that mark themselves as "scalable", may also have
|
|
9
|
-
* their dimensions changed (with mixed results).
|
|
10
|
-
*
|
|
11
|
-
* Seems decent in headers/footers. Not so sure about actual content,
|
|
12
|
-
* because the x/y repositioning may cause the display to look a bit
|
|
13
|
-
* messy.
|
|
14
|
-
*/
|
|
15
|
-
readonly autoScaleWidgets: boolean;
|
|
16
|
-
readonly minWidth: number;
|
|
17
|
-
readonly minHeight: number;
|
|
18
|
-
constructor(
|
|
19
|
-
/**
|
|
20
|
-
* If true, ScaleOptions from widgets are applied.
|
|
21
|
-
*
|
|
22
|
-
* This is not the same as "scaling", but acts more like
|
|
23
|
-
* a stretch to fillup some externally set dimension. It somehow
|
|
24
|
-
* distributes space among all the widgets (repositioning x/y coordinates),
|
|
25
|
-
* and then the widgets that mark themselves as "scalable", may also have
|
|
26
|
-
* their dimensions changed (with mixed results).
|
|
27
|
-
*
|
|
28
|
-
* Seems decent in headers/footers. Not so sure about actual content,
|
|
29
|
-
* because the x/y repositioning may cause the display to look a bit
|
|
30
|
-
* messy.
|
|
31
|
-
*/
|
|
32
|
-
autoScaleWidgets: boolean, minWidth: number, minHeight: number);
|
|
33
|
-
}
|
|
34
|
-
export declare class ScaleOptions {
|
|
35
|
-
readonly widthScalable: boolean;
|
|
36
|
-
readonly heightScalable: boolean;
|
|
37
|
-
readonly keepWidthHeightRatio: boolean;
|
|
38
|
-
constructor(widthScalable: boolean, heightScalable: boolean, keepWidthHeightRatio: boolean);
|
|
39
|
-
}
|
|
1
|
+
export declare class AutoScaleWidgets {
|
|
2
|
+
/**
|
|
3
|
+
* If true, ScaleOptions from widgets are applied.
|
|
4
|
+
*
|
|
5
|
+
* This is not the same as "scaling", but acts more like
|
|
6
|
+
* a stretch to fillup some externally set dimension. It somehow
|
|
7
|
+
* distributes space among all the widgets (repositioning x/y coordinates),
|
|
8
|
+
* and then the widgets that mark themselves as "scalable", may also have
|
|
9
|
+
* their dimensions changed (with mixed results).
|
|
10
|
+
*
|
|
11
|
+
* Seems decent in headers/footers. Not so sure about actual content,
|
|
12
|
+
* because the x/y repositioning may cause the display to look a bit
|
|
13
|
+
* messy.
|
|
14
|
+
*/
|
|
15
|
+
readonly autoScaleWidgets: boolean;
|
|
16
|
+
readonly minWidth: number;
|
|
17
|
+
readonly minHeight: number;
|
|
18
|
+
constructor(
|
|
19
|
+
/**
|
|
20
|
+
* If true, ScaleOptions from widgets are applied.
|
|
21
|
+
*
|
|
22
|
+
* This is not the same as "scaling", but acts more like
|
|
23
|
+
* a stretch to fillup some externally set dimension. It somehow
|
|
24
|
+
* distributes space among all the widgets (repositioning x/y coordinates),
|
|
25
|
+
* and then the widgets that mark themselves as "scalable", may also have
|
|
26
|
+
* their dimensions changed (with mixed results).
|
|
27
|
+
*
|
|
28
|
+
* Seems decent in headers/footers. Not so sure about actual content,
|
|
29
|
+
* because the x/y repositioning may cause the display to look a bit
|
|
30
|
+
* messy.
|
|
31
|
+
*/
|
|
32
|
+
autoScaleWidgets: boolean, minWidth: number, minHeight: number);
|
|
33
|
+
}
|
|
34
|
+
export declare class ScaleOptions {
|
|
35
|
+
readonly widthScalable: boolean;
|
|
36
|
+
readonly heightScalable: boolean;
|
|
37
|
+
readonly keepWidthHeightRatio: boolean;
|
|
38
|
+
constructor(widthScalable: boolean, heightScalable: boolean, keepWidthHeightRatio: boolean);
|
|
39
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from "../actions/Action";
|
|
2
|
+
import { Widget } from "../Widget";
|
|
3
|
+
/**
|
|
4
|
+
* Exposes the API for actions as used in display scripts.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ActionWrapper {
|
|
7
|
+
private action;
|
|
8
|
+
private widget;
|
|
9
|
+
constructor(action: Action, widget: Widget);
|
|
10
|
+
getPropertyValue(propertyName: string): any;
|
|
11
|
+
setPropertyValue(propertyName: string, value: any): void;
|
|
12
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Color } from
|
|
2
|
-
import { Font } from
|
|
3
|
-
export declare class ColorFontUtil {
|
|
4
|
-
BLACK: Color;
|
|
5
|
-
BLUE: Color;
|
|
6
|
-
CYAN: Color;
|
|
7
|
-
DARK_GRAY: Color;
|
|
8
|
-
GRAY: Color;
|
|
9
|
-
GREEN: Color;
|
|
10
|
-
LIGHT_BLUE: Color;
|
|
11
|
-
ORANGE: Color;
|
|
12
|
-
PINK: Color;
|
|
13
|
-
PURPLE: Color;
|
|
14
|
-
RED: Color;
|
|
15
|
-
WHITE: Color;
|
|
16
|
-
YELLOW: Color;
|
|
17
|
-
getColorFromRGB(red: number, green: number, blue: number): Color;
|
|
18
|
-
getFont(name: string, height: number, style: number): Font;
|
|
19
|
-
}
|
|
1
|
+
import { Color } from "../Color";
|
|
2
|
+
import { Font } from "../Font";
|
|
3
|
+
export declare class ColorFontUtil {
|
|
4
|
+
BLACK: Color;
|
|
5
|
+
BLUE: Color;
|
|
6
|
+
CYAN: Color;
|
|
7
|
+
DARK_GRAY: Color;
|
|
8
|
+
GRAY: Color;
|
|
9
|
+
GREEN: Color;
|
|
10
|
+
LIGHT_BLUE: Color;
|
|
11
|
+
ORANGE: Color;
|
|
12
|
+
PINK: Color;
|
|
13
|
+
PURPLE: Color;
|
|
14
|
+
RED: Color;
|
|
15
|
+
WHITE: Color;
|
|
16
|
+
YELLOW: Color;
|
|
17
|
+
getColorFromRGB(red: number, green: number, blue: number): Color;
|
|
18
|
+
getFont(name: string, height: number, style: number): Font;
|
|
19
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Display } from
|
|
2
|
-
export declare class ConsoleUtil {
|
|
3
|
-
private display;
|
|
4
|
-
constructor(display: Display);
|
|
5
|
-
writeInfo(message: string): void;
|
|
6
|
-
writeError(message: string): void;
|
|
7
|
-
writeWarning(message: string): void;
|
|
8
|
-
}
|
|
1
|
+
import { Display } from "../Display";
|
|
2
|
+
export declare class ConsoleUtil {
|
|
3
|
+
private display;
|
|
4
|
+
constructor(display: Display);
|
|
5
|
+
writeInfo(message: string): void;
|
|
6
|
+
writeError(message: string): void;
|
|
7
|
+
writeWarning(message: string): void;
|
|
8
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare class DataUtil {
|
|
2
|
-
createDoubleArray(size: number): any[];
|
|
3
|
-
createIntArray(size: number): any[];
|
|
4
|
-
toJavaDoubleArray(arr: number[]): number[];
|
|
5
|
-
toJavaIntArray(arr: number[]): number[];
|
|
6
|
-
}
|
|
1
|
+
export declare class DataUtil {
|
|
2
|
+
createDoubleArray(size: number): any[];
|
|
3
|
+
createIntArray(size: number): any[];
|
|
4
|
+
toJavaDoubleArray(arr: number[]): number[];
|
|
5
|
+
toJavaIntArray(arr: number[]): number[];
|
|
6
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { Display } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Display } from "../Display";
|
|
2
|
+
import { ScriptEngine } from "./ScriptEngine";
|
|
3
|
+
export declare class DisplayWrapper {
|
|
4
|
+
private display;
|
|
5
|
+
private scriptEngine;
|
|
6
|
+
constructor(display: Display, scriptEngine: ScriptEngine);
|
|
7
|
+
isActive(): boolean;
|
|
8
|
+
getWidget(name: string): import("./WidgetWrapper").WidgetWrapper | undefined;
|
|
9
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Display } from
|
|
2
|
-
export declare class FileUtil {
|
|
3
|
-
private display;
|
|
4
|
-
constructor(display: Display);
|
|
5
|
-
readTextFile(filePath: string): string;
|
|
6
|
-
}
|
|
1
|
+
import { Display } from "../Display";
|
|
2
|
+
export declare class FileUtil {
|
|
3
|
+
private display;
|
|
4
|
+
constructor(display: Display);
|
|
5
|
+
readTextFile(filePath: string): string;
|
|
6
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { Display } from "../Display";
|
|
2
|
+
export declare class GUIUtil {
|
|
3
|
+
private display;
|
|
4
|
+
constructor(display: Display);
|
|
5
|
+
fullScreen(): void;
|
|
6
|
+
openConfirmDialog(message: string): boolean;
|
|
7
|
+
openInformationDialog(message: string): void;
|
|
8
|
+
openWarningDialog(message: string): void;
|
|
9
|
+
openErrorDialog(message: string): void;
|
|
10
|
+
openPasswordDialog(message: string, password: string): boolean;
|
|
11
|
+
}
|