node-red-contrib-opcua
Version:
A Node-RED node to communicate via OPC UA based on node-opcua library.
72 lines (56 loc) • 2.48 kB
HTML
<!--
Copyright 2015 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-Browser', {
category: 'opcua',
color: "#3FADB5",
defaults: {
endpoint: {value: "", required: true, type: "OpcUa-Endpoint"},
item: {value: ""},
datatype: {value: ""},
topic: {value: ""},
items: {value: []},
name: {value: ""}
},
inputs: 1,
outputs: 1,
align: "right",
icon: "opcuanodeLogo.png",
label: function () {
return this.item || "OPC UA Browser";
},
labelStyle: function () {
return this.item ? "node_label_italic" : "";
}
});
</script>
<script type="text/x-red" data-template-name="OpcUa-Browser">
<div class="form-row" style="min-width:640px">
<label for="node-input-endpoint"><i class="icon-bookmark"></i> Endpoint</label>
<input type="text" id="node-input-endpoint">
</div>
<div class="form-row">
<label for="node-input-topic"><i class="icon-search"></i> Topic</label>
<input type="text" id="node-input-topic" placeholder="ns=0;i=85">
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-search"></i> Name</label>
<input type="text" id="node-input-name" placeholder="OPC UA Browser">
</div>
</script>
<script type="text/x-red" data-help-name="OpcUa-Browser">
<p>Connect to an endpoint: opc.tcp://host:port/UA/EndpointName</p>
<p><strong>Inject</strong> a Timestamp or fill <strong>topic</strong> of <strong>msg</strong> object to browse.</p>
<p>Browsers <strong>Topic</strong> field is to define one browsable OPC UA Item address like ns=0;i=85</p>
<p><strong>Payload</strong> contains just references of the give OPC UA address.</p>
</script>