Constructor.
Time of alarm occurrence
Serial number
Data point element name
import { WinccoaManager, WinccoaAlertTime } from 'winccoa-manager';
const winccoa = new WinccoaManager();
async function alertTest() {
const dpeWithAlert = 'ExampleDP_AlertHdl1.'; // assuming alert is triggered
const result = await winccoa.dpQuery(
"SELECT ALERT '_alert_hdl.._act_state', '_alert_hdl.._value' FROM '" +
dpeWithAlert +
"'",
);
const ts = result[result.length - 1][1] as WinccoaAlertTime;
const alertTime = new WinccoaAlertTime(
ts.date,
ts.count,
ts.dpe + '._comment',
);
}
const { WinccoaManager, WinccoaAlertTime } = require('winccoa-manager');
const winccoa = new WinccoaManager();
async function alertTest() {
const dpeWithAlert = 'ExampleDP_AlertHdl1.'; // assuming alert is triggered
const result = await winccoa.dpQuery(
"SELECT ALERT '_alert_hdl.._act_state', '_alert_hdl.._value' FROM '" +
dpeWithAlert +
"'",
);
const ts = result[result.length - 1][1];
const alertTime = new WinccoaAlertTime(
ts.date,
ts.count,
ts.dpe + '._comment',
);
}
Time of the alarm, with extra index for several simultaneous alarms