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

node-opcua-service-write

Package Overview
Dependencies
Maintainers
1
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-service-write - npm Package Compare versions

Comparing version 0.2.3 to 0.3.0

63

_generated_/_auto_generated_WriteRequest.js

@@ -1,2 +0,2 @@

// --------- This code has been automatically generated !!! 2018-02-08T07:25:28.526Z
// --------- This code has been automatically generated !!! 2018-04-16T04:56:48.215Z
"use strict";

@@ -6,24 +6,24 @@ /**

*/
var assert = require("node-opcua-assert");
var util = require("util");
var _ = require("underscore");
var makeNodeId = require("node-opcua-nodeid").makeNodeId;
var schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
var extract_all_fields = schema_helpers.extract_all_fields;
var resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
var initialize_field = schema_helpers.initialize_field;
var initialize_field_array = schema_helpers.initialize_field_array;
var check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
var _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
var ec = require("node-opcua-basic-types");
var encodeArray = ec.encodeArray;
var decodeArray = ec.decodeArray;
var makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
var generate_new_id = require("node-opcua-factory").generate_new_id;
var _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
var schema = require("../schemas/WriteRequest_schema").WriteRequest_Schema;
var getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
var RequestHeader = getFactory("RequestHeader");
var WriteValue = require("./_auto_generated_WriteValue").WriteValue;
var BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;
const assert = require("node-opcua-assert").assert;
const util = require("util");
const _ = require("underscore");
const makeNodeId = require("node-opcua-nodeid").makeNodeId;
const schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
const extract_all_fields = schema_helpers.extract_all_fields;
const resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
const initialize_field = schema_helpers.initialize_field;
const initialize_field_array = schema_helpers.initialize_field_array;
const check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
const _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
const ec = require("node-opcua-basic-types");
const encodeArray = ec.encodeArray;
const decodeArray = ec.decodeArray;
const makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
const generate_new_id = require("node-opcua-factory").generate_new_id;
const _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
const schema = require("../schemas/WriteRequest_schema").WriteRequest_Schema;
const getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
const RequestHeader = getFactory("RequestHeader");
const WriteValue = require("./_auto_generated_WriteValue").WriteValue;
const BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;

@@ -36,4 +36,2 @@ /**

* @param options {Object}
* @param [options.requestHeader] {RequestHeader}
* @param [options.nodesToWrite] {WriteValue[]}
*/

@@ -45,3 +43,3 @@ function WriteRequest(options)

if (schema_helpers.doDebug) { check_options_correctness_against_schema(this,schema,options); }
var self = this;
const self = this;
assert(this instanceof BaseUAObject); // ' keyword "new" is required for constructor call')

@@ -100,11 +98,10 @@ resolve_schema_field_types(schema);

* @param stream {BinaryStream}
* @param [option] {object}
*/
WriteRequest.prototype.decode = function(stream,options) {
WriteRequest.prototype.decode = function(stream) {
// call base class implementation first
BaseUAObject.prototype.decode.call(this,stream,options);
this.requestHeader.decode(stream,options);
BaseUAObject.prototype.decode.call(this,stream);
this.requestHeader.decode(stream);
this.nodesToWrite = decodeArray(stream, function(stream) {
var obj = new WriteValue(null);
obj.decode(stream,options);
const obj = new WriteValue(null);
obj.decode(stream);
return obj;

@@ -120,3 +117,3 @@ });

exports.WriteRequest = WriteRequest;
var register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
const register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
register_class_definition("WriteRequest",WriteRequest);

@@ -1,2 +0,2 @@

// --------- This code has been automatically generated !!! 2018-02-08T07:25:28.535Z
// --------- This code has been automatically generated !!! 2018-04-16T04:56:48.222Z
"use strict";

@@ -6,24 +6,24 @@ /**

*/
var assert = require("node-opcua-assert");
var util = require("util");
var _ = require("underscore");
var makeNodeId = require("node-opcua-nodeid").makeNodeId;
var schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
var extract_all_fields = schema_helpers.extract_all_fields;
var resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
var initialize_field = schema_helpers.initialize_field;
var initialize_field_array = schema_helpers.initialize_field_array;
var check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
var _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
var ec = require("node-opcua-basic-types");
var encodeArray = ec.encodeArray;
var decodeArray = ec.decodeArray;
var makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
var generate_new_id = require("node-opcua-factory").generate_new_id;
var _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
var schema = require("../schemas/WriteResponse_schema").WriteResponse_Schema;
var getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
var ResponseHeader = getFactory("ResponseHeader");
var DiagnosticInfo = getFactory("DiagnosticInfo");
var BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;
const assert = require("node-opcua-assert").assert;
const util = require("util");
const _ = require("underscore");
const makeNodeId = require("node-opcua-nodeid").makeNodeId;
const schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
const extract_all_fields = schema_helpers.extract_all_fields;
const resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
const initialize_field = schema_helpers.initialize_field;
const initialize_field_array = schema_helpers.initialize_field_array;
const check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
const _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
const ec = require("node-opcua-basic-types");
const encodeArray = ec.encodeArray;
const decodeArray = ec.decodeArray;
const makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
const generate_new_id = require("node-opcua-factory").generate_new_id;
const _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
const schema = require("../schemas/WriteResponse_schema").WriteResponse_Schema;
const getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
const ResponseHeader = getFactory("ResponseHeader");
const DiagnosticInfo = getFactory("DiagnosticInfo");
const BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;

@@ -36,5 +36,2 @@ /**

* @param options {Object}
* @param [options.responseHeader] {ResponseHeader}
* @param [options.results] {StatusCode[]}
* @param [options.diagnosticInfos] {DiagnosticInfo[]}
*/

@@ -46,3 +43,3 @@ function WriteResponse(options)

if (schema_helpers.doDebug) { check_options_correctness_against_schema(this,schema,options); }
var self = this;
const self = this;
assert(this instanceof BaseUAObject); // ' keyword "new" is required for constructor call')

@@ -91,4 +88,4 @@ resolve_schema_field_types(schema);

var encode_StatusCode = _defaultTypeMap.StatusCode.encode;
var decode_StatusCode = _defaultTypeMap.StatusCode.decode;
const encode_StatusCode = _defaultTypeMap.StatusCode.encode;
const decode_StatusCode = _defaultTypeMap.StatusCode.decode;
/**

@@ -112,12 +109,11 @@ * encode the object into a binary stream

* @param stream {BinaryStream}
* @param [option] {object}
*/
WriteResponse.prototype.decode = function(stream,options) {
WriteResponse.prototype.decode = function(stream) {
// call base class implementation first
BaseUAObject.prototype.decode.call(this,stream,options);
this.responseHeader.decode(stream,options);
BaseUAObject.prototype.decode.call(this,stream);
this.responseHeader.decode(stream);
this.results = decodeArray(stream, decode_StatusCode);
this.diagnosticInfos = decodeArray(stream, function(stream) {
var obj = new DiagnosticInfo(null);
obj.decode(stream,options);
const obj = new DiagnosticInfo(null);
obj.decode(stream);
return obj;

@@ -134,3 +130,3 @@ });

exports.WriteResponse = WriteResponse;
var register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
const register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
register_class_definition("WriteResponse",WriteResponse);

@@ -1,2 +0,2 @@

// --------- This code has been automatically generated !!! 2018-02-08T07:25:28.437Z
// --------- This code has been automatically generated !!! 2018-04-16T04:56:48.122Z
"use strict";

@@ -6,23 +6,23 @@ /**

*/
var assert = require("node-opcua-assert");
var util = require("util");
var _ = require("underscore");
var makeNodeId = require("node-opcua-nodeid").makeNodeId;
var schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
var extract_all_fields = schema_helpers.extract_all_fields;
var resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
var initialize_field = schema_helpers.initialize_field;
var initialize_field_array = schema_helpers.initialize_field_array;
var check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
var _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
var ec = require("node-opcua-basic-types");
var encodeArray = ec.encodeArray;
var decodeArray = ec.decodeArray;
var makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
var generate_new_id = require("node-opcua-factory").generate_new_id;
var _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
var schema = require("../schemas/WriteValue_schema").WriteValue_Schema;
var getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
var DataValue = getFactory("DataValue");
var BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;
const assert = require("node-opcua-assert").assert;
const util = require("util");
const _ = require("underscore");
const makeNodeId = require("node-opcua-nodeid").makeNodeId;
const schema_helpers = require("node-opcua-factory/src/factories_schema_helpers");
const extract_all_fields = schema_helpers.extract_all_fields;
const resolve_schema_field_types = schema_helpers.resolve_schema_field_types;
const initialize_field = schema_helpers.initialize_field;
const initialize_field_array = schema_helpers.initialize_field_array;
const check_options_correctness_against_schema = schema_helpers.check_options_correctness_against_schema;
const _defaultTypeMap = require("node-opcua-factory/src/factories_builtin_types")._defaultTypeMap;
const ec = require("node-opcua-basic-types");
const encodeArray = ec.encodeArray;
const decodeArray = ec.decodeArray;
const makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
const generate_new_id = require("node-opcua-factory").generate_new_id;
const _enumerations = require("node-opcua-factory/src/factories_enumerations")._private._enumerations;
const schema = require("../schemas/WriteValue_schema").WriteValue_Schema;
const getFactory = require("node-opcua-factory/src/factories_factories").getFactory;
const DataValue = getFactory("DataValue");
const BaseUAObject = require("node-opcua-factory/src/factories_baseobject").BaseUAObject;

@@ -35,6 +35,2 @@ /**

* @param options {Object}
* @param [options.nodeId] {NodeId}
* @param [options.attributeId] {IntegerId}
* @param [options.indexRange] {NumericRange}
* @param [options.value] {DataValue}
*/

@@ -46,3 +42,3 @@ function WriteValue(options)

if (schema_helpers.doDebug) { check_options_correctness_against_schema(this,schema,options); }
var self = this;
const self = this;
assert(this instanceof BaseUAObject); // ' keyword "new" is required for constructor call')

@@ -93,8 +89,8 @@ resolve_schema_field_types(schema);

var encode_NodeId = _defaultTypeMap.NodeId.encode;
var decode_NodeId = _defaultTypeMap.NodeId.decode;
var encode_IntegerId = _defaultTypeMap.IntegerId.encode;
var decode_IntegerId = _defaultTypeMap.IntegerId.decode;
var encode_NumericRange = _defaultTypeMap.NumericRange.encode;
var decode_NumericRange = _defaultTypeMap.NumericRange.decode;
const encode_NodeId = _defaultTypeMap.NodeId.encode;
const decode_NodeId = _defaultTypeMap.NodeId.decode;
const encode_IntegerId = _defaultTypeMap.IntegerId.encode;
const decode_IntegerId = _defaultTypeMap.IntegerId.decode;
const encode_NumericRange = _defaultTypeMap.NumericRange.encode;
const decode_NumericRange = _defaultTypeMap.NumericRange.decode;
/**

@@ -119,11 +115,10 @@ * encode the object into a binary stream

* @param stream {BinaryStream}
* @param [option] {object}
*/
WriteValue.prototype.decode = function(stream,options) {
WriteValue.prototype.decode = function(stream) {
// call base class implementation first
BaseUAObject.prototype.decode.call(this,stream,options);
this.nodeId = decode_NodeId(stream,options);
this.attributeId = decode_IntegerId(stream,options);
this.indexRange = decode_NumericRange(stream,options);
this.value.decode(stream,options);
BaseUAObject.prototype.decode.call(this,stream);
this.nodeId = decode_NodeId(stream);
this.attributeId = decode_IntegerId(stream);
this.indexRange = decode_NumericRange(stream);
this.value.decode(stream);
};

@@ -139,3 +134,3 @@ WriteValue.possibleFields = [

exports.WriteValue = WriteValue;
var register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
const register_class_definition = require("node-opcua-factory/src/factories_factories").register_class_definition;
register_class_definition("WriteValue",WriteValue);
{
"name": "node-opcua-service-write",
"version": "0.2.3",
"version": "0.3.0",
"description": "pure nodejs OPCUA SDK - module -service-write",

@@ -12,14 +12,14 @@ "scripts": {

"dependencies": {
"node-opcua-assert": "^0.2.0",
"node-opcua-basic-types": "^0.2.3",
"node-opcua-data-value": "^0.2.3",
"node-opcua-factory": "^0.2.3",
"node-opcua-nodeid": "^0.2.3",
"node-opcua-numeric-range": "^0.2.3",
"node-opcua-service-secure-channel": "^0.2.3",
"node-opcua-assert": "^0.3.0",
"node-opcua-basic-types": "^0.3.0",
"node-opcua-data-value": "^0.3.0",
"node-opcua-factory": "^0.3.0",
"node-opcua-nodeid": "^0.3.0",
"node-opcua-numeric-range": "^0.3.0",
"node-opcua-service-secure-channel": "^0.3.0",
"underscore": "^1.8.3"
},
"devDependencies": {
"node-opcua-generator": "^0.2.3",
"node-opcua-packet-analyzer": "^0.2.3",
"node-opcua-generator": "^0.3.0",
"node-opcua-packet-analyzer": "^0.3.0",
"should": "13.2.1"

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

require("node-opcua-service-secure-channel");
var WriteRequest_Schema = {
const WriteRequest_Schema = {
name: "WriteRequest",

@@ -5,0 +5,0 @@ fields: [

require("node-opcua-service-secure-channel");
var WriteResponse_Schema = {
const WriteResponse_Schema = {
name: "WriteResponse",

@@ -5,0 +5,0 @@ fields: [

@@ -5,3 +5,3 @@

var WriteValue_Schema = {
const WriteValue_Schema = {
name: "WriteValue",

@@ -8,0 +8,0 @@ fields: [

"use strict";
var should = require("should");
var write_service = require("..");
var encode_decode_round_trip_test = require("node-opcua-packet-analyzer/test_helpers/encode_decode_round_trip_test").encode_decode_round_trip_test
const should = require("should");
const write_service = require("..");
const encode_decode_round_trip_test = require("node-opcua-packet-analyzer/test_helpers/encode_decode_round_trip_test").encode_decode_round_trip_test;

@@ -25,3 +25,3 @@ describe("Write Service",function() {

var wv = new write_service.WriteValue({});
const wv = new write_service.WriteValue({});
should(wv.indexRange.type.key).equal("Empty");

@@ -37,3 +37,3 @@

var wv = new write_service.WriteRequest({
const wv = new write_service.WriteRequest({
nodesToWrite: [{}, {}]

@@ -40,0 +40,0 @@ });

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