Skip to content

Commit

Permalink
move pvws message interface out into new file
Browse files Browse the repository at this point in the history
  • Loading branch information
rerpha committed Sep 12, 2024
1 parent 71fc1b4 commit ec6d9c3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
20 changes: 20 additions & 0 deletions app/components/IfcPVWSMessage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export interface PVWSMessage {
type: string;
pv: string;
value?: number | null;
text?: string | null;
b64byt?: string | null;
units?: string | null;
precision?: number | null;
labels?: string | null;
min?: number | null;
max?: number | null;
warn_low?: number | null;
warn_high?: number | null;
alarm_low?: number | null;
alarm_high?: number | null;
severity?: string | null;
seconds?: number | null;
readonly?: boolean | null;
nanos?: number | null;
}
22 changes: 1 addition & 21 deletions app/components/InstrumentData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,10 @@ import useWebSocket from "react-use-websocket";
import { dehex_and_decompress } from "./dehex_and_decompress";
import { Instrument } from "./Instrument";
import {PV} from "./PV";
import { PVWSMessage } from "./IfcPVWSMessage";

let lastUpdate: string = "";

interface PVWSMessage {
type: string;
pv: string;
value?: number|null;
text?: string|null;
b64byt?: string|null;
units?: string|null;
precision?: number|null;
labels?: string|null;
min?: number|null;
max?: number|null;
warn_low?: number|null;
warn_high?: number|null;
alarm_low?: number|null;
alarm_high?: number|null;
severity?: string|null;
seconds?: number|null;
readonly?: boolean|null;
nanos?: number|null;
}

export default function InstrumentData({instrumentName}: {instrumentName:string} ) {
// set up the different states for the instrument data

Expand Down

0 comments on commit ec6d9c3

Please sign in to comment.