UNPKG

node-red-contrib-opcua

Version:

A Node-RED node to communicate via OPC UA based on node-opcua library.

69 lines (61 loc) 2.88 kB
<!-- Copyright 2016 Valmet Automation Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <script type="text/javascript"> RED.nodes.registerType('OpcUa-Event',{ category: 'opcua', color:"#3FADB5", defaults: { root: {value:"", required:true}, // ns=2;i=85 Server object to look through all objects under it eventtype: {value:"", required:true}, // TODO ui should contain selectable condition types or all name: {value:""} }, inputs:1, outputs:1, align: "right", icon: "opcuanodeLogo.png", label: function() { return this.name || "OPC UA Event"; }, labelStyle: function() { return this.name?"node_label_italic":""; } }); </script> <script type="text/x-red" data-template-name="OpcUa-Event"> <div class="form-row"> <label for="node-input-root"><i class="icon-tasks"></i> Root node</label> <input type="text" id="node-input-root" placeholder="i=2253"> </div> <div class="form-row" id="node-input-eventtype-row"> <label for="node-input-datatype"><i class="icon-tag"></i> Event Type</label> <select type="text" id="node-input-eventtype" style="display: inline-block; vertical-align: middle; width:60%;"> <option selected disabled value="" >Choose a Event Type</option> <option selected value="i=2041">BaseEvent (all)</option> <option value="i=2052">AuditEvent</option> <option value="i=2132">BaseModelChangeEvent</option> <option value="i=2782">ConditionType</option> <option value="i=3035">Event Queue Overflow</option> <option value="i=11436">Progress Event</option> <option value="i=2130">System Event</option> </select> </div> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder=""> </div> </script> <script type="text/x-red" data-help-name="OpcUa-Event"> <p>Defines OPC UA events that will be subscribed from the server.</p> <p>Server root node will used to look selected events under it.</p> <p>Condition type can be left empty then all alarm / event objects will be taken into account.</p> </script>