node-opcua-utils
Advanced tools
Comparing version 2.85.0 to 2.86.0
@@ -11,5 +11,5 @@ "use strict"; | ||
if (end - start < 40) { | ||
return buffer.slice(start, end).toString("hex"); | ||
return buffer.subarray(start, end).toString("hex"); | ||
} | ||
return buffer.slice(start, start + 10).toString("hex") + " ... " + buffer.slice(end - 10, end).toString("hex"); | ||
return buffer.subarray(start, start + 10).toString("hex") + " ... " + buffer.subarray(end - 10, end).toString("hex"); | ||
} | ||
@@ -16,0 +16,0 @@ exports.buffer_ellipsis = buffer_ellipsis; |
@@ -15,4 +15,4 @@ "use strict"; | ||
while (cursor < max_length) { | ||
const slice1 = buf1.slice(cursor, cursor + block_length); | ||
const slice2 = buf2.slice(cursor, cursor + block_length); | ||
const slice1 = buf1.subarray(cursor, cursor + block_length); | ||
const slice2 = buf2.subarray(cursor, cursor + block_length); | ||
if (slice2.toString("hex") !== slice1.toString("hex")) { | ||
@@ -19,0 +19,0 @@ console.log("pos = ", cursor); |
@@ -1,1 +0,1 @@ | ||
export declare type FunctionVariadic = (...args: any[]) => void; | ||
export type FunctionVariadic = (...args: any[]) => void; |
@@ -1,2 +0,2 @@ | ||
export declare type HRTimeFunc = (time?: [number, number]) => [number, number]; | ||
export type HRTimeFunc = (time?: [number, number]) => [number, number]; | ||
export declare const hrtime: HRTimeFunc; |
@@ -6,4 +6,4 @@ /// <reference types="node" /> | ||
import { EventEmitter } from "events"; | ||
declare type ArbitraryClockTick = number; | ||
declare type DurationInMillisecond = number; | ||
type ArbitraryClockTick = number; | ||
type DurationInMillisecond = number; | ||
export interface IWatchdogData2 { | ||
@@ -10,0 +10,0 @@ key: number; |
@@ -27,10 +27,2 @@ "use strict"; | ||
class WatchDog extends events_1.EventEmitter { | ||
constructor() { | ||
super(); | ||
this._watchdogDataMap = {}; | ||
this._counter = 0; | ||
this._currentTime = this.getCurrentSystemTick(); | ||
this._visitSubscriberB = this._visit_subscriber.bind(this); | ||
this._timer = null; // as NodeJS.Timer; | ||
} | ||
static lastSeenToDuration(lastSeen) { | ||
@@ -45,2 +37,10 @@ return (0, get_clock_tick_1.get_clock_tick)() - lastSeen; | ||
} | ||
constructor() { | ||
super(); | ||
this._watchdogDataMap = {}; | ||
this._counter = 0; | ||
this._currentTime = this.getCurrentSystemTick(); | ||
this._visitSubscriberB = this._visit_subscriber.bind(this); | ||
this._timer = null; // as NodeJS.Timer; | ||
} | ||
/** | ||
@@ -47,0 +47,0 @@ * add a subscriber to the WatchDog. |
{ | ||
"name": "node-opcua-utils", | ||
"version": "2.85.0", | ||
"version": "2.86.0", | ||
"description": "pure nodejs OPCUA SDK - module -utils", | ||
@@ -37,3 +37,3 @@ "main": "./dist/index.js", | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "68498fcf7b20ea9f7bd66e8529c546221daf5d52" | ||
"gitHead": "36afc46fe2c91aa5664a8c5418f4db5a354670c3" | ||
} |
@@ -8,7 +8,7 @@ /** | ||
if (end - start < 40) { | ||
return buffer.slice(start, end).toString("hex"); | ||
return buffer.subarray(start, end).toString("hex"); | ||
} | ||
return buffer.slice(start, start + 10).toString("hex") + " ... " + buffer.slice(end - 10, end).toString("hex"); | ||
return buffer.subarray(start, start + 10).toString("hex") + " ... " + buffer.subarray(end - 10, end).toString("hex"); | ||
} | ||
exports.buffer_ellipsis = buffer_ellipsis; |
@@ -13,4 +13,4 @@ /** | ||
while (cursor < max_length) { | ||
const slice1 = buf1.slice(cursor, cursor + block_length); | ||
const slice2 = buf2.slice(cursor, cursor + block_length); | ||
const slice1 = buf1.subarray(cursor, cursor + block_length); | ||
const slice2 = buf2.subarray(cursor, cursor + block_length); | ||
if (slice2.toString("hex") !== slice1.toString("hex")) { | ||
@@ -17,0 +17,0 @@ console.log("pos = ", cursor); |
Sorry, the diff of this file is not supported yet
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
68091