Class WinccoaAlertTime

Time of the alarm, with extra index for several simultaneous alarms

Constructors

Properties

Constructors

  • Constructor.

    Parameters

    • date: Date

      Time of alarm occurrence

    • count: number

      Serial number

    • dpe: string

      Data point element name

    Returns WinccoaAlertTime

    See

    Example

    TypeScript

    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',
    );
    }

    JavaScript

    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',
    );
    }

Properties

count: number

Serial number

date: Date

Time of alarm occurrence

dpe: string

Data point element name