node-opcua-extension-object
Advanced tools
Comparing version 0.3.0 to 0.4.0
{ | ||
"name": "node-opcua-extension-object", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "pure nodejs OPCUA SDK - module -extension-object", | ||
@@ -10,6 +10,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"node-opcua-assert": "^0.3.0", | ||
"node-opcua-basic-types": "^0.3.0", | ||
"node-opcua-factory": "^0.3.0", | ||
"node-opcua-nodeid": "^0.3.0" | ||
"node-opcua-assert": "^0.4.0", | ||
"node-opcua-basic-types": "^0.4.0", | ||
"node-opcua-factory": "^0.4.0", | ||
"node-opcua-nodeid": "^0.4.0" | ||
}, | ||
@@ -16,0 +16,0 @@ "author": "Etienne Rossignon", |
@@ -109,3 +109,20 @@ "use strict"; | ||
} | ||
object.decode(stream); | ||
// let verify that decode will use the expected number of bytes | ||
const streamLengthBefore = stream.length; | ||
try { | ||
object.decode(stream); | ||
} | ||
catch(err) { | ||
console.log("Cannot decode object ",err.message); | ||
} | ||
if (streamLengthBefore + length !== stream.length) { | ||
// this may happen if the server or client do have a different OPCUA version | ||
// for instance SubscriptionDiagnostics structure has been changed between OPCUA version 1.01 and 1.04 | ||
// causing 2 extra member to be added. | ||
console.log("=========================================".bgWhite.red); | ||
console.warn("WARNING => Extension object decoding error on ",object.constructor.name," expected size was", length, "actual size was ", stream.length - streamLengthBefore); | ||
stream.length = streamLengthBefore + length; | ||
} | ||
return object; | ||
@@ -116,2 +133,4 @@ } | ||
exports.encodeExtensionObject =encodeExtensionObject; | ||
exports.decodeExtensionObject =decodeExtensionObject; | ||
@@ -118,0 +137,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7076
114
+ Addedlong@4.0.0(transitive)
+ Addednode-opcua-assert@0.4.6(transitive)
+ Addednode-opcua-basic-types@0.4.6(transitive)
+ Addednode-opcua-binary-stream@0.4.6(transitive)
+ Addednode-opcua-buffer-utils@0.4.6(transitive)
+ Addednode-opcua-constants@0.4.2(transitive)
+ Addednode-opcua-date-time@0.4.6(transitive)
+ Addednode-opcua-debug@0.4.6(transitive)
+ Addednode-opcua-enum@0.4.6(transitive)
+ Addednode-opcua-factory@0.4.6(transitive)
+ Addednode-opcua-guid@0.4.6(transitive)
+ Addednode-opcua-nodeid@0.4.6(transitive)
+ Addednode-opcua-status-code@0.4.6(transitive)
+ Addednode-opcua-utils@0.4.6(transitive)
- Removednode-opcua-assert@0.3.0(transitive)
- Removednode-opcua-basic-types@0.3.0(transitive)
- Removednode-opcua-binary-stream@0.3.0(transitive)
- Removednode-opcua-buffer-utils@0.3.0(transitive)
- Removednode-opcua-constants@0.2.0(transitive)
- Removednode-opcua-date-time@0.3.0(transitive)
- Removednode-opcua-debug@0.3.0(transitive)
- Removednode-opcua-enum@0.3.0(transitive)
- Removednode-opcua-factory@0.3.0(transitive)
- Removednode-opcua-guid@0.3.0(transitive)
- Removednode-opcua-nodeid@0.3.0(transitive)
- Removednode-opcua-status-code@0.3.0(transitive)
- Removednode-opcua-utils@0.3.0(transitive)
Updatednode-opcua-assert@^0.4.0
Updatednode-opcua-factory@^0.4.0
Updatednode-opcua-nodeid@^0.4.0