node-opcua-basic-types
Advanced tools
Comparing version 2.68.0 to 2.69.0
@@ -27,3 +27,3 @@ "use strict"; | ||
!nodeId.serverIndex) { | ||
encodingByte = encodingByte | 0 /* TwoBytes */; | ||
encodingByte = encodingByte | 0 /* EnumNodeIdEncoding.TwoBytes */; | ||
} | ||
@@ -34,22 +34,22 @@ else if (isUInt16(nodeId.value) && | ||
!nodeId.serverIndex) { | ||
encodingByte = encodingByte | 1 /* FourBytes */; | ||
encodingByte = encodingByte | 1 /* EnumNodeIdEncoding.FourBytes */; | ||
} | ||
else { | ||
encodingByte = encodingByte | 2 /* Numeric */; | ||
encodingByte = encodingByte | 2 /* EnumNodeIdEncoding.Numeric */; | ||
} | ||
} | ||
else if (nodeId.identifierType === node_opcua_nodeid_1.NodeIdType.STRING) { | ||
encodingByte = encodingByte | 3 /* String */; | ||
encodingByte = encodingByte | 3 /* EnumNodeIdEncoding.String */; | ||
} | ||
else if (nodeId.identifierType === node_opcua_nodeid_1.NodeIdType.BYTESTRING) { | ||
encodingByte = encodingByte | 5 /* ByteString */; | ||
encodingByte = encodingByte | 5 /* EnumNodeIdEncoding.ByteString */; | ||
} | ||
else if (nodeId.identifierType === node_opcua_nodeid_1.NodeIdType.GUID) { | ||
encodingByte = encodingByte | 4 /* Guid */; | ||
encodingByte = encodingByte | 4 /* EnumNodeIdEncoding.Guid */; | ||
} | ||
if (Object.prototype.hasOwnProperty.call(nodeId, "namespaceUri") && nodeId.namespaceUri) { | ||
encodingByte = encodingByte | 128 /* NamespaceUriFlag */; | ||
encodingByte = encodingByte | 128 /* EnumNodeIdEncoding.NamespaceUriFlag */; | ||
} | ||
if (Object.prototype.hasOwnProperty.call(nodeId, "serverIndex") && nodeId.serverIndex) { | ||
encodingByte = encodingByte | 64 /* ServerIndexFlag */; | ||
encodingByte = encodingByte | 64 /* EnumNodeIdEncoding.ServerIndexFlag */; | ||
} | ||
@@ -73,18 +73,18 @@ return encodingByte; | ||
switch (encodingByte) { | ||
case 0 /* TwoBytes */: | ||
case 0 /* EnumNodeIdEncoding.TwoBytes */: | ||
stream.writeUInt8(nodeId ? nodeId.value : 0); | ||
break; | ||
case 1 /* FourBytes */: | ||
case 1 /* EnumNodeIdEncoding.FourBytes */: | ||
stream.writeUInt8(nodeId.namespace); | ||
stream.writeUInt16(nodeId.value); | ||
break; | ||
case 2 /* Numeric */: | ||
case 2 /* EnumNodeIdEncoding.Numeric */: | ||
stream.writeUInt16(nodeId.namespace); | ||
stream.writeUInt32(nodeId.value); | ||
break; | ||
case 3 /* String */: | ||
case 3 /* EnumNodeIdEncoding.String */: | ||
stream.writeUInt16(nodeId.namespace); | ||
(0, string_1.encodeString)(nodeId.value, stream); | ||
break; | ||
case 5 /* ByteString */: | ||
case 5 /* EnumNodeIdEncoding.ByteString */: | ||
stream.writeUInt16(nodeId.namespace); | ||
@@ -94,3 +94,3 @@ (0, byte_string_1.encodeByteString)(nodeId.value, stream); | ||
default: | ||
(0, node_opcua_assert_1.assert)(encodingByte === 4 /* Guid */); | ||
(0, node_opcua_assert_1.assert)(encodingByte === 4 /* EnumNodeIdEncoding.Guid */); | ||
stream.writeUInt16(nodeId.namespace); | ||
@@ -112,6 +112,6 @@ (0, guid_1.encodeGuid)(nodeId.value, stream); | ||
_encodeNodeId(encodingByte, expandedNodeId, stream); | ||
if (encodingByte & 128 /* NamespaceUriFlag */) { | ||
if (encodingByte & 128 /* EnumNodeIdEncoding.NamespaceUriFlag */) { | ||
(0, string_1.encodeString)(expandedNodeId.namespaceUri, stream); | ||
} | ||
if (encodingByte & 64 /* ServerIndexFlag */) { | ||
if (encodingByte & 64 /* EnumNodeIdEncoding.ServerIndexFlag */) { | ||
(0, integers_1.encodeUInt32)(expandedNodeId.serverIndex, stream); | ||
@@ -128,7 +128,7 @@ } | ||
switch (encodingByte) { | ||
case 0 /* TwoBytes */: | ||
case 0 /* EnumNodeIdEncoding.TwoBytes */: | ||
value = stream.readUInt8(); | ||
identifierType = node_opcua_nodeid_1.NodeIdType.NUMERIC; | ||
break; | ||
case 1 /* FourBytes */: | ||
case 1 /* EnumNodeIdEncoding.FourBytes */: | ||
namespace = stream.readUInt8(); | ||
@@ -138,3 +138,3 @@ value = stream.readUInt16(); | ||
break; | ||
case 2 /* Numeric */: | ||
case 2 /* EnumNodeIdEncoding.Numeric */: | ||
namespace = stream.readUInt16(); | ||
@@ -144,3 +144,3 @@ value = stream.readUInt32(); | ||
break; | ||
case 3 /* String */: | ||
case 3 /* EnumNodeIdEncoding.String */: | ||
namespace = stream.readUInt16(); | ||
@@ -150,3 +150,3 @@ value = (0, string_1.decodeString)(stream) || ""; | ||
break; | ||
case 5 /* ByteString */: | ||
case 5 /* EnumNodeIdEncoding.ByteString */: | ||
namespace = stream.readUInt16(); | ||
@@ -158,3 +158,3 @@ value = (0, byte_string_1.decodeByteString)(stream); | ||
// istanbul ignore next | ||
if (encodingByte !== 4 /* Guid */) { | ||
if (encodingByte !== 4 /* EnumNodeIdEncoding.Guid */) { | ||
throw new Error("decodeNodeId: unknown encoding_byte = 0x" + encodingByte.toString(16)); | ||
@@ -186,6 +186,6 @@ } | ||
expandedNodeId.serverIndex = 0; | ||
if (encodingByte & 128 /* NamespaceUriFlag */) { | ||
if (encodingByte & 128 /* EnumNodeIdEncoding.NamespaceUriFlag */) { | ||
expandedNodeId.namespaceUri = (0, string_1.decodeString)(stream); | ||
} | ||
if (encodingByte & 64 /* ServerIndexFlag */) { | ||
if (encodingByte & 64 /* EnumNodeIdEncoding.ServerIndexFlag */) { | ||
expandedNodeId.serverIndex = (0, integers_1.decodeUInt32)(stream); | ||
@@ -192,0 +192,0 @@ } |
{ | ||
"name": "node-opcua-basic-types", | ||
"version": "2.68.0", | ||
"version": "2.69.0", | ||
"description": "pure nodejs OPCUA SDK - module -basic-types", | ||
@@ -15,15 +15,15 @@ "main": "./dist/index.js", | ||
"node-opcua-assert": "2.66.0", | ||
"node-opcua-binary-stream": "2.67.0", | ||
"node-opcua-buffer-utils": "2.67.0", | ||
"node-opcua-date-time": "2.68.0", | ||
"node-opcua-enum": "2.67.0", | ||
"node-opcua-binary-stream": "2.69.0", | ||
"node-opcua-buffer-utils": "2.69.0", | ||
"node-opcua-date-time": "2.69.0", | ||
"node-opcua-enum": "2.69.0", | ||
"node-opcua-guid": "2.66.0", | ||
"node-opcua-nodeid": "2.68.0", | ||
"node-opcua-status-code": "2.67.0", | ||
"node-opcua-utils": "2.67.0" | ||
"node-opcua-nodeid": "2.69.0", | ||
"node-opcua-status-code": "2.69.0", | ||
"node-opcua-utils": "2.69.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "17.0.23", | ||
"node-opcua-benchmarker": "2.67.0", | ||
"node-opcua-debug": "2.68.0", | ||
"@types/node": "17.0.36", | ||
"node-opcua-benchmarker": "2.69.0", | ||
"node-opcua-debug": "2.69.0", | ||
"should": "^13.2.3" | ||
@@ -46,3 +46,3 @@ }, | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "363b466440d0910acddd0cde2c37792ce4724d76" | ||
"gitHead": "6c88d05e8c82ce4bc9c8af9f0a8eb6136f31d2ce" | ||
} |
Sorry, the diff of this file is not supported yet
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
112906
+ Added@types/lodash@4.14.182(transitive)
+ Addednode-opcua-binary-stream@2.69.0(transitive)
+ Addednode-opcua-buffer-utils@2.69.0(transitive)
+ Addednode-opcua-date-time@2.69.0(transitive)
+ Addednode-opcua-enum@2.69.0(transitive)
+ Addednode-opcua-nodeid@2.69.0(transitive)
+ Addednode-opcua-status-code@2.69.0(transitive)
+ Addednode-opcua-utils@2.69.0(transitive)
- Removed@types/lodash@4.14.180(transitive)
- Removednode-opcua-binary-stream@2.67.0(transitive)
- Removednode-opcua-buffer-utils@2.67.0(transitive)
- Removednode-opcua-date-time@2.68.0(transitive)
- Removednode-opcua-enum@2.67.0(transitive)
- Removednode-opcua-nodeid@2.68.0(transitive)
- Removednode-opcua-status-code@2.67.0(transitive)
- Removednode-opcua-utils@2.67.0(transitive)
Updatednode-opcua-date-time@2.69.0
Updatednode-opcua-enum@2.69.0
Updatednode-opcua-nodeid@2.69.0
Updatednode-opcua-utils@2.69.0