node-opcua-basic-types
Advanced tools
Comparing version 0.1.0-7 to 0.1.0-8
{ | ||
"name": "node-opcua-basic-types", | ||
"version": "0.1.0-7", | ||
"version": "0.1.0-8", | ||
"description": "pure nodejs OPCUA SDK - module -basic-types", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,4 +8,5 @@ "use strict"; | ||
var NodeIdType = exports.NodeIdType = require("node-opcua-nodeid").NodeIdType; | ||
var NodeId = require("node-opcua-nodeid").NodeId; | ||
var ExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").ExpandedNodeId; | ||
var set_flag = require("node-opcua-utils").set_flag; | ||
@@ -167,8 +168,10 @@ var check_flag = require("node-opcua-utils").check_flag; | ||
var value, namespace; | ||
var value, namespace, nodeIdType; | ||
/*jslint bitwise: true */ | ||
encoding_byte &= 0x3F; | ||
switch (encoding_byte) { | ||
case EnumNodeIdEncoding.TwoBytes.value: | ||
value = stream.readUInt8(); | ||
nodeIdType = NodeIdType.NUMERIC; | ||
break; | ||
@@ -178,2 +181,3 @@ case EnumNodeIdEncoding.FourBytes.value: | ||
value = stream.readUInt16(); | ||
nodeIdType = NodeIdType.NUMERIC; | ||
break; | ||
@@ -183,2 +187,3 @@ case EnumNodeIdEncoding.Numeric.value: | ||
value = stream.readUInt32(stream); | ||
nodeIdType = NodeIdType.NUMERIC; | ||
break; | ||
@@ -188,2 +193,3 @@ case EnumNodeIdEncoding.String.value: | ||
value = decodeString(stream); | ||
nodeIdType = NodeIdType.STRING; | ||
break; | ||
@@ -193,2 +199,3 @@ case EnumNodeIdEncoding.ByteString.value: | ||
value = decodeByteString(stream); | ||
nodeIdType = NodeIdType.BYTESTRING; | ||
break; | ||
@@ -203,6 +210,7 @@ default: | ||
value = decodeGuid(stream); | ||
nodeIdType = NodeIdType.GUID; | ||
assert(isValidGuid(value)); | ||
break; | ||
} | ||
return makeNodeId(value, namespace); | ||
return new NodeId(nodeIdType, value, namespace); | ||
}; | ||
@@ -209,0 +217,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
32633
823