![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
node-opcua
Advanced tools
an implementation of a OPC UA stack fully written in javascript and nodejs
node-opcua is an experimental OPC-UA stack written in NodeJS.
Why NodeJS ?
Because nodeJs is a great framework to design asynchronous application.
$ npm install node-opcua
install pre-requisite:
$ npm install async node-opcua
create a file myfirstclient.js
and add the following code :
var opcua = require("node-opcua");
var async = require("async");
var client = new opcua.OPCUAClient();
var endpointUrl = "opc.tcp://" + require("os").hostname() + ":4841";
var the_session = null;
async.series([
// step 1 : connect to
function(callback) {
client.connect(endpointUrl,function (err) {
if(err) {
console.log(" cannot connect to endpoint :" , endpointUrl );
} else {
console.log("connected !");
}
callback(err);
});
},
// step 2 : createSession
function(callback) {
client.createSession( function(err,session) {
if(!err) {
the_session = session;
}
callback(err);
});
},
// step 3 : browse
function(callback) {
the_session.browse("RootFolder", function(err,browse_result,diagnostics){
if(!err) {
browse_result[0].references.forEach(function(reference) {
console.log( reference.browseName);
});
}
callback(err);
});
},
// step 4 : read a variable
function(callback) {
the_session.readVariableValue("ns=2;s=Furnace_1.Temperature", function(err,dataValues,diagnostics) {
if (!err) {
console.log(" temperature = " , dataValues[0].value.value);
}
callback(err);
})
},
], function(err) {
if (err) {
console.log(" failure ",err);
} else {
console.log("done!")
}
// disconnect regardless
client.disconnect(function(){});
}) ;
now run it
$ node myfirstclient.js
$ git clone git://github.com/node-opcua/node-opcua.git node-opcua
$ cd node-opcua
$ npm install
$ npm test
FAQs
pure nodejs OPCUA SDK - module node-opcua
The npm package node-opcua receives a total of 8,967 weekly downloads. As such, node-opcua popularity was classified as popular.
We found that node-opcua demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.