node-opcua-status-code 2.64.1 → 2.66.0

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.
@@ -1,11 +1,11 @@
1
- /// <reference types="node" />
2
- /**
3
- * @module node-opcua-status-codes
4
- */
5
- import { StatusCode } from "./opcua_status_code";
6
- export declare type ErrorCallback = (err?: Error) => void;
7
- export declare type Callback2<T> = (err: Error | null, result?: T) => void;
8
- export declare type CallbackT<T> = (err: Error | null, result?: T) => void;
9
- export declare type StatusCodeCallback = CallbackT<StatusCode>;
10
- export declare type CallbackWithData = CallbackT<Buffer>;
11
- export declare type Callback<T> = (err: Error | null, result?: T) => void;
1
+ /// <reference types="node" />
2
+ /**
3
+ * @module node-opcua-status-codes
4
+ */
5
+ import { StatusCode } from "./opcua_status_code";
6
+ export declare type ErrorCallback = (err?: Error) => void;
7
+ export declare type Callback2<T> = (err: Error | null, result?: T) => void;
8
+ export declare type CallbackT<T> = (err: Error | null, result?: T) => void;
9
+ export declare type StatusCodeCallback = CallbackT<StatusCode>;
10
+ export declare type CallbackWithData = CallbackT<Buffer>;
11
+ export declare type Callback<T> = (err: Error | null, result?: T) => void;
package/dist/callbacks.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=callbacks.js.map
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /**
2
- * @module node-opcua-status-codes
3
- */
4
- export * from "./opcua_status_code";
5
- export * from "./callbacks";
1
+ /**
2
+ * @module node-opcua-status-codes
3
+ */
4
+ export * from "./opcua_status_code";
5
+ export * from "./callbacks";
package/dist/index.js CHANGED
@@ -1,18 +1,22 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- /**
14
- * @module node-opcua-status-codes
15
- */
16
- __exportStar(require("./opcua_status_code"), exports);
17
- __exportStar(require("./callbacks"), exports);
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-status-codes
19
+ */
20
+ __exportStar(require("./opcua_status_code"), exports);
21
+ __exportStar(require("./callbacks"), exports);
18
22
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;GAEG;AACH,sDAAoC;AACpC,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,sDAAoC;AACpC,8CAA4B"}
@@ -1,91 +1,91 @@
1
- /**
2
- * @module node-opcua-status-code
3
- */
4
- import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
5
- /**
6
- * StatusCode Special bits
7
- */
8
- export declare const extraStatusCodeBits: {
9
- [key: string]: number;
10
- };
11
- /**
12
- * a particular StatusCode , with it's value , name and description
13
- */
14
- export declare abstract class StatusCode {
15
- /**
16
- * returns a status code that can be modified
17
- */
18
- static makeStatusCode(statusCode: StatusCode | string, optionalBits: string | number): StatusCode;
19
- /**
20
- * returns status code value in numerical form, including extra bits
21
- */
22
- abstract get value(): number;
23
- /***
24
- * status code by name, (including extra bits in textual forms)
25
- */
26
- abstract get name(): string;
27
- /**
28
- * return the long description of the status code
29
- */
30
- abstract get description(): string;
31
- valueOf(): number;
32
- toString(): string;
33
- checkBit(mask: number): boolean;
34
- /** returns true if the overflow bit is set */
35
- get hasOverflowBit(): boolean;
36
- /** returns true if the semanticChange bit is set */
37
- get hasSemanticChangedBit(): boolean;
38
- /** returns true if the structureChange bit is set */
39
- get hasStructureChangedBit(): boolean;
40
- isNot(other: StatusCode): boolean;
41
- equals(other: StatusCode): boolean;
42
- toJSON(): any;
43
- toJSONFull(): any;
44
- }
45
- export declare class ConstantStatusCode extends StatusCode {
46
- private readonly _value;
47
- private readonly _description;
48
- private readonly _name;
49
- /**
50
- *
51
- * @param options
52
- * @param options
53
- * @param options.value
54
- * @param options.description
55
- * @param options.name
56
- *
57
- */
58
- constructor(options: {
59
- value: number;
60
- description: string;
61
- name: string;
62
- });
63
- get value(): number;
64
- get name(): string;
65
- get description(): string;
66
- }
67
- export declare function encodeStatusCode(statusCode: StatusCode | ConstantStatusCode, stream: OutputBinaryStream): void;
68
- /**
69
- * returns the StatusCode corresponding to the provided value, if any
70
- * @note: if code is not known , then StatusCodes.Bad will be returned
71
- * @param code
72
- */
73
- export declare function getStatusCodeFromCode(code: number): StatusCode;
74
- export declare function decodeStatusCode(stream: BinaryStream, _value?: StatusCode): StatusCode;
75
- export declare class ModifiableStatusCode extends StatusCode {
76
- private readonly _base;
77
- private _extraBits;
78
- constructor(options: {
79
- _base: StatusCode;
80
- });
81
- get value(): number;
82
- get name(): string;
83
- get description(): string;
84
- set(bit: string | number): void;
85
- unset(bit: string | number): void;
86
- private _getExtraName;
87
- }
88
- export { StatusCodes } from "./_generated_status_codes";
89
- export declare function coerceStatusCode(statusCode: StatusCode | number | string | {
90
- value: number;
91
- }): StatusCode;
1
+ /**
2
+ * @module node-opcua-status-code
3
+ */
4
+ import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
5
+ /**
6
+ * StatusCode Special bits
7
+ */
8
+ export declare const extraStatusCodeBits: {
9
+ [key: string]: number;
10
+ };
11
+ /**
12
+ * a particular StatusCode , with it's value , name and description
13
+ */
14
+ export declare abstract class StatusCode {
15
+ /**
16
+ * returns a status code that can be modified
17
+ */
18
+ static makeStatusCode(statusCode: StatusCode | string, optionalBits: string | number): StatusCode;
19
+ /**
20
+ * returns status code value in numerical form, including extra bits
21
+ */
22
+ abstract get value(): number;
23
+ /***
24
+ * status code by name, (including extra bits in textual forms)
25
+ */
26
+ abstract get name(): string;
27
+ /**
28
+ * return the long description of the status code
29
+ */
30
+ abstract get description(): string;
31
+ valueOf(): number;
32
+ toString(): string;
33
+ checkBit(mask: number): boolean;
34
+ /** returns true if the overflow bit is set */
35
+ get hasOverflowBit(): boolean;
36
+ /** returns true if the semanticChange bit is set */
37
+ get hasSemanticChangedBit(): boolean;
38
+ /** returns true if the structureChange bit is set */
39
+ get hasStructureChangedBit(): boolean;
40
+ isNot(other: StatusCode): boolean;
41
+ equals(other: StatusCode): boolean;
42
+ toJSON(): any;
43
+ toJSONFull(): any;
44
+ }
45
+ export declare class ConstantStatusCode extends StatusCode {
46
+ private readonly _value;
47
+ private readonly _description;
48
+ private readonly _name;
49
+ /**
50
+ *
51
+ * @param options
52
+ * @param options
53
+ * @param options.value
54
+ * @param options.description
55
+ * @param options.name
56
+ *
57
+ */
58
+ constructor(options: {
59
+ value: number;
60
+ description: string;
61
+ name: string;
62
+ });
63
+ get value(): number;
64
+ get name(): string;
65
+ get description(): string;
66
+ }
67
+ export declare function encodeStatusCode(statusCode: StatusCode | ConstantStatusCode, stream: OutputBinaryStream): void;
68
+ /**
69
+ * returns the StatusCode corresponding to the provided value, if any
70
+ * @note: if code is not known , then StatusCodes.Bad will be returned
71
+ * @param code
72
+ */
73
+ export declare function getStatusCodeFromCode(code: number): StatusCode;
74
+ export declare function decodeStatusCode(stream: BinaryStream, _value?: StatusCode): StatusCode;
75
+ export declare class ModifiableStatusCode extends StatusCode {
76
+ private readonly _base;
77
+ private _extraBits;
78
+ constructor(options: {
79
+ _base: StatusCode;
80
+ });
81
+ get value(): number;
82
+ get name(): string;
83
+ get description(): string;
84
+ set(bit: string | number): void;
85
+ unset(bit: string | number): void;
86
+ private _getExtraName;
87
+ }
88
+ export { StatusCodes } from "./_generated_status_codes";
89
+ export declare function coerceStatusCode(statusCode: StatusCode | number | string | {
90
+ value: number;
91
+ }): StatusCode;