@yamcs/opi 1.2.13 → 1.2.14
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/dist/opi.js +1 -1
- package/dist/opi.js.map +1 -1
- package/dist/types/Display.d.ts +3 -3
- package/dist/types/Graphics.d.ts +2 -2
- package/dist/types/HitCanvas.d.ts +1 -1
- package/dist/types/index.d.ts +4 -2
- package/dist/types/positioning.d.ts +4 -0
- package/dist/types/pv/HistoricalDataProvider.d.ts +9 -0
- package/dist/types/pv/PVEngine.d.ts +1 -0
- package/dist/types/pv/PVProvider.d.ts +2 -0
- package/dist/types/scripting/XYGraphWrapper.d.ts +1 -1
- package/dist/types/widgets/monitors/xygraph/Trace.d.ts +5 -3
- package/dist/types/widgets/monitors/xygraph/TraceBuffer.d.ts +4 -6
- package/dist/types/widgets/monitors/xygraph/XYGraph.d.ts +1 -0
- package/package.json +3 -3
package/dist/types/Display.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ConsoleHandler } from "./ConsoleHandler";
|
|
2
2
|
import { DialogHandler } from "./DialogHandler";
|
|
3
|
-
import { OPIEvent, OPIEventMap } from "./events";
|
|
4
3
|
import { FontResolver } from "./FontResolver";
|
|
5
4
|
import { PathResolver } from "./PathResolver";
|
|
5
|
+
import { Widget } from "./Widget";
|
|
6
|
+
import { OPIEvent, OPIEventMap } from "./events";
|
|
6
7
|
import { Bounds } from "./positioning";
|
|
7
8
|
import { PVEngine } from "./pv/PVEngine";
|
|
8
9
|
import { PVProvider } from "./pv/PVProvider";
|
|
9
10
|
import { Sample } from "./pv/Sample";
|
|
10
|
-
import { Widget } from "./Widget";
|
|
11
11
|
import { ActionButton } from "./widgets/controls/ActionButton";
|
|
12
12
|
import { BooleanButton } from "./widgets/controls/BooleanButton";
|
|
13
13
|
import { BooleanSwitch } from "./widgets/controls/BooleanSwitch";
|
|
@@ -133,7 +133,7 @@ export declare class Display {
|
|
|
133
133
|
findWidget(wuid: string): Widget | undefined;
|
|
134
134
|
findWidgetByName(name: string): Widget | undefined;
|
|
135
135
|
getPVNames(): string[];
|
|
136
|
-
getPV(pvName: string): import("
|
|
136
|
+
getPV(pvName: string): import("./index").PV | undefined;
|
|
137
137
|
setValues(samples: Map<string, Sample>): void;
|
|
138
138
|
copyCanvas(area?: Bounds): HTMLCanvasElement;
|
|
139
139
|
/**
|
package/dist/types/Graphics.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Color } from "./Color";
|
|
|
2
2
|
import { Font } from "./Font";
|
|
3
3
|
import { HitCanvas } from "./HitCanvas";
|
|
4
4
|
import { HitRegionSpecification } from "./HitRegionSpecification";
|
|
5
|
-
import { Bounds,
|
|
5
|
+
import { Bounds, NullablePoint } from "./positioning";
|
|
6
6
|
interface RectColorFill {
|
|
7
7
|
x: number;
|
|
8
8
|
y: number;
|
|
@@ -155,7 +155,7 @@ interface PathSegment {
|
|
|
155
155
|
export declare class Path {
|
|
156
156
|
segments: PathSegment[];
|
|
157
157
|
constructor(x: number, y: number);
|
|
158
|
-
static fromPoints(points:
|
|
158
|
+
static fromPoints(points: NullablePoint[]): Path;
|
|
159
159
|
getBoundingBox(): Bounds;
|
|
160
160
|
lineTo(x: number, y: number): this;
|
|
161
161
|
moveTo(x: number, y: number): this;
|
|
@@ -2,7 +2,7 @@ import { HitRegionSpecification } from "./HitRegionSpecification";
|
|
|
2
2
|
export declare class HitCanvas {
|
|
3
3
|
private parent?;
|
|
4
4
|
readonly ctx: CanvasRenderingContext2D;
|
|
5
|
-
private
|
|
5
|
+
private regionsByColor;
|
|
6
6
|
private root?;
|
|
7
7
|
constructor(parent?: HitCanvas | undefined, width?: number, height?: number);
|
|
8
8
|
clear(): void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,8 +4,10 @@ export { Display } from "./Display";
|
|
|
4
4
|
export { Font } from "./Font";
|
|
5
5
|
export { FontResolver } from "./FontResolver";
|
|
6
6
|
export { DefaultPathResolver, PathResolver } from "./PathResolver";
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
7
|
+
export { NullablePoint, Point } from "./positioning";
|
|
8
|
+
export { HistoricalDataProvider } from "./pv/HistoricalDataProvider";
|
|
9
9
|
export { AlarmSeverity, PV } from "./pv/PV";
|
|
10
10
|
export { PVProvider } from "./pv/PVProvider";
|
|
11
11
|
export { Sample } from "./pv/Sample";
|
|
12
|
+
export { CompiledFormula, DataSourceStatus } from "./pv/formulas/CompiledFormula";
|
|
13
|
+
export { FormulaCompiler } from "./pv/formulas/FormulaCompiler";
|
|
@@ -8,6 +8,10 @@ export interface Point {
|
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
10
10
|
}
|
|
11
|
+
export interface NullablePoint {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number | null;
|
|
14
|
+
}
|
|
11
15
|
/**
|
|
12
16
|
* Sets the specified attributes assuming they use border-box
|
|
13
17
|
* coordinates. This is effectively the same as shrinking by
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NullablePoint } from "../positioning";
|
|
2
|
+
export interface HistoricalDataProvider {
|
|
3
|
+
/**
|
|
4
|
+
* Get samples for a parameter. This will be merged with the realtime data of a widget that supports it.
|
|
5
|
+
* This method is called very often. Any time management is to be handled outside of this library.
|
|
6
|
+
*/
|
|
7
|
+
getSamples(): NullablePoint[];
|
|
8
|
+
disconnect(): void;
|
|
9
|
+
}
|
|
@@ -33,6 +33,7 @@ export declare class PVEngine {
|
|
|
33
33
|
getPV(pvName: string): PV | undefined;
|
|
34
34
|
disconnectAll(): void;
|
|
35
35
|
createPV(pvName: string): PV;
|
|
36
|
+
createHistoricalDataProvider(pvName: string): void | import("./HistoricalDataProvider").HistoricalDataProvider;
|
|
36
37
|
requestRepaint(): void;
|
|
37
38
|
private createLocalPV;
|
|
38
39
|
private initializerEquals;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { HistoricalDataProvider } from "./HistoricalDataProvider";
|
|
1
2
|
import { PV } from "./PV";
|
|
2
3
|
export interface PVProvider {
|
|
3
4
|
canProvide(pvName: string): boolean;
|
|
4
5
|
startProviding(pvs: PV[]): void;
|
|
5
6
|
stopProviding(pvs: PV[]): void;
|
|
6
7
|
isNavigable(): boolean;
|
|
8
|
+
createHistoricalDataProvider?(pvName: string): HistoricalDataProvider | void;
|
|
7
9
|
shutdown(): void;
|
|
8
10
|
}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { Color } from "../../../Color";
|
|
2
2
|
import { Graphics } from "../../../Graphics";
|
|
3
|
-
import { Point } from "../../../positioning";
|
|
3
|
+
import { NullablePoint, Point } from "../../../positioning";
|
|
4
4
|
import { XYGraph } from "./XYGraph";
|
|
5
5
|
export declare class Trace {
|
|
6
6
|
private widget;
|
|
7
7
|
private i;
|
|
8
8
|
private traceData?;
|
|
9
|
+
private historicalDataProvider?;
|
|
9
10
|
private xPVInstance?;
|
|
10
11
|
private yPVInstance?;
|
|
11
12
|
private xPVListener;
|
|
12
13
|
private yPVListener;
|
|
13
14
|
constructor(widget: XYGraph, i: number);
|
|
14
15
|
init(): void;
|
|
15
|
-
snapshot():
|
|
16
|
-
drawTrace(g: Graphics, points:
|
|
16
|
+
snapshot(): NullablePoint[];
|
|
17
|
+
drawTrace(g: Graphics, points: NullablePoint[]): void;
|
|
17
18
|
drawPoint(g: Graphics, point: Point): void;
|
|
18
19
|
clearData(): void;
|
|
19
20
|
get scale(): number;
|
|
@@ -35,4 +36,5 @@ export declare class Trace {
|
|
|
35
36
|
get xPV(): string;
|
|
36
37
|
get yAxisIndex(): number;
|
|
37
38
|
get yPV(): string;
|
|
39
|
+
destroy(): void;
|
|
38
40
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
}
|
|
1
|
+
import { HistoricalDataProvider } from "../../../pv/HistoricalDataProvider";
|
|
5
2
|
export declare class TraceBuffer {
|
|
6
3
|
private bufferSize;
|
|
7
4
|
private plotMode;
|
|
8
5
|
private updateMode;
|
|
9
6
|
private concatenateData;
|
|
10
7
|
private chronological;
|
|
8
|
+
private historicalDataProvider;
|
|
11
9
|
private traceData;
|
|
12
10
|
private x;
|
|
13
11
|
private xPending;
|
|
@@ -18,9 +16,9 @@ export declare class TraceBuffer {
|
|
|
18
16
|
private xArrayPending;
|
|
19
17
|
private yArray;
|
|
20
18
|
private yArrayPending;
|
|
21
|
-
constructor(bufferSize: number, plotMode: number, updateMode: number, concatenateData: boolean, chronological: boolean);
|
|
19
|
+
constructor(bufferSize: number, plotMode: number, updateMode: number, concatenateData: boolean, chronological: boolean, historicalDataProvider: HistoricalDataProvider | undefined);
|
|
22
20
|
clear(): void;
|
|
23
|
-
snapshot():
|
|
21
|
+
snapshot(): import("../../../positioning").NullablePoint[];
|
|
24
22
|
updateX(x: number): void;
|
|
25
23
|
updateY(y: number, timestamp?: number): void;
|
|
26
24
|
updateXArray(xArray: number[]): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamcs/opi",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.14",
|
|
4
4
|
"description": "OPI Display Renderer",
|
|
5
5
|
"author": "Yamcs Team <yamcs@spaceapplications.com>",
|
|
6
6
|
"repository": {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"express": "^4.18.1",
|
|
29
29
|
"morgan": "^1.10.0",
|
|
30
30
|
"nunjucks": "^3.2.2",
|
|
31
|
-
"peggy": "
|
|
31
|
+
"peggy": "4.0.2",
|
|
32
32
|
"rollup": "^4.12.0",
|
|
33
33
|
"rollup-plugin-copy": "^3.3.0",
|
|
34
|
-
"rollup-plugin-typescript2": "^0.
|
|
34
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
35
35
|
"typescript": "^5.1.3"
|
|
36
36
|
}
|
|
37
37
|
}
|