node-opcua-basic-types 2.98.0 → 2.98.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/array.d.ts +16 -0
- package/dist/array.js +45 -0
- package/dist/array.js.map +1 -0
- package/dist/attributeIds.d.ts +34 -0
- package/dist/attributeIds.js +49 -0
- package/dist/attributeIds.js.map +1 -0
- package/dist/boolean.d.ts +9 -0
- package/dist/boolean.js +34 -0
- package/dist/boolean.js.map +1 -0
- package/dist/byte_string.d.ts +11 -0
- package/dist/byte_string.js +37 -0
- package/dist/byte_string.js.map +1 -0
- package/dist/data_type.d.ts +31 -0
- package/dist/data_type.js +36 -0
- package/dist/data_type.js.map +1 -0
- package/dist/date_time.d.ts +6 -0
- package/dist/date_time.js +21 -0
- package/dist/date_time.js.map +1 -0
- package/dist/floats.d.ts +16 -0
- package/dist/floats.js +81 -0
- package/dist/floats.js.map +1 -0
- package/dist/guid.d.ts +9 -0
- package/dist/guid.js +122 -0
- package/dist/guid.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/integers.d.ts +66 -0
- package/dist/integers.js +309 -0
- package/dist/integers.js.map +1 -0
- package/dist/locale_id.d.ts +9 -0
- package/dist/locale_id.js +19 -0
- package/dist/locale_id.js.map +1 -0
- package/dist/node_id.d.ts +9 -0
- package/dist/node_id.js +189 -0
- package/dist/node_id.js.map +1 -0
- package/dist/round_to_float.d.ts +1 -0
- package/dist/round_to_float.js +27 -0
- package/dist/round_to_float.js.map +1 -0
- package/dist/status_code.d.ts +4 -0
- package/dist/status_code.js +21 -0
- package/dist/status_code.js.map +1 -0
- package/dist/string.d.ts +12 -0
- package/dist/string.js +31 -0
- package/dist/string.js.map +1 -0
- package/dist/utils.d.ts +12 -0
- package/dist/utils.js +20 -0
- package/dist/utils.js.map +1 -0
- package/package.json +16 -12
- package/nyc.config.js +0 -16
|
@@ -0,0 +1 @@
|
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C,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC;AACrG,CAAC;AAdD,oDAcC;AAED,uDAAuE;AAA9D,iHAAA,YAAY,OAAA;AAAE,yHAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function roundToFloat2(float: number): number;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.roundToFloat2 = void 0;
|
|
4
|
+
function roundToFloat2(float) {
|
|
5
|
+
if (float === 0) {
|
|
6
|
+
return float;
|
|
7
|
+
}
|
|
8
|
+
// this method artificially rounds a float to 7 significant digit in base 10
|
|
9
|
+
// Note:
|
|
10
|
+
// this is to overcome the that that Javascript doesn't provide single precision float values (32 bits)
|
|
11
|
+
// but only double precision float values
|
|
12
|
+
// wikipedia:(http://en.wikipedia.org/wiki/Floating_point)
|
|
13
|
+
//
|
|
14
|
+
// * Single precision, usually used to represent the "float" type in the C language family
|
|
15
|
+
// (though this is not guaranteed). This is a binary format that occupies 32 bits (4 bytes) and its
|
|
16
|
+
// significand has a precision of 24 bits (about 7 decimal digits).
|
|
17
|
+
// * Double precision, usually used to represent the "double" type in the C language family
|
|
18
|
+
// (though this is not guaranteed). This is a binary format that occupies 64 bits (8 bytes) and its
|
|
19
|
+
// significand has a precision of 53 bits (about 16 decimal digits).
|
|
20
|
+
//
|
|
21
|
+
const nbDigits = Math.ceil(Math.log(Math.abs(float)) / Math.log(10));
|
|
22
|
+
const scale = Math.pow(10, -nbDigits + 2);
|
|
23
|
+
return Math.round(float * scale) / scale;
|
|
24
|
+
// return (float > 0 && r < 0) || (float < 0 && r > 0) ? -r : r;
|
|
25
|
+
}
|
|
26
|
+
exports.roundToFloat2 = roundToFloat2;
|
|
27
|
+
//# sourceMappingURL=round_to_float.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round_to_float.js","sourceRoot":"","sources":["../source/round_to_float.ts"],"names":[],"mappings":";;;AAAA,SAAgB,aAAa,CAAC,KAAa;IACvC,IAAI,KAAK,KAAK,CAAC,EAAE;QACb,OAAO,KAAK,CAAC;KAChB;IACD,4EAA4E;IAC5E,QAAQ;IACR,2GAA2G;IAC3G,2CAA2C;IAE3C,0DAA0D;IAC1D,EAAE;IACF,0FAA0F;IAC1F,qGAAqG;IACrG,qEAAqE;IACrE,2FAA2F;IAC3F,qGAAqG;IACrG,sEAAsE;IACtE,EAAE;IACF,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACrE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;IACzC,gEAAgE;AACpE,CAAC;AAtBD,sCAsBC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/***
|
|
18
|
+
* @module node-opcua-basic-types
|
|
19
|
+
*/
|
|
20
|
+
__exportStar(require("node-opcua-status-code"), exports);
|
|
21
|
+
//# sourceMappingURL=status_code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status_code.js","sourceRoot":"","sources":["../source/status_code.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,yDAAuC"}
|
package/dist/string.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/***
|
|
2
|
+
* @module node-opcua-basic-types
|
|
3
|
+
*/
|
|
4
|
+
import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
|
|
5
|
+
export declare function isValidString(value: unknown): boolean;
|
|
6
|
+
export declare function randomString(): string;
|
|
7
|
+
export declare function decodeString(stream: BinaryStream, value?: string | null): string | null;
|
|
8
|
+
export declare function encodeString(value: null | string, stream: OutputBinaryStream): void;
|
|
9
|
+
export type CharArray = string;
|
|
10
|
+
export type UAString = string | null;
|
|
11
|
+
export declare const decodeUAString: typeof decodeString;
|
|
12
|
+
export declare const encodeUAString: typeof encodeString;
|
package/dist/string.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/***
|
|
3
|
+
* @module node-opcua-basic-types
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.encodeUAString = exports.decodeUAString = exports.encodeString = exports.decodeString = exports.randomString = exports.isValidString = void 0;
|
|
7
|
+
const utils_1 = require("./utils");
|
|
8
|
+
function isValidString(value) {
|
|
9
|
+
return typeof value === "string";
|
|
10
|
+
}
|
|
11
|
+
exports.isValidString = isValidString;
|
|
12
|
+
function randomString() {
|
|
13
|
+
const nbCar = (0, utils_1.getRandomInt)(1, 20);
|
|
14
|
+
const cars = [];
|
|
15
|
+
for (let i = 0; i < nbCar; i++) {
|
|
16
|
+
cars.push(String.fromCharCode(65 + (0, utils_1.getRandomInt)(0, 26)));
|
|
17
|
+
}
|
|
18
|
+
return cars.join("");
|
|
19
|
+
}
|
|
20
|
+
exports.randomString = randomString;
|
|
21
|
+
function decodeString(stream, value) {
|
|
22
|
+
return stream.readString();
|
|
23
|
+
}
|
|
24
|
+
exports.decodeString = decodeString;
|
|
25
|
+
function encodeString(value, stream) {
|
|
26
|
+
stream.writeString(value);
|
|
27
|
+
}
|
|
28
|
+
exports.encodeString = encodeString;
|
|
29
|
+
exports.decodeUAString = decodeString;
|
|
30
|
+
exports.encodeUAString = encodeString;
|
|
31
|
+
//# sourceMappingURL=string.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.js","sourceRoot":"","sources":["../source/string.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIH,mCAAuC;AAEvC,SAAgB,aAAa,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACrC,CAAC;AAFD,sCAEC;AAED,SAAgB,YAAY;IACxB,MAAM,KAAK,GAAG,IAAA,oBAAY,EAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;QAC5B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,GAAG,IAAA,oBAAY,EAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;KAC5D;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC;AAPD,oCAOC;AAED,SAAgB,YAAY,CAAC,MAAoB,EAAE,KAAqB;IACpE,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;AAC/B,CAAC;AAFD,oCAEC;AAED,SAAgB,YAAY,CAAC,KAAoB,EAAE,MAA0B;IACzE,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAFD,oCAEC;AAIY,QAAA,cAAc,GAAG,YAAY,CAAC;AAC9B,QAAA,cAAc,GAAG,YAAY,CAAC"}
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/***
|
|
2
|
+
* @module node-opcua-basic-types
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* return a random integer value in the range of min inclusive and max exclusive
|
|
6
|
+
* @method getRandomInt
|
|
7
|
+
* @param min
|
|
8
|
+
* @param max
|
|
9
|
+
* @return {*}
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
export declare function getRandomInt(min: number, max: number): number;
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRandomInt = void 0;
|
|
4
|
+
/***
|
|
5
|
+
* @module node-opcua-basic-types
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* return a random integer value in the range of min inclusive and max exclusive
|
|
9
|
+
* @method getRandomInt
|
|
10
|
+
* @param min
|
|
11
|
+
* @param max
|
|
12
|
+
* @return {*}
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
15
|
+
function getRandomInt(min, max) {
|
|
16
|
+
// note : Math.random() returns a random number between 0 (inclusive) and 1 (exclusive):
|
|
17
|
+
return Math.floor(Math.random() * (max - min)) + min;
|
|
18
|
+
}
|
|
19
|
+
exports.getRandomInt = getRandomInt;
|
|
20
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../source/utils.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH;;;;;;;GAOG;AACH,SAAgB,YAAY,CAAC,GAAW,EAAE,GAAW;IACjD,wFAAwF;IACxF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AACzD,CAAC;AAHD,oCAGC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-basic-types",
|
|
3
|
-
"version": "2.98.
|
|
4
|
-
"description": "pure nodejs OPCUA SDK - module
|
|
3
|
+
"version": "2.98.1",
|
|
4
|
+
"description": "pure nodejs OPCUA SDK - module basic-types",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
"lint": "eslint source/*.ts"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"node-opcua-assert": "2.
|
|
15
|
-
"node-opcua-binary-stream": "2.98.
|
|
16
|
-
"node-opcua-buffer-utils": "2.98.
|
|
17
|
-
"node-opcua-date-time": "2.98.
|
|
18
|
-
"node-opcua-guid": "2.
|
|
19
|
-
"node-opcua-nodeid": "2.98.
|
|
20
|
-
"node-opcua-status-code": "2.98.
|
|
14
|
+
"node-opcua-assert": "2.98.1",
|
|
15
|
+
"node-opcua-binary-stream": "2.98.1",
|
|
16
|
+
"node-opcua-buffer-utils": "2.98.1",
|
|
17
|
+
"node-opcua-date-time": "2.98.1",
|
|
18
|
+
"node-opcua-guid": "2.98.1",
|
|
19
|
+
"node-opcua-nodeid": "2.98.1",
|
|
20
|
+
"node-opcua-status-code": "2.98.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "18.15.11",
|
|
24
|
-
"node-opcua-benchmarker": "2.98.
|
|
25
|
-
"node-opcua-debug": "2.98.
|
|
24
|
+
"node-opcua-benchmarker": "2.98.1",
|
|
25
|
+
"node-opcua-debug": "2.98.1",
|
|
26
26
|
"should": "^13.2.3"
|
|
27
27
|
},
|
|
28
28
|
"author": "Etienne Rossignon",
|
|
@@ -40,5 +40,9 @@
|
|
|
40
40
|
"internet of things"
|
|
41
41
|
],
|
|
42
42
|
"homepage": "http://node-opcua.github.io/",
|
|
43
|
-
"gitHead": "e4d73afdfcccb3491423149d9b9785888f4ebb3c"
|
|
43
|
+
"gitHead": "e4d73afdfcccb3491423149d9b9785888f4ebb3c",
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"source"
|
|
47
|
+
]
|
|
44
48
|
}
|