lib/simulation/address_space_for_conformance_testing.js
// add 2 nodes that generate an event when ever they are written to.
add 2 nodes that generate an event when ever they are written to.
add 2 nodes that generate an event when ever they are written to .
function _add_trigger_node(browseName, nodeId) {
        var triggerNode = addressSpace.addVariable({
            browseName: browseName,
            nodeId: nodeId,
            organizedBy: parentFolder,
            dataType: "Double",
            typeDefinition: makeNodeId(68)
        });
        var value = 100.0;
        var getFunc = function () {
            return new Variant({
                dataType: DataType.Double,
                value: value
            });
        };
        var setFunc = function (variant) {
            value = variant.value;
            var server = addressSpace.rootFolder.objects.server;
            server.raiseEvent("MyEventType", {
                message: {
                    dataType: DataType.LocalizedText,
                    value: {text: "Hello World"}
                },
                severity: {
                    dataType: DataType.UInt32,
                    value: 32
                }
            });
        };
        var options = {
            get: getFunc,
            set: setFunc
        };
        triggerNode.bindVariable(options);
    }
function _add_trigger_node ( browseName , nodeId ) { var triggerNode = addressSpace . addVariable ( { browseName : browseName , nodeId : nodeId , organizedBy : parentFolder , dataType : "Double" , typeDefinition : makeNodeId ( 68 ) } ) ; var value = 100.0 ; var getFunc = function ( ) { return new Variant ( { dataType : DataType . Double , value : value } ) ; } ; var setFunc = function ( variant ) { value = variant . value ; var server = addressSpace . rootFolder . objects . server ; server . raiseEvent ( "MyEventType" , { message : { dataType : DataType . LocalizedText , value : { text : "Hello World" } } , severity : { dataType : DataType . UInt32 , value : 32 } } ) ; } ; var options = { get : getFunc , set : setFunc } ; triggerNode . bindVariable ( options ) ; }
add 2 nodes that generate an event when ever they are written to.
add 2 nodes that generate an event when ever they are written to .