Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-opcua-generator

Package Overview
Dependencies
Maintainers
1
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-generator - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

test/extension_object/test_extension_object.js

0

index.js
exports.registerObject = require("./src/generator").registerObject;
exports.unregisterObject = require("./src/generator").unregisterObject;

20

package.json
{
"name": "node-opcua-generator",
"version": "0.2.1",
"version": "0.2.2",
"description": "pure nodejs OPCUA SDK - module -generator",

@@ -11,15 +11,15 @@ "main": "index.js",

"node-opcua-assert": "^0.2.0",
"node-opcua-basic-types": "^0.2.1",
"node-opcua-basic-types": "^0.2.2",
"node-opcua-constants": "^0.2.0",
"node-opcua-debug": "^0.2.0",
"node-opcua-factory": "^0.2.1",
"node-opcua-nodeid": "^0.2.0",
"node-opcua-utils": "^0.2.1",
"node-opcua-debug": "^0.2.2",
"node-opcua-factory": "^0.2.2",
"node-opcua-nodeid": "^0.2.2",
"node-opcua-utils": "^0.2.2",
"underscore": "^1.8.3"
},
"devDependencies": {
"node-opcua-binary-stream": "^0.2.1",
"node-opcua-extension-object": "^0.2.1",
"node-opcua-packet-analyzer": "^0.2.1",
"node-opcua-status-code": "^0.2.1",
"node-opcua-binary-stream": "^0.2.2",
"node-opcua-extension-object": "^0.2.2",
"node-opcua-packet-analyzer": "^0.2.2",
"node-opcua-status-code": "^0.2.2",
"should": "13.2.1"

@@ -26,0 +26,0 @@ },

@@ -108,2 +108,15 @@ "use strict";

function write_complex_fast_construct(f, schema, field, member/*, i*/) {
assert(f instanceof LineFile);
function write() {
f.write.apply(f, arguments);
}
if (field.isArray) {
write(" self." + member + " = null; /* null array */");
} else {
write(" self." + member + " = null; /* new " + field.fieldType + "(null); */");
}
}
function write_complex(f, schema, field, member/*, i*/) {

@@ -374,3 +387,2 @@

write(" options = schema.construct_hook(options); ");
}

@@ -381,4 +393,30 @@ if (baseclass) {

// -----------------------------------------------------------------------------------------------------------------
// Special case when options === null => fast constructor for deserialization
// -----------------------------------------------------------------------------------------------------------------
write(" if (options === null) { ");
if (baseclass) {
write(" " + baseclass + ".call(this,options);");
}
for (i = 0; i < n; i++) {
field = schema.fields[i];
fieldType = field.fieldType;
member = field.name;
__member = "__" + member;
if (field.category === "enumeration") {
//xx write_enumeration(f, schema, field, member, i);
} else if (field.category === "complex") {
write_complex_fast_construct(f, schema, field, member, i);
} else {
//xx write_basic(f, schema, field, member, i);
}
}
write(" return ;");
write(" }");
// -----------------------------------------------------------------------------------------------------------------
for (i = 0; i < n; i++) {
field = schema.fields[i];

@@ -603,3 +641,3 @@

write(" this." + member + " = decodeArray(stream, function(stream) { ");
write(" var obj = new " + field.fieldType + "();");
write(" var obj = new " + field.fieldType + "(null);");
write(" obj.decode(stream,options);");

@@ -606,0 +644,0 @@ write(" return obj; ");

@@ -0,0 +0,0 @@ "use strict";

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc