How to use the node-opcua.constructEventFilter function in node-opcua

To help you get started, we’ve selected a few node-opcua examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-samples / bin / simple_client.js View on Github external
// AlarmConditionType
            "ActiveState",
            "InputNode",
            "SuppressedState",

            "HighLimit",
            "LowLimit",
            "HighHighLimit",
            "LowLowLimit",

            "Value"
        ];


        const eventFilter = opcua.constructEventFilter(fields,[opcua.resolveNodeId("ConditionType")]);

        const event_monitoringItem = the_subscription.monitor(
            {
                nodeId:      serverObjectId,
                attributeId: AttributeIds.EventNotifier
            },
            {
                queueSize: 100000,
                filter: eventFilter,
                discardOldest: true
            }
        );

        event_monitoringItem.on("initialized", function () {
            console.log("event_monitoringItem initialized");
            callback();
github node-opcua / node-opcua / packages / node-opcua-samples / bin / simple_client.js View on Github external
// AlarmConditionType
            "ActiveState",
            "InputNode",
            "SuppressedState",

            "HighLimit",
            "LowLimit",
            "HighHighLimit",
            "LowLowLimit",

            "Value"
        ];


        const eventFilter = opcua.constructEventFilter(fields, [opcua.resolveNodeId("ConditionType")]);

        const event_monitoringItem = the_subscription.monitor(
            {
                nodeId: serverObjectId,
                attributeId: AttributeIds.EventNotifier
            },
            {
                queueSize: 100000,
                filter: eventFilter,
                discardOldest: true
            }
        );

        event_monitoringItem.on("initialized", function () {
            console.log("event_monitoringItem initialized");
            callback();
github node-opcua / node-opcua / packages / node-opcua-samples / bin / simple_client_ts.ts View on Github external
"ConfirmedState",

        // AlarmConditionType
        "ActiveState",
        "InputNode",
        "SuppressedState",

        "HighLimit",
        "LowLimit",
        "HighHighLimit",
        "LowLowLimit",

        "Value"
    ];

    const eventFilter = constructEventFilter(fields, [
        resolveNodeId("ConditionType")
    ]);

    const event_monitoringItem = ClientMonitoredItem.create(
        the_subscription,
        {
            attributeId: AttributeIds.EventNotifier,
            nodeId: serverObjectId
        },
        {
            discardOldest: true,
            filter: eventFilter,
            queueSize: 100000
        }
    );