node-opcua-packet-analyzer
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -14,3 +14,2 @@ "use strict"; | ||
const node_opcua_debug_1 = require("node-opcua-debug"); | ||
const node_opcua_enum_1 = require("node-opcua-enum"); | ||
const node_opcua_factory_1 = require("node-opcua-factory"); | ||
@@ -23,14 +22,2 @@ const node_opcua_utils_1 = require("node-opcua-utils"); | ||
} | ||
function display_encoding_mask_withEnum(padding, encodingMask, encodingInfo) { | ||
node_opcua_assert_1.assert(encodingInfo instanceof node_opcua_enum_1.Enum); | ||
let bits = []; | ||
encodingInfo.enumItems.forEach((enumValue) => { | ||
const mask = enumValue.value; | ||
const bit = Math.log(mask) / Math.log(2); | ||
bits = [".", ".", ".", ".", ".", ".", ".", ".", "."]; | ||
bits[bit] = ((encodingMask & mask) === mask) ? "Y" : "n"; | ||
console.log(padding + " ", bits.join(""), " <- has " + enumValue.key); | ||
}); | ||
// DataValueEncodingByte | ||
} | ||
function display_encoding_mask(padding, encodingMask, encodingInfo) { | ||
@@ -37,0 +24,0 @@ for (const v in encodingInfo) { |
@@ -0,4 +1,6 @@ | ||
/// <reference types="node" /> | ||
declare type encode_decode_round_trip_testCallback = (buffer: Buffer, encoding: any, options: any) => void; | ||
/** | ||
* @method encode_decode_round_trip_test | ||
* @param obj {Object} : object to test ( the object must provide a binaryStoreSize,encode,decode method | ||
* @param obj : object to test ( the object must provide a binaryStoreSize,encode,decode method | ||
* @param [options] | ||
@@ -8,3 +10,4 @@ * @param callback_buffer | ||
*/ | ||
export declare function encode_decode_round_trip_test(obj: any, options: any, callback_buffer?: any): any; | ||
export declare function encode_decode_round_trip_test(obj: any, options?: any, callback_buffer?: encode_decode_round_trip_testCallback): any; | ||
export declare function json_encode_decode_round_trip_test(obj: any, options: any, callbackBuffer?: any): any; | ||
export {}; |
@@ -41,2 +41,5 @@ "use strict"; | ||
else { | ||
if (objReloaded[p] === undefined || obj[p] === undefined) { | ||
return; | ||
} | ||
JSON.stringify(objReloaded[p]).should.eql(JSON.stringify(obj[p])); | ||
@@ -72,3 +75,3 @@ } | ||
* @method encode_decode_round_trip_test | ||
* @param obj {Object} : object to test ( the object must provide a binaryStoreSize,encode,decode method | ||
* @param obj : object to test ( the object must provide a binaryStoreSize,encode,decode method | ||
* @param [options] | ||
@@ -75,0 +78,0 @@ * @param callback_buffer |
{ | ||
"name": "node-opcua-packet-analyzer", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "pure nodejs OPCUA SDK - module -packet-analyzer", | ||
@@ -16,8 +16,7 @@ "main": "./dist/source/index.js", | ||
"node-opcua-assert": "^2.0.0", | ||
"node-opcua-basic-types": "^2.0.0", | ||
"node-opcua-binary-stream": "^2.0.0", | ||
"node-opcua-debug": "^2.0.0", | ||
"node-opcua-enum": "^2.0.0", | ||
"node-opcua-factory": "^2.0.0", | ||
"node-opcua-utils": "^2.0.0", | ||
"node-opcua-basic-types": "^2.1.0", | ||
"node-opcua-binary-stream": "^2.1.0", | ||
"node-opcua-debug": "^2.1.0", | ||
"node-opcua-factory": "^2.1.0", | ||
"node-opcua-utils": "^2.1.0", | ||
"underscore": "^1.9.1" | ||
@@ -42,3 +41,3 @@ }, | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "deed061b032e8490d44f59fc42559d413968ab89" | ||
"gitHead": "ddce2b6e3e13371510e63d839c1a4c4ff0be2c15" | ||
} |
@@ -14,3 +14,2 @@ // tslint:disable:no-bitwise | ||
import { hexDump } from "node-opcua-debug"; | ||
import { Enum } from "node-opcua-enum"; | ||
import { BaseUAObject, constructObject } from "node-opcua-factory"; | ||
@@ -26,16 +25,3 @@ import { buffer_ellipsis } from "node-opcua-utils"; | ||
function display_encoding_mask_withEnum(padding: string, encodingMask: any, encodingInfo: any) { | ||
assert(encodingInfo instanceof Enum); | ||
let bits = []; | ||
encodingInfo.enumItems.forEach((enumValue: any) => { | ||
const mask = enumValue.value; | ||
const bit = Math.log(mask) / Math.log(2); | ||
bits = [".", ".", ".", ".", ".", ".", ".", ".", "."]; | ||
bits[bit] = ((encodingMask & mask) === mask) ? "Y" : "n"; | ||
console.log(padding + " ", bits.join(""), " <- has " + enumValue.key); | ||
}); | ||
// DataValueEncodingByte | ||
} | ||
function display_encoding_mask(padding: string, encodingMask: any, encodingInfo: any) { | ||
@@ -42,0 +28,0 @@ |
@@ -45,2 +45,5 @@ // @ts-check | ||
} else { | ||
if (objReloaded[p] === undefined || obj[p] === undefined ) { | ||
return; | ||
} | ||
(JSON.stringify(objReloaded[p]) as any).should.eql(JSON.stringify(obj[p])); | ||
@@ -76,5 +79,7 @@ } | ||
type encode_decode_round_trip_testCallback = (buffer: Buffer, encoding: any, options: any) => void; | ||
/** | ||
* @method encode_decode_round_trip_test | ||
* @param obj {Object} : object to test ( the object must provide a binaryStoreSize,encode,decode method | ||
* @param obj : object to test ( the object must provide a binaryStoreSize,encode,decode method | ||
* @param [options] | ||
@@ -84,3 +89,7 @@ * @param callback_buffer | ||
*/ | ||
export function encode_decode_round_trip_test(obj: any, options: any, callback_buffer?: any) { | ||
export function encode_decode_round_trip_test( | ||
obj: any, | ||
options?: any, | ||
callback_buffer?: encode_decode_round_trip_testCallback | ||
): any { | ||
@@ -87,0 +96,0 @@ if (!callback_buffer && _.isFunction(options)) { |
Sorry, the diff of this file is not supported yet
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
8
43522
676
- Removednode-opcua-enum@^2.0.0
Updatednode-opcua-debug@^2.1.0
Updatednode-opcua-factory@^2.1.0
Updatednode-opcua-utils@^2.1.0