@yamcs/opi 1.2.5 → 1.2.7
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/opi.js +1 -1
- package/dist/opi.js.map +1 -1
- package/dist/types/ColorMap.d.ts +1 -1
- package/dist/types/DialogHandler.d.ts +14 -0
- package/dist/types/Display.d.ts +58 -47
- package/dist/types/EventHandler.d.ts +3 -3
- package/dist/types/Font.d.ts +3 -1
- package/dist/types/FontResolver.d.ts +4 -0
- package/dist/types/Graphics.d.ts +11 -11
- package/dist/types/HitCanvas.d.ts +1 -1
- package/dist/types/HitRegionSpecification.d.ts +2 -2
- package/dist/types/PathResolver.d.ts +2 -2
- package/dist/types/Widget.d.ts +19 -13
- package/dist/types/XMLNode.d.ts +17 -17
- 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 +1 -55
- package/dist/types/events.d.ts +6 -6
- package/dist/types/index.d.ts +11 -8
- package/dist/types/properties.d.ts +14 -14
- package/dist/types/pv/FormulaPVProvider.d.ts +2 -2
- package/dist/types/pv/LocalPV.d.ts +7 -3
- package/dist/types/pv/PV.d.ts +3 -3
- package/dist/types/pv/PVEngine.d.ts +18 -8
- package/dist/types/pv/PVProvider.d.ts +1 -1
- package/dist/types/pv/Sample.d.ts +1 -1
- package/dist/types/pv/SimulatedPVProvider.d.ts +2 -2
- package/dist/types/pv/formulas/CompiledFormula.d.ts +1 -1
- package/dist/types/pv/formulas/FormulaCompiler.d.ts +1 -1
- package/dist/types/pv/formulas/ast.d.ts +16 -16
- package/dist/types/pv/sim.d.ts +1 -1
- package/dist/types/rules.d.ts +4 -4
- 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 +2 -2
- package/dist/types/scripting/ConsoleUtil.d.ts +1 -1
- package/dist/types/scripting/DisplayWrapper.d.ts +4 -2
- package/dist/types/scripting/FileUtil.d.ts +1 -1
- package/dist/types/scripting/GUIUtil.d.ts +4 -1
- package/dist/types/scripting/Java.d.ts +81 -15
- package/dist/types/scripting/MessageDialog.d.ts +3 -0
- package/dist/types/scripting/PVUtil.d.ts +6 -3
- package/dist/types/scripting/PVWrapper.d.ts +2 -1
- package/dist/types/scripting/ScriptEngine.d.ts +6 -2
- package/dist/types/scripting/ScriptUtil.d.ts +1 -1
- package/dist/types/scripting/SpreadSheetTable.d.ts +9 -2
- package/dist/types/scripting/SpreadSheetTableWrapper.d.ts +30 -0
- package/dist/types/scripting/TableWrapper.d.ts +6 -5
- package/dist/types/scripting/WidgetWrapper.d.ts +5 -2
- package/dist/types/scripting/XYGraphWrapper.d.ts +2 -2
- package/dist/types/scripting/utils.d.ts +4 -3
- package/dist/types/widgets/controls/ActionButton.d.ts +8 -6
- package/dist/types/widgets/controls/BooleanButton.d.ts +6 -6
- package/dist/types/widgets/controls/BooleanSwitch.d.ts +5 -5
- package/dist/types/widgets/controls/CheckBox.d.ts +6 -6
- package/dist/types/widgets/controls/ChoiceButton.d.ts +6 -6
- package/dist/types/widgets/controls/Combo.d.ts +5 -5
- package/dist/types/widgets/controls/ImageBooleanButton.d.ts +5 -5
- package/dist/types/widgets/controls/MenuButton.d.ts +6 -6
- package/dist/types/widgets/controls/NativeButton.d.ts +1 -1
- package/dist/types/widgets/controls/RadioBox.d.ts +6 -6
- package/dist/types/widgets/controls/Scrollbar.d.ts +5 -5
- package/dist/types/widgets/controls/TextInput.d.ts +5 -5
- package/dist/types/widgets/figures/Ramp.d.ts +3 -3
- package/dist/types/widgets/graphics/Arc.d.ts +4 -4
- package/dist/types/widgets/graphics/Ellipse.d.ts +5 -5
- package/dist/types/widgets/graphics/ImageWidget.d.ts +4 -4
- package/dist/types/widgets/graphics/Label.d.ts +5 -5
- package/dist/types/widgets/graphics/Polygon.d.ts +6 -6
- package/dist/types/widgets/graphics/Polyline.d.ts +5 -5
- package/dist/types/widgets/graphics/Rectangle.d.ts +5 -5
- package/dist/types/widgets/graphics/RoundedRectangle.d.ts +5 -5
- package/dist/types/widgets/monitors/ByteMonitor.d.ts +5 -5
- package/dist/types/widgets/monitors/Gauge.d.ts +6 -6
- package/dist/types/widgets/monitors/ImageBooleanIndicator.d.ts +5 -5
- package/dist/types/widgets/monitors/IntensityGraph.d.ts +7 -7
- package/dist/types/widgets/monitors/LED.d.ts +7 -7
- package/dist/types/widgets/monitors/LinearScale.d.ts +4 -4
- package/dist/types/widgets/monitors/Meter.d.ts +6 -6
- package/dist/types/widgets/monitors/ProgressBar.d.ts +6 -6
- package/dist/types/widgets/monitors/Tank.d.ts +6 -6
- package/dist/types/widgets/monitors/TextUpdate.d.ts +5 -5
- package/dist/types/widgets/monitors/Thermometer.d.ts +6 -6
- package/dist/types/widgets/monitors/xygraph/Axis.d.ts +4 -4
- package/dist/types/widgets/monitors/xygraph/CommandBuffer.d.ts +1 -1
- package/dist/types/widgets/monitors/xygraph/PlotAreaRegion.d.ts +4 -4
- package/dist/types/widgets/monitors/xygraph/Trace.d.ts +4 -4
- package/dist/types/widgets/monitors/xygraph/XYGraph.d.ts +10 -10
- package/dist/types/widgets/monitors/xygraph/XYGraphToolbar.d.ts +6 -6
- package/dist/types/widgets/others/AbstractContainerWidget.d.ts +4 -4
- package/dist/types/widgets/others/Connection.d.ts +6 -6
- package/dist/types/widgets/others/DisplayWidget.d.ts +6 -6
- package/dist/types/widgets/others/GroupingContainer.d.ts +3 -3
- package/dist/types/widgets/others/LinkingContainer.d.ts +4 -4
- package/dist/types/widgets/others/TabbedContainer.d.ts +5 -5
- package/dist/types/widgets/others/Table.d.ts +6 -6
- package/dist/types/widgets/others/WebBrowser.d.ts +4 -4
- package/package.json +6 -11
- package/dist/fonts/stylesheet.css +0 -83
- package/dist/opi.umd.js +0 -2
- package/dist/opi.umd.js.map +0 -1
- package/dist/types/pv/formulas/parser.d.ts +0 -10
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { PV } from
|
|
2
|
-
import { PVEngine } from
|
|
1
|
+
import { PV } from "./PV";
|
|
2
|
+
import { PVEngine } from "./PVEngine";
|
|
3
|
+
import { Sample } from "./Sample";
|
|
4
|
+
export type LocalPVType = "VDouble" | "VDoubleArray" | "VString" | "VStringArray";
|
|
3
5
|
export declare class LocalPV extends PV {
|
|
6
|
+
type?: LocalPVType | undefined;
|
|
4
7
|
readonly initializer?: any;
|
|
5
|
-
constructor(name: string, pvEngine: PVEngine, initializer?: any);
|
|
8
|
+
constructor(name: string, pvEngine: PVEngine, type?: LocalPVType | undefined, initializer?: any);
|
|
9
|
+
setSample(sample: Sample): void;
|
|
6
10
|
}
|
package/dist/types/pv/PV.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PVEngine } from
|
|
2
|
-
import { Sample } from
|
|
1
|
+
import { PVEngine } from "./PVEngine";
|
|
2
|
+
import { Sample } from "./Sample";
|
|
3
3
|
export declare class PV {
|
|
4
4
|
readonly name: string;
|
|
5
5
|
readonly pvEngine: PVEngine;
|
|
@@ -52,7 +52,7 @@ export declare class PV {
|
|
|
52
52
|
removeListener(listener: PVListener): void;
|
|
53
53
|
toString(): string | undefined;
|
|
54
54
|
}
|
|
55
|
-
export
|
|
55
|
+
export type PVListener = () => void;
|
|
56
56
|
export declare enum AlarmSeverity {
|
|
57
57
|
NONE = "NONE",
|
|
58
58
|
MINOR = "MINOR",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Display } from
|
|
2
|
-
import { Rule } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { Display } from "../Display";
|
|
2
|
+
import { Rule } from "../rules";
|
|
3
|
+
import { ScriptEngine } from "../scripting/ScriptEngine";
|
|
4
|
+
import { Script } from "../scripts";
|
|
5
|
+
import { Widget } from "../Widget";
|
|
6
|
+
import { AlarmSeverity, PV, PVListener } from "./PV";
|
|
7
|
+
import { PVProvider } from "./PVProvider";
|
|
8
|
+
import { Sample } from "./Sample";
|
|
8
9
|
export declare class PVEngine {
|
|
9
10
|
private display;
|
|
10
11
|
private rules;
|
|
@@ -38,10 +39,19 @@ export declare class PVEngine {
|
|
|
38
39
|
getValue(pvName: string): any;
|
|
39
40
|
setValue(time: Date, pvName: string, value: any, severity?: AlarmSeverity): void;
|
|
40
41
|
setValues(samples: Map<string, Sample>): void;
|
|
41
|
-
createScript(widget: Widget, model: Script, scriptText: string):
|
|
42
|
+
createScript(widget: Widget, model: Script, scriptText: string): ScriptInstance;
|
|
42
43
|
createRule(widget: Widget, model: Rule): void;
|
|
43
44
|
addProvider(provider: PVProvider): void;
|
|
44
45
|
addScriptLibrary(name: string, library: any): void;
|
|
45
46
|
addListener(pvName: string, listener: PVListener, mayTriggerNow?: boolean): void;
|
|
46
47
|
removeListener(pvName: string, listener: PVListener): void;
|
|
47
48
|
}
|
|
49
|
+
declare class ScriptInstance {
|
|
50
|
+
readonly widget: Widget;
|
|
51
|
+
readonly script: Script;
|
|
52
|
+
readonly text: string;
|
|
53
|
+
readonly pvs: PV[];
|
|
54
|
+
scriptEngine: ScriptEngine;
|
|
55
|
+
constructor(widget: Widget, script: Script, text: string, pvs: PV[]);
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type Expression = BinaryExpression | CallExpression | ConditionalExpression | LogicalExpression | UnaryExpression | Literal | Symbol;
|
|
2
|
+
export type Literal = BooleanLiteral | ConstantLiteral | ParameterLiteral | NumericLiteral | StringLiteral;
|
|
3
3
|
export interface Formula {
|
|
4
|
-
type:
|
|
4
|
+
type: "Formula";
|
|
5
5
|
expression: Expression;
|
|
6
6
|
}
|
|
7
7
|
export interface BinaryExpression {
|
|
8
|
-
type:
|
|
9
|
-
operator:
|
|
8
|
+
type: "BinaryExpression";
|
|
9
|
+
operator: "+" | "-" | "*" | "/" | "^" | "%" | "==" | "equals" | "!=" | "<>" | "<=" | ">=" | "<" | ">";
|
|
10
10
|
left: Expression;
|
|
11
11
|
right: Expression;
|
|
12
12
|
}
|
|
13
13
|
export interface CallExpression {
|
|
14
|
-
type:
|
|
14
|
+
type: "CallExpression";
|
|
15
15
|
callee: Symbol;
|
|
16
16
|
arguments: Expression[];
|
|
17
17
|
}
|
|
18
18
|
export interface ConditionalExpression {
|
|
19
|
-
type:
|
|
19
|
+
type: "ConditionalExpression";
|
|
20
20
|
operator: string;
|
|
21
21
|
test: Expression;
|
|
22
22
|
consequent: Expression;
|
|
23
23
|
alternate?: Expression;
|
|
24
24
|
}
|
|
25
25
|
export interface LogicalExpression {
|
|
26
|
-
type:
|
|
26
|
+
type: "LogicalExpression";
|
|
27
27
|
operator: string;
|
|
28
28
|
left: Expression;
|
|
29
29
|
right: Expression;
|
|
30
30
|
}
|
|
31
31
|
export interface UnaryExpression {
|
|
32
|
-
type:
|
|
33
|
-
operator:
|
|
32
|
+
type: "UnaryExpression";
|
|
33
|
+
operator: "+" | "-";
|
|
34
34
|
argument: Expression;
|
|
35
35
|
prefix: boolean;
|
|
36
36
|
}
|
|
37
37
|
export interface BooleanLiteral {
|
|
38
|
-
type:
|
|
38
|
+
type: "BooleanLiteral";
|
|
39
39
|
value: boolean;
|
|
40
40
|
}
|
|
41
41
|
export interface ConstantLiteral {
|
|
42
|
-
type:
|
|
42
|
+
type: "ConstantLiteral";
|
|
43
43
|
value: number;
|
|
44
44
|
}
|
|
45
45
|
export interface ParameterLiteral {
|
|
46
|
-
type:
|
|
46
|
+
type: "ParameterLiteral";
|
|
47
47
|
value: string;
|
|
48
48
|
}
|
|
49
49
|
export interface NumericLiteral {
|
|
50
|
-
type:
|
|
50
|
+
type: "NumericLiteral";
|
|
51
51
|
value: number;
|
|
52
52
|
}
|
|
53
53
|
export interface StringLiteral {
|
|
54
|
-
type:
|
|
54
|
+
type: "StringLiteral";
|
|
55
55
|
value: string;
|
|
56
56
|
}
|
|
57
57
|
export interface Symbol {
|
|
58
|
-
type:
|
|
58
|
+
type: "Symbol";
|
|
59
59
|
name: string;
|
|
60
60
|
}
|
package/dist/types/pv/sim.d.ts
CHANGED
package/dist/types/rules.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Color } from
|
|
1
|
+
import { Color } from "./Color";
|
|
2
2
|
export declare class RuleSet {
|
|
3
3
|
rules: Rule[];
|
|
4
4
|
}
|
|
@@ -9,14 +9,14 @@ export interface Rule {
|
|
|
9
9
|
expressions: BooleanExpression[];
|
|
10
10
|
inputs: RuleInput[];
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type BooleanExpression = StringOutputBooleanExpression | ColorOutputBooleanExpression;
|
|
13
13
|
export interface StringOutputBooleanExpression {
|
|
14
|
-
type:
|
|
14
|
+
type: "string";
|
|
15
15
|
expression: string;
|
|
16
16
|
outputValue: string;
|
|
17
17
|
}
|
|
18
18
|
export interface ColorOutputBooleanExpression {
|
|
19
|
-
type:
|
|
19
|
+
type: "color";
|
|
20
20
|
expression: string;
|
|
21
21
|
outputValue: Color;
|
|
22
22
|
}
|
|
@@ -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,7 +1,9 @@
|
|
|
1
|
-
import { Display } from
|
|
1
|
+
import { Display } from "../Display";
|
|
2
|
+
import { ScriptEngine } from "./ScriptEngine";
|
|
2
3
|
export declare class DisplayWrapper {
|
|
3
4
|
private display;
|
|
4
|
-
|
|
5
|
+
private scriptEngine;
|
|
6
|
+
constructor(display: Display, scriptEngine: ScriptEngine);
|
|
5
7
|
isActive(): boolean;
|
|
6
8
|
getWidget(name: string): import("./WidgetWrapper").WidgetWrapper | undefined;
|
|
7
9
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { Display } from "../Display";
|
|
1
2
|
export declare class GUIUtil {
|
|
3
|
+
private display;
|
|
4
|
+
constructor(display: Display);
|
|
2
5
|
fullScreen(): void;
|
|
3
6
|
openConfirmDialog(message: string): boolean;
|
|
4
7
|
openInformationDialog(message: string): void;
|
|
5
8
|
openWarningDialog(message: string): void;
|
|
6
9
|
openErrorDialog(message: string): void;
|
|
7
|
-
openPasswordDialog(message: string, password: string): boolean
|
|
10
|
+
openPasswordDialog(message: string, password: string): boolean;
|
|
8
11
|
}
|
|
@@ -1,18 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ColorFontUtil } from "./ColorFontUtil";
|
|
2
|
+
import { ConsoleUtil } from "./ConsoleUtil";
|
|
3
|
+
import { DataUtil } from "./DataUtil";
|
|
4
|
+
import { DisplayWrapper } from "./DisplayWrapper";
|
|
5
|
+
import { FileUtil } from "./FileUtil";
|
|
6
|
+
import { GUIUtil } from "./GUIUtil";
|
|
7
|
+
import { MessageDialog } from "./MessageDialog";
|
|
8
|
+
import { PVUtil } from "./PVUtil";
|
|
9
|
+
import { ScriptEngine } from "./ScriptEngine";
|
|
10
|
+
import { ScriptUtil } from "./ScriptUtil";
|
|
11
|
+
export declare function createJavaBridge(scriptEngine: ScriptEngine): {
|
|
12
|
+
display: DisplayWrapper;
|
|
13
|
+
widget: import("./WidgetWrapper").WidgetWrapper;
|
|
14
|
+
java: {
|
|
15
|
+
lang: {
|
|
16
|
+
Runnable: (args: {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}) => void;
|
|
19
|
+
Thread: {
|
|
20
|
+
(runnable: any): void;
|
|
21
|
+
sleep(delay: number): void;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
util: {
|
|
25
|
+
Timer: () => void;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
org: {
|
|
29
|
+
csstudio: {
|
|
30
|
+
swt: {
|
|
31
|
+
widgets: {
|
|
32
|
+
natives: {
|
|
33
|
+
SpreadSheetTable: {
|
|
34
|
+
ITableModifiedListener: (args: {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}) => void;
|
|
37
|
+
ITableSelectionChangedListener: (args: {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}) => void;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
yamcs: {
|
|
46
|
+
studio: {
|
|
47
|
+
data: {
|
|
48
|
+
IPVListener: (args: {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
}) => void;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
ColorFontUtil: ColorFontUtil;
|
|
56
|
+
ConsoleUtil: ConsoleUtil;
|
|
57
|
+
DataUtil: DataUtil;
|
|
58
|
+
FileUtil: FileUtil;
|
|
59
|
+
GUIUtil: GUIUtil;
|
|
60
|
+
MessageDialog: MessageDialog;
|
|
61
|
+
PVUtil: PVUtil;
|
|
62
|
+
ScriptUtil: ScriptUtil;
|
|
63
|
+
SpreadSheetTable: {
|
|
64
|
+
ITableModifiedListener: (args: {
|
|
5
65
|
[key: string]: any;
|
|
6
66
|
}) => void;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
67
|
+
ITableSelectionChangedListener: (args: {
|
|
68
|
+
[key: string]: any;
|
|
69
|
+
}) => void;
|
|
70
|
+
};
|
|
71
|
+
Java: {
|
|
72
|
+
type: (className: string) => ((args: {
|
|
73
|
+
[key: string]: any;
|
|
74
|
+
}) => void) | {
|
|
75
|
+
ITableModifiedListener: (args: {
|
|
76
|
+
[key: string]: any;
|
|
77
|
+
}) => void;
|
|
78
|
+
ITableSelectionChangedListener: (args: {
|
|
79
|
+
[key: string]: any;
|
|
80
|
+
}) => void;
|
|
10
81
|
};
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
type(className: string): ((args: {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
}) => void) | typeof SpreadSheetTable;
|
|
17
|
-
to(jsValue: any, javaType: string): any;
|
|
18
|
-
}
|
|
82
|
+
to: (jsValue: any, javaType: string) => any;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Display } from "../Display";
|
|
1
2
|
export declare class MessageDialog {
|
|
3
|
+
private display;
|
|
4
|
+
constructor(display: Display);
|
|
2
5
|
openInformation(shell: any, title: string, message: string): void;
|
|
3
6
|
openConfirm(shell: any, title: string, message: string): boolean;
|
|
4
7
|
openError(shell: any, title: string, message: string): void;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { PVEngine } from
|
|
2
|
-
import { PVWrapper } from
|
|
1
|
+
import { PVEngine } from "../pv/PVEngine";
|
|
2
|
+
import { PVWrapper } from "./PVWrapper";
|
|
3
|
+
import { WidgetWrapper } from "./WidgetWrapper";
|
|
3
4
|
export declare class PVUtil {
|
|
4
5
|
private pvEngine;
|
|
5
6
|
constructor(pvEngine: PVEngine);
|
|
7
|
+
private checkPVValue;
|
|
8
|
+
createPV(pvName: string, widget: WidgetWrapper): PVWrapper;
|
|
6
9
|
getDouble(pv: PVWrapper): number;
|
|
7
10
|
getLong(pv: PVWrapper): number;
|
|
8
11
|
getString(pv: PVWrapper): string;
|
|
9
12
|
getStringArray(pv: PVWrapper): string[];
|
|
10
13
|
getTimeInMilliseconds(pv: PVWrapper): number;
|
|
11
14
|
getTimeString(pv: PVWrapper, format?: string): string | null;
|
|
12
|
-
getSeverity(pv: PVWrapper):
|
|
15
|
+
getSeverity(pv: PVWrapper): 1 | -1 | 0 | 2;
|
|
13
16
|
getSeverityString(pv: PVWrapper): string;
|
|
14
17
|
getStatus(pv: PVWrapper): string;
|
|
15
18
|
private formatDate;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PV } from
|
|
1
|
+
import { PV } from "../pv/PV";
|
|
2
2
|
export declare class PVWrapper {
|
|
3
3
|
readonly _pv: PV;
|
|
4
4
|
constructor(_pv: PV);
|
|
@@ -7,4 +7,5 @@ export declare class PVWrapper {
|
|
|
7
7
|
setValue(value: any): void;
|
|
8
8
|
isConnected(): boolean;
|
|
9
9
|
isWriteAllowed(): boolean;
|
|
10
|
+
addListener(listener: any): void;
|
|
10
11
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { PV } from
|
|
2
|
-
import { Widget } from
|
|
1
|
+
import { PV } from "../pv/PV";
|
|
2
|
+
import { Widget } from "../Widget";
|
|
3
|
+
export declare function getIframeContentWindow(): Window | null;
|
|
3
4
|
export declare class ScriptEngine {
|
|
5
|
+
readonly widget: Widget;
|
|
4
6
|
readonly scriptText: string;
|
|
5
7
|
private context;
|
|
6
8
|
constructor(widget: Widget, scriptText: string, pvs?: PV[]);
|
|
7
9
|
run(triggerPV?: PV): void;
|
|
10
|
+
schedule(runnable: () => void, ms?: number): void;
|
|
11
|
+
private runWithContext;
|
|
8
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Color } from
|
|
2
|
-
import { Table } from
|
|
1
|
+
import { Color } from "../Color";
|
|
2
|
+
import { Table } from "../widgets/others/Table";
|
|
3
3
|
interface Cell {
|
|
4
4
|
text?: string;
|
|
5
5
|
backgroundColor?: Color;
|
|
@@ -9,7 +9,10 @@ export declare class SpreadSheetTable {
|
|
|
9
9
|
private table;
|
|
10
10
|
private columnCount;
|
|
11
11
|
private cells;
|
|
12
|
+
selectedRowIndex?: number;
|
|
12
13
|
dirty: boolean;
|
|
14
|
+
modifiedListeners: Array<() => void>;
|
|
15
|
+
selectionChangedListeners: Array<() => void>;
|
|
13
16
|
constructor(table: Table);
|
|
14
17
|
isEmpty(): boolean;
|
|
15
18
|
refresh(): void;
|
|
@@ -18,8 +21,12 @@ export declare class SpreadSheetTable {
|
|
|
18
21
|
setContent(content: string[][]): void;
|
|
19
22
|
getColumnCount(): number;
|
|
20
23
|
getRowCount(): number;
|
|
24
|
+
setSelectedRowIndex(index?: number): void;
|
|
25
|
+
getSelection(): (string | null)[][];
|
|
21
26
|
getCellText(row: number, col: number): string | null;
|
|
22
27
|
setColumnsCount(count: number): void;
|
|
28
|
+
addModifiedListener(listener: () => void): void;
|
|
29
|
+
addSelectionChangedListener(listener: () => void): void;
|
|
23
30
|
appendRow(): number;
|
|
24
31
|
deleteRow(index: number): void;
|
|
25
32
|
deleteColumn(index: number): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Color } from "../Color";
|
|
2
|
+
import { ScriptEngine } from "./ScriptEngine";
|
|
3
|
+
import { SpreadSheetTable } from "./SpreadSheetTable";
|
|
4
|
+
export declare class SpreadSheetTableWrapper {
|
|
5
|
+
private spreadsheet;
|
|
6
|
+
private scriptEngine;
|
|
7
|
+
constructor(spreadsheet: SpreadSheetTable, scriptEngine: ScriptEngine);
|
|
8
|
+
addModifiedListener(listener: any): void;
|
|
9
|
+
addSelectionChangedListener(listener: any): void;
|
|
10
|
+
appendRow(): void;
|
|
11
|
+
deleteColumn(index: number): void;
|
|
12
|
+
deleteRow(index: number): void;
|
|
13
|
+
getCellText(row: number, col: number): string | null;
|
|
14
|
+
getColumnCount(): number;
|
|
15
|
+
getContent(): string[][];
|
|
16
|
+
getRowCount(): number;
|
|
17
|
+
getSelection(): (string | null)[][];
|
|
18
|
+
insertColumn(index: number): void;
|
|
19
|
+
insertRow(index: number): void;
|
|
20
|
+
isEmpty(): boolean;
|
|
21
|
+
refresh(): void;
|
|
22
|
+
setCellBackground(row: number, col: number, color: Color): void;
|
|
23
|
+
setCellForeground(row: number, col: number, color: Color): void;
|
|
24
|
+
setCellText(row: number, col: number, text: string): void;
|
|
25
|
+
setColumnCellEditorData(col: number, data: any): void;
|
|
26
|
+
setColumnsCount(count: number): void;
|
|
27
|
+
setContent(content: string[][]): void;
|
|
28
|
+
setRowBackground(row: number, color: Color): void;
|
|
29
|
+
setRowForeground(row: number, color: Color): void;
|
|
30
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Table } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Table } from "../widgets/others/Table";
|
|
2
|
+
import { ScriptEngine } from "./ScriptEngine";
|
|
3
|
+
import { SpreadSheetTableWrapper } from "./SpreadSheetTableWrapper";
|
|
4
|
+
import { WidgetWrapper } from "./WidgetWrapper";
|
|
4
5
|
export declare class TableWrapper extends WidgetWrapper {
|
|
5
6
|
private table;
|
|
6
7
|
private spreadSheetTable;
|
|
7
|
-
constructor(widget: Table);
|
|
8
|
-
getTable():
|
|
8
|
+
constructor(widget: Table, scriptEngine: ScriptEngine);
|
|
9
|
+
getTable(): SpreadSheetTableWrapper;
|
|
9
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Widget } from
|
|
2
|
-
import {
|
|
1
|
+
import { Widget } from "../Widget";
|
|
2
|
+
import { ArrayList } from "./ArrayList";
|
|
3
|
+
import { PVWrapper } from "./PVWrapper";
|
|
3
4
|
/**
|
|
4
5
|
* Exposes the API for the variable "widget" as used in display scripts.
|
|
5
6
|
*/
|
|
@@ -9,6 +10,7 @@ export declare class WidgetWrapper {
|
|
|
9
10
|
executeAction(index: number): void;
|
|
10
11
|
getPVByName(name: string): PVWrapper | null;
|
|
11
12
|
getPV(propertyName?: string): PVWrapper | null;
|
|
13
|
+
getHookedActions(): ArrayList;
|
|
12
14
|
getVar(name: string): any;
|
|
13
15
|
setVar(name: string, value: any): void;
|
|
14
16
|
getPropertyValue(propertyName: string): any;
|
|
@@ -18,6 +20,7 @@ export declare class WidgetWrapper {
|
|
|
18
20
|
setY(y: number): void;
|
|
19
21
|
setWidth(width: number): void;
|
|
20
22
|
setHeight(height: number): void;
|
|
23
|
+
setEnabled(enabled: boolean): void;
|
|
21
24
|
setVisible(visible: boolean): void;
|
|
22
25
|
getValue(): any;
|
|
23
26
|
setValue(value: any): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { XYGraph } from
|
|
2
|
-
import { WidgetWrapper } from
|
|
1
|
+
import { XYGraph } from "../widgets/monitors/xygraph/XYGraph";
|
|
2
|
+
import { WidgetWrapper } from "./WidgetWrapper";
|
|
3
3
|
export declare class XYGraphWrapper extends WidgetWrapper {
|
|
4
4
|
private xyGraph;
|
|
5
5
|
constructor(widget: XYGraph);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { Widget } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { Widget } from "../Widget";
|
|
2
|
+
import { ScriptEngine } from "./ScriptEngine";
|
|
3
|
+
import { WidgetWrapper } from "./WidgetWrapper";
|
|
4
|
+
export declare function wrapWidget(widget: Widget, scriptEngine: ScriptEngine): WidgetWrapper;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { Action } from "../../actions/Action";
|
|
2
|
+
import { Color } from "../../Color";
|
|
3
|
+
import { Display } from "../../Display";
|
|
4
|
+
import { Font } from "../../Font";
|
|
5
|
+
import { Graphics } from "../../Graphics";
|
|
6
|
+
import { Widget } from "../../Widget";
|
|
7
|
+
import { AbstractContainerWidget } from "../others/AbstractContainerWidget";
|
|
7
8
|
export declare class ActionButton extends Widget {
|
|
8
9
|
private areaRegion?;
|
|
9
10
|
private pushed;
|
|
@@ -12,6 +13,7 @@ export declare class ActionButton extends Widget {
|
|
|
12
13
|
constructor(display: Display, parent: AbstractContainerWidget);
|
|
13
14
|
init(): void;
|
|
14
15
|
draw(g: Graphics): void;
|
|
16
|
+
getHookedActions(): Action[];
|
|
15
17
|
get font(): Font;
|
|
16
18
|
get image(): string;
|
|
17
19
|
get toggleButton(): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Color } from
|
|
2
|
-
import { Display } from
|
|
3
|
-
import { Font } from
|
|
4
|
-
import { Graphics } from
|
|
5
|
-
import { Widget } from
|
|
6
|
-
import { AbstractContainerWidget } from
|
|
1
|
+
import { Color } from "../../Color";
|
|
2
|
+
import { Display } from "../../Display";
|
|
3
|
+
import { Font } from "../../Font";
|
|
4
|
+
import { Graphics } from "../../Graphics";
|
|
5
|
+
import { Widget } from "../../Widget";
|
|
6
|
+
import { AbstractContainerWidget } from "../others/AbstractContainerWidget";
|
|
7
7
|
export declare class BooleanButton extends Widget {
|
|
8
8
|
private hovered;
|
|
9
9
|
private manualToggleState;
|