opcua-webapi-ts 1.0.19
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/README.md +34 -0
- package/dist/cjs/client/UaClientConfigure.d.ts +9 -0
- package/dist/cjs/client/UaClientConfigure.js +24 -0
- package/dist/cjs/client/UaWebClient.d.ts +38 -0
- package/dist/cjs/client/UaWebClient.js +590 -0
- package/dist/cjs/client/index.d.ts +3 -0
- package/dist/cjs/client/index.js +19 -0
- package/dist/cjs/client/utils/UaDataTypeDictionary.d.ts +15 -0
- package/dist/cjs/client/utils/UaDataTypeDictionary.js +149 -0
- package/dist/cjs/client/utils/UaNodeReader.d.ts +83 -0
- package/dist/cjs/client/utils/UaNodeReader.js +714 -0
- package/dist/cjs/client/utils/UaObjectTypeDictionary.d.ts +12 -0
- package/dist/cjs/client/utils/UaObjectTypeDictionary.js +80 -0
- package/dist/cjs/client/utils/UaReferenceTypeDictionary.d.ts +12 -0
- package/dist/cjs/client/utils/UaReferenceTypeDictionary.js +80 -0
- package/dist/cjs/client/utils/index.d.ts +4 -0
- package/dist/cjs/client/utils/index.js +20 -0
- package/dist/cjs/common/index.d.ts +4 -0
- package/dist/cjs/common/index.js +20 -0
- package/dist/cjs/common/mapper/UaPayloadMapper.d.ts +18 -0
- package/dist/cjs/common/mapper/UaPayloadMapper.js +481 -0
- package/dist/cjs/common/mapper/index.d.ts +1 -0
- package/dist/cjs/common/mapper/index.js +17 -0
- package/dist/cjs/common/nodes/Identifiers.d.ts +2458 -0
- package/dist/cjs/common/nodes/Identifiers.js +2470 -0
- package/dist/cjs/common/nodes/UaAttributes.d.ts +18 -0
- package/dist/cjs/common/nodes/UaAttributes.js +2 -0
- package/dist/cjs/common/nodes/UaDataType.d.ts +15 -0
- package/dist/cjs/common/nodes/UaDataType.js +93 -0
- package/dist/cjs/common/nodes/UaMethod.d.ts +16 -0
- package/dist/cjs/common/nodes/UaMethod.js +77 -0
- package/dist/cjs/common/nodes/UaNode.d.ts +38 -0
- package/dist/cjs/common/nodes/UaNode.js +94 -0
- package/dist/cjs/common/nodes/UaObject.d.ts +16 -0
- package/dist/cjs/common/nodes/UaObject.js +69 -0
- package/dist/cjs/common/nodes/UaObjectType.d.ts +12 -0
- package/dist/cjs/common/nodes/UaObjectType.js +62 -0
- package/dist/cjs/common/nodes/UaReferenceType.d.ts +12 -0
- package/dist/cjs/common/nodes/UaReferenceType.js +33 -0
- package/dist/cjs/common/nodes/UaVariable.d.ts +25 -0
- package/dist/cjs/common/nodes/UaVariable.js +76 -0
- package/dist/cjs/common/nodes/UaVariableType.d.ts +14 -0
- package/dist/cjs/common/nodes/UaVariableType.js +50 -0
- package/dist/cjs/common/nodes/index.d.ts +10 -0
- package/dist/cjs/common/nodes/index.js +26 -0
- package/dist/cjs/common/structure/UaArgument.d.ts +19 -0
- package/dist/cjs/common/structure/UaArgument.js +65 -0
- package/dist/cjs/common/structure/UaContentFilter.d.ts +13 -0
- package/dist/cjs/common/structure/UaContentFilter.js +48 -0
- package/dist/cjs/common/structure/UaContentFilterElement.d.ts +12 -0
- package/dist/cjs/common/structure/UaContentFilterElement.js +43 -0
- package/dist/cjs/common/structure/UaEUInformation.d.ts +18 -0
- package/dist/cjs/common/structure/UaEUInformation.js +56 -0
- package/dist/cjs/common/structure/UaElementOperand.d.ts +12 -0
- package/dist/cjs/common/structure/UaElementOperand.js +36 -0
- package/dist/cjs/common/structure/UaEnumValueType.d.ts +16 -0
- package/dist/cjs/common/structure/UaEnumValueType.js +48 -0
- package/dist/cjs/common/structure/UaEventFilter.d.ts +14 -0
- package/dist/cjs/common/structure/UaEventFilter.js +49 -0
- package/dist/cjs/common/structure/UaHistoryData.d.ts +12 -0
- package/dist/cjs/common/structure/UaHistoryData.js +43 -0
- package/dist/cjs/common/structure/UaHistoryEvent.d.ts +12 -0
- package/dist/cjs/common/structure/UaHistoryEvent.js +59 -0
- package/dist/cjs/common/structure/UaLiteralOperand.d.ts +12 -0
- package/dist/cjs/common/structure/UaLiteralOperand.js +43 -0
- package/dist/cjs/common/structure/UaRange.d.ts +14 -0
- package/dist/cjs/common/structure/UaRange.js +44 -0
- package/dist/cjs/common/structure/UaReadAtTimeDetails.d.ts +14 -0
- package/dist/cjs/common/structure/UaReadAtTimeDetails.js +41 -0
- package/dist/cjs/common/structure/UaReadEventDetails.d.ts +19 -0
- package/dist/cjs/common/structure/UaReadEventDetails.js +57 -0
- package/dist/cjs/common/structure/UaReadRawModifiedDetails.d.ts +20 -0
- package/dist/cjs/common/structure/UaReadRawModifiedDetails.js +58 -0
- package/dist/cjs/common/structure/UaSimpleAttributeOperand.d.ts +14 -0
- package/dist/cjs/common/structure/UaSimpleAttributeOperand.js +43 -0
- package/dist/cjs/common/structure/index.d.ts +15 -0
- package/dist/cjs/common/structure/index.js +31 -0
- package/dist/cjs/common/types/UaDataValue.d.ts +14 -0
- package/dist/cjs/common/types/UaDataValue.js +28 -0
- package/dist/cjs/common/types/UaError.d.ts +6 -0
- package/dist/cjs/common/types/UaError.js +15 -0
- package/dist/cjs/common/types/UaExpandedNodeId.d.ts +15 -0
- package/dist/cjs/common/types/UaExpandedNodeId.js +51 -0
- package/dist/cjs/common/types/UaExtensionObject.d.ts +9 -0
- package/dist/cjs/common/types/UaExtensionObject.js +19 -0
- package/dist/cjs/common/types/UaHistoryDataResult.d.ts +8 -0
- package/dist/cjs/common/types/UaHistoryDataResult.js +16 -0
- package/dist/cjs/common/types/UaHistoryEventFieldList.d.ts +7 -0
- package/dist/cjs/common/types/UaHistoryEventFieldList.js +23 -0
- package/dist/cjs/common/types/UaHistoryEventResult.d.ts +8 -0
- package/dist/cjs/common/types/UaHistoryEventResult.js +16 -0
- package/dist/cjs/common/types/UaLink.d.ts +12 -0
- package/dist/cjs/common/types/UaLink.js +24 -0
- package/dist/cjs/common/types/UaLocalizedText.d.ts +9 -0
- package/dist/cjs/common/types/UaLocalizedText.js +20 -0
- package/dist/cjs/common/types/UaNodeId.d.ts +23 -0
- package/dist/cjs/common/types/UaNodeId.js +154 -0
- package/dist/cjs/common/types/UaQuery.d.ts +11 -0
- package/dist/cjs/common/types/UaQuery.js +82 -0
- package/dist/cjs/common/types/UaQueryFilter.d.ts +27 -0
- package/dist/cjs/common/types/UaQueryFilter.js +74 -0
- package/dist/cjs/common/types/UaRequestPatameters.d.ts +11 -0
- package/dist/cjs/common/types/UaRequestPatameters.js +29 -0
- package/dist/cjs/common/types/UaServiceTypes.d.ts +18 -0
- package/dist/cjs/common/types/UaServiceTypes.js +2 -0
- package/dist/cjs/common/types/UaStatusCode.d.ts +24 -0
- package/dist/cjs/common/types/UaStatusCode.js +76 -0
- package/dist/cjs/common/types/UaTypes.d.ts +12 -0
- package/dist/cjs/common/types/UaTypes.js +2 -0
- package/dist/cjs/common/types/UaVariant.d.ts +89 -0
- package/dist/cjs/common/types/UaVariant.js +384 -0
- package/dist/cjs/common/types/index.d.ts +17 -0
- package/dist/cjs/common/types/index.js +33 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +18 -0
- package/dist/client/UaClientConfigure.d.ts +9 -0
- package/dist/client/UaClientConfigure.js +24 -0
- package/dist/client/UaWebClient.d.ts +38 -0
- package/dist/client/UaWebClient.js +590 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.js +19 -0
- package/dist/client/utils/UaDataTypeDictionary.d.ts +15 -0
- package/dist/client/utils/UaDataTypeDictionary.js +149 -0
- package/dist/client/utils/UaNodeReader.d.ts +83 -0
- package/dist/client/utils/UaNodeReader.js +714 -0
- package/dist/client/utils/UaObjectTypeDictionary.d.ts +12 -0
- package/dist/client/utils/UaObjectTypeDictionary.js +80 -0
- package/dist/client/utils/UaReferenceTypeDictionary.d.ts +12 -0
- package/dist/client/utils/UaReferenceTypeDictionary.js +80 -0
- package/dist/client/utils/index.d.ts +4 -0
- package/dist/client/utils/index.js +20 -0
- package/dist/common/index.d.ts +4 -0
- package/dist/common/index.js +20 -0
- package/dist/common/mapper/UaPayloadMapper.d.ts +18 -0
- package/dist/common/mapper/UaPayloadMapper.js +481 -0
- package/dist/common/mapper/index.d.ts +1 -0
- package/dist/common/mapper/index.js +17 -0
- package/dist/common/nodes/Identifiers.d.ts +2458 -0
- package/dist/common/nodes/Identifiers.js +2470 -0
- package/dist/common/nodes/UaAttributes.d.ts +18 -0
- package/dist/common/nodes/UaAttributes.js +2 -0
- package/dist/common/nodes/UaDataType.d.ts +15 -0
- package/dist/common/nodes/UaDataType.js +93 -0
- package/dist/common/nodes/UaMethod.d.ts +16 -0
- package/dist/common/nodes/UaMethod.js +77 -0
- package/dist/common/nodes/UaNode.d.ts +38 -0
- package/dist/common/nodes/UaNode.js +94 -0
- package/dist/common/nodes/UaObject.d.ts +16 -0
- package/dist/common/nodes/UaObject.js +69 -0
- package/dist/common/nodes/UaObjectType.d.ts +12 -0
- package/dist/common/nodes/UaObjectType.js +62 -0
- package/dist/common/nodes/UaReferenceType.d.ts +12 -0
- package/dist/common/nodes/UaReferenceType.js +33 -0
- package/dist/common/nodes/UaVariable.d.ts +25 -0
- package/dist/common/nodes/UaVariable.js +76 -0
- package/dist/common/nodes/UaVariableType.d.ts +14 -0
- package/dist/common/nodes/UaVariableType.js +50 -0
- package/dist/common/nodes/index.d.ts +10 -0
- package/dist/common/nodes/index.js +26 -0
- package/dist/common/structure/UaArgument.d.ts +19 -0
- package/dist/common/structure/UaArgument.js +65 -0
- package/dist/common/structure/UaContentFilter.d.ts +13 -0
- package/dist/common/structure/UaContentFilter.js +48 -0
- package/dist/common/structure/UaContentFilterElement.d.ts +12 -0
- package/dist/common/structure/UaContentFilterElement.js +43 -0
- package/dist/common/structure/UaEUInformation.d.ts +18 -0
- package/dist/common/structure/UaEUInformation.js +56 -0
- package/dist/common/structure/UaElementOperand.d.ts +12 -0
- package/dist/common/structure/UaElementOperand.js +36 -0
- package/dist/common/structure/UaEnumValueType.d.ts +16 -0
- package/dist/common/structure/UaEnumValueType.js +48 -0
- package/dist/common/structure/UaEventFilter.d.ts +14 -0
- package/dist/common/structure/UaEventFilter.js +49 -0
- package/dist/common/structure/UaHistoryData.d.ts +12 -0
- package/dist/common/structure/UaHistoryData.js +43 -0
- package/dist/common/structure/UaHistoryEvent.d.ts +12 -0
- package/dist/common/structure/UaHistoryEvent.js +59 -0
- package/dist/common/structure/UaLiteralOperand.d.ts +12 -0
- package/dist/common/structure/UaLiteralOperand.js +43 -0
- package/dist/common/structure/UaRange.d.ts +14 -0
- package/dist/common/structure/UaRange.js +44 -0
- package/dist/common/structure/UaReadAtTimeDetails.d.ts +14 -0
- package/dist/common/structure/UaReadAtTimeDetails.js +41 -0
- package/dist/common/structure/UaReadEventDetails.d.ts +19 -0
- package/dist/common/structure/UaReadEventDetails.js +57 -0
- package/dist/common/structure/UaReadRawModifiedDetails.d.ts +20 -0
- package/dist/common/structure/UaReadRawModifiedDetails.js +58 -0
- package/dist/common/structure/UaSimpleAttributeOperand.d.ts +14 -0
- package/dist/common/structure/UaSimpleAttributeOperand.js +43 -0
- package/dist/common/structure/index.d.ts +15 -0
- package/dist/common/structure/index.js +31 -0
- package/dist/common/types/UaDataValue.d.ts +14 -0
- package/dist/common/types/UaDataValue.js +28 -0
- package/dist/common/types/UaError.d.ts +6 -0
- package/dist/common/types/UaError.js +15 -0
- package/dist/common/types/UaExpandedNodeId.d.ts +15 -0
- package/dist/common/types/UaExpandedNodeId.js +51 -0
- package/dist/common/types/UaExtensionObject.d.ts +9 -0
- package/dist/common/types/UaExtensionObject.js +19 -0
- package/dist/common/types/UaHistoryDataResult.d.ts +8 -0
- package/dist/common/types/UaHistoryDataResult.js +16 -0
- package/dist/common/types/UaHistoryEventFieldList.d.ts +7 -0
- package/dist/common/types/UaHistoryEventFieldList.js +23 -0
- package/dist/common/types/UaHistoryEventResult.d.ts +8 -0
- package/dist/common/types/UaHistoryEventResult.js +16 -0
- package/dist/common/types/UaLink.d.ts +12 -0
- package/dist/common/types/UaLink.js +24 -0
- package/dist/common/types/UaLocalizedText.d.ts +9 -0
- package/dist/common/types/UaLocalizedText.js +20 -0
- package/dist/common/types/UaNodeId.d.ts +23 -0
- package/dist/common/types/UaNodeId.js +154 -0
- package/dist/common/types/UaQuery.d.ts +11 -0
- package/dist/common/types/UaQuery.js +82 -0
- package/dist/common/types/UaQueryFilter.d.ts +27 -0
- package/dist/common/types/UaQueryFilter.js +74 -0
- package/dist/common/types/UaRequestPatameters.d.ts +11 -0
- package/dist/common/types/UaRequestPatameters.js +29 -0
- package/dist/common/types/UaServiceTypes.d.ts +18 -0
- package/dist/common/types/UaServiceTypes.js +2 -0
- package/dist/common/types/UaStatusCode.d.ts +24 -0
- package/dist/common/types/UaStatusCode.js +76 -0
- package/dist/common/types/UaTypes.d.ts +12 -0
- package/dist/common/types/UaTypes.js +2 -0
- package/dist/common/types/UaVariant.d.ts +89 -0
- package/dist/common/types/UaVariant.js +384 -0
- package/dist/common/types/index.d.ts +17 -0
- package/dist/common/types/index.js +33 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18 -0
- package/package.json +23 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UaHistoryEvent = void 0;
|
|
4
|
+
const opcua_webapi_1 = require("opcua-webapi");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const mapper_1 = require("../mapper");
|
|
7
|
+
const nodes_1 = require("../nodes");
|
|
8
|
+
class UaHistoryEvent {
|
|
9
|
+
constructor(events) {
|
|
10
|
+
this._events = events;
|
|
11
|
+
}
|
|
12
|
+
get events() {
|
|
13
|
+
return this._events;
|
|
14
|
+
}
|
|
15
|
+
toStruct() {
|
|
16
|
+
let events = [];
|
|
17
|
+
for (let item of this._events) {
|
|
18
|
+
let eventFields = [];
|
|
19
|
+
for (let item2 of item.eventFields) {
|
|
20
|
+
eventFields.push(mapper_1.UaPayloadMapper.variantToWebApi(item2));
|
|
21
|
+
}
|
|
22
|
+
let fieldList = { EventFields: eventFields };
|
|
23
|
+
events.push(fieldList);
|
|
24
|
+
}
|
|
25
|
+
let historyEvent = { Events: events };
|
|
26
|
+
return historyEvent;
|
|
27
|
+
}
|
|
28
|
+
static fromStruct(historyEvent) {
|
|
29
|
+
try {
|
|
30
|
+
let events = [];
|
|
31
|
+
if (historyEvent.Events) {
|
|
32
|
+
for (let item of historyEvent.Events) {
|
|
33
|
+
if (undefined == item.EventFields)
|
|
34
|
+
continue;
|
|
35
|
+
let eventFields = [];
|
|
36
|
+
for (let item2 of item.EventFields) {
|
|
37
|
+
eventFields.push(mapper_1.UaPayloadMapper.variantFromWebApi(item2));
|
|
38
|
+
}
|
|
39
|
+
events.push(new types_1.UaHistoryEventFieldList(eventFields));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return new UaHistoryEvent(events);
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
toExtensionObject() {
|
|
49
|
+
return new types_1.UaExtensionObject(UaHistoryEvent.dataTypeId, (0, opcua_webapi_1.HistoryEventToJSONTyped)(this.toStruct()));
|
|
50
|
+
}
|
|
51
|
+
static fromExtensionObject(extensionObject) {
|
|
52
|
+
if (!UaHistoryEvent.dataTypeId.equal(extensionObject.typeId))
|
|
53
|
+
return null;
|
|
54
|
+
let historyEvent = (0, opcua_webapi_1.HistoryEventFromJSON)(extensionObject.body);
|
|
55
|
+
return UaHistoryEvent.fromStruct(historyEvent);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.UaHistoryEvent = UaHistoryEvent;
|
|
59
|
+
UaHistoryEvent.dataTypeId = new types_1.UaNodeId(nodes_1.DataTypeIds.HistoryEvent);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LiteralOperand } from "opcua-webapi";
|
|
2
|
+
import { UaExtensionObject, UaNodeId, UaVariant } from "../types";
|
|
3
|
+
export declare class UaLiteralOperand {
|
|
4
|
+
static dataTypeId: UaNodeId;
|
|
5
|
+
private _value;
|
|
6
|
+
constructor(value: UaVariant);
|
|
7
|
+
get value(): UaVariant;
|
|
8
|
+
toStruct(): LiteralOperand;
|
|
9
|
+
static fromStruct(operand: LiteralOperand): UaLiteralOperand | null;
|
|
10
|
+
toExtensionObject(): UaExtensionObject;
|
|
11
|
+
static fromExtensionObject(extensionObject: UaExtensionObject): UaLiteralOperand | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UaLiteralOperand = void 0;
|
|
4
|
+
const opcua_webapi_1 = require("opcua-webapi");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const mapper_1 = require("../mapper");
|
|
7
|
+
const nodes_1 = require("../nodes");
|
|
8
|
+
class UaLiteralOperand {
|
|
9
|
+
constructor(value) {
|
|
10
|
+
this._value = value;
|
|
11
|
+
}
|
|
12
|
+
get value() {
|
|
13
|
+
return this._value;
|
|
14
|
+
}
|
|
15
|
+
toStruct() {
|
|
16
|
+
let operand = {
|
|
17
|
+
Value: mapper_1.UaPayloadMapper.variantToWebApi(this._value)
|
|
18
|
+
};
|
|
19
|
+
return operand;
|
|
20
|
+
}
|
|
21
|
+
static fromStruct(operand) {
|
|
22
|
+
if (null == operand.Value)
|
|
23
|
+
return null;
|
|
24
|
+
try {
|
|
25
|
+
let value = mapper_1.UaPayloadMapper.variantFromWebApi(operand.Value);
|
|
26
|
+
return new UaLiteralOperand(value);
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
toExtensionObject() {
|
|
33
|
+
return new types_1.UaExtensionObject(UaLiteralOperand.dataTypeId, (0, opcua_webapi_1.LiteralOperandToJSONTyped)(this.toStruct()));
|
|
34
|
+
}
|
|
35
|
+
static fromExtensionObject(extensionObject) {
|
|
36
|
+
if (!UaLiteralOperand.dataTypeId.equal(extensionObject.typeId))
|
|
37
|
+
return null;
|
|
38
|
+
let operand = (0, opcua_webapi_1.LiteralOperandFromJSON)(extensionObject.body);
|
|
39
|
+
return UaLiteralOperand.fromStruct(operand);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.UaLiteralOperand = UaLiteralOperand;
|
|
43
|
+
UaLiteralOperand.dataTypeId = new types_1.UaNodeId(nodes_1.DataTypeIds.LiteralOperand);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Range } from "opcua-webapi";
|
|
2
|
+
import { UaExtensionObject, UaNodeId } from "../types";
|
|
3
|
+
export declare class UaRange {
|
|
4
|
+
static dataTypeId: UaNodeId;
|
|
5
|
+
private _low;
|
|
6
|
+
private _high;
|
|
7
|
+
constructor(low: number | null, high: number | null);
|
|
8
|
+
get low(): number | null;
|
|
9
|
+
get high(): number | null;
|
|
10
|
+
toStruct(): Range;
|
|
11
|
+
static fromStruct(range: Range): UaRange | null;
|
|
12
|
+
toExtensionObject(): UaExtensionObject;
|
|
13
|
+
static fromExtensionObject(extensionObject: UaExtensionObject): UaRange | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UaRange = void 0;
|
|
4
|
+
const opcua_webapi_1 = require("opcua-webapi");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const nodes_1 = require("../nodes");
|
|
7
|
+
class UaRange {
|
|
8
|
+
constructor(low, high) {
|
|
9
|
+
this._low = (low) ? low : Number.MIN_SAFE_INTEGER;
|
|
10
|
+
this._high = (high) ? high : Number.MAX_SAFE_INTEGER;
|
|
11
|
+
if (this._high < this._low) {
|
|
12
|
+
let tmp = this._high;
|
|
13
|
+
this._low = this._high;
|
|
14
|
+
this._high = tmp;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
get low() {
|
|
18
|
+
return this._low;
|
|
19
|
+
}
|
|
20
|
+
get high() {
|
|
21
|
+
return this._high;
|
|
22
|
+
}
|
|
23
|
+
toStruct() {
|
|
24
|
+
let range = {
|
|
25
|
+
Low: this._low,
|
|
26
|
+
High: this._high
|
|
27
|
+
};
|
|
28
|
+
return range;
|
|
29
|
+
}
|
|
30
|
+
static fromStruct(range) {
|
|
31
|
+
return new UaRange(range.Low, range.High);
|
|
32
|
+
}
|
|
33
|
+
toExtensionObject() {
|
|
34
|
+
return new types_1.UaExtensionObject(UaRange.dataTypeId, (0, opcua_webapi_1.RangeToJSONTyped)(this.toStruct()));
|
|
35
|
+
}
|
|
36
|
+
static fromExtensionObject(extensionObject) {
|
|
37
|
+
if (!UaRange.dataTypeId.equal(extensionObject.typeId))
|
|
38
|
+
return null;
|
|
39
|
+
let range = (0, opcua_webapi_1.RangeFromJSON)(extensionObject.body);
|
|
40
|
+
return UaRange.fromStruct(range);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.UaRange = UaRange;
|
|
44
|
+
UaRange.dataTypeId = new types_1.UaNodeId(nodes_1.DataTypeIds.Range);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReadAtTimeDetails } from "opcua-webapi";
|
|
2
|
+
import { UaExtensionObject, UaNodeId } from "../types";
|
|
3
|
+
export declare class UaReadAtTimeDetails {
|
|
4
|
+
static dataTypeId: UaNodeId;
|
|
5
|
+
private _reqTimes;
|
|
6
|
+
private _useSimpleBounds;
|
|
7
|
+
constructor(reqTimes: Array<Date>, useSimpleBounds?: boolean | null);
|
|
8
|
+
get reqTimes(): Date[];
|
|
9
|
+
get useSimpleBounds(): boolean;
|
|
10
|
+
toStruct(): ReadAtTimeDetails;
|
|
11
|
+
static fromStruct(details: ReadAtTimeDetails): UaReadAtTimeDetails | null;
|
|
12
|
+
toExtensionObject(): UaExtensionObject;
|
|
13
|
+
static fromExtensionObject(extensionObject: UaExtensionObject): UaReadAtTimeDetails | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UaReadAtTimeDetails = void 0;
|
|
4
|
+
const opcua_webapi_1 = require("opcua-webapi");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const nodes_1 = require("../nodes");
|
|
7
|
+
class UaReadAtTimeDetails {
|
|
8
|
+
constructor(reqTimes, useSimpleBounds) {
|
|
9
|
+
this._reqTimes = reqTimes;
|
|
10
|
+
this._useSimpleBounds = (useSimpleBounds) ? true : false;
|
|
11
|
+
}
|
|
12
|
+
get reqTimes() {
|
|
13
|
+
return this._reqTimes;
|
|
14
|
+
}
|
|
15
|
+
get useSimpleBounds() {
|
|
16
|
+
return this._useSimpleBounds;
|
|
17
|
+
}
|
|
18
|
+
toStruct() {
|
|
19
|
+
let details = {
|
|
20
|
+
ReqTimes: this.reqTimes,
|
|
21
|
+
UseSimpleBounds: this.useSimpleBounds
|
|
22
|
+
};
|
|
23
|
+
return details;
|
|
24
|
+
}
|
|
25
|
+
static fromStruct(details) {
|
|
26
|
+
if (!details.ReqTimes)
|
|
27
|
+
return null;
|
|
28
|
+
return new UaReadAtTimeDetails(details.ReqTimes, details.UseSimpleBounds);
|
|
29
|
+
}
|
|
30
|
+
toExtensionObject() {
|
|
31
|
+
return new types_1.UaExtensionObject(UaReadAtTimeDetails.dataTypeId, (0, opcua_webapi_1.ReadAtTimeDetailsToJSONTyped)(this.toStruct()));
|
|
32
|
+
}
|
|
33
|
+
static fromExtensionObject(extensionObject) {
|
|
34
|
+
if (!UaReadAtTimeDetails.dataTypeId.equal(extensionObject.typeId))
|
|
35
|
+
return null;
|
|
36
|
+
let details = (0, opcua_webapi_1.ReadAtTimeDetailsFromJSON)(extensionObject.body);
|
|
37
|
+
return UaReadAtTimeDetails.fromStruct(details);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.UaReadAtTimeDetails = UaReadAtTimeDetails;
|
|
41
|
+
UaReadAtTimeDetails.dataTypeId = new types_1.UaNodeId(nodes_1.DataTypeIds.ReadAtTimeDetails);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReadEventDetails } from "opcua-webapi";
|
|
2
|
+
import { UaExtensionObject, UaNodeId } from "../types";
|
|
3
|
+
import { UaEventFilter } from ".";
|
|
4
|
+
export declare class UaReadEventDetails {
|
|
5
|
+
static dataTypeId: UaNodeId;
|
|
6
|
+
private _startTime;
|
|
7
|
+
private _endTime;
|
|
8
|
+
private _filter;
|
|
9
|
+
private _numValuesPerNode;
|
|
10
|
+
constructor(startTime: Date, endTime: Date, filter: UaEventFilter, numValuesPerNode?: number);
|
|
11
|
+
get startTime(): Date;
|
|
12
|
+
get endTime(): Date;
|
|
13
|
+
get filter(): UaEventFilter;
|
|
14
|
+
get numValuesPerNode(): number;
|
|
15
|
+
toStruct(): ReadEventDetails;
|
|
16
|
+
static fromStruct(details: ReadEventDetails): UaReadEventDetails | null;
|
|
17
|
+
toExtensionObject(): UaExtensionObject;
|
|
18
|
+
static fromExtensionObject(extensionObject: UaExtensionObject): UaReadEventDetails | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UaReadEventDetails = void 0;
|
|
4
|
+
const opcua_webapi_1 = require("opcua-webapi");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const nodes_1 = require("../nodes");
|
|
7
|
+
const _1 = require(".");
|
|
8
|
+
class UaReadEventDetails {
|
|
9
|
+
constructor(startTime, endTime, filter, numValuesPerNode) {
|
|
10
|
+
this._startTime = startTime;
|
|
11
|
+
this._endTime = endTime;
|
|
12
|
+
this._filter = filter;
|
|
13
|
+
this._numValuesPerNode = (numValuesPerNode && numValuesPerNode > 0) ? numValuesPerNode : 0;
|
|
14
|
+
}
|
|
15
|
+
get startTime() {
|
|
16
|
+
return this._startTime;
|
|
17
|
+
}
|
|
18
|
+
get endTime() {
|
|
19
|
+
return this._endTime;
|
|
20
|
+
}
|
|
21
|
+
get filter() {
|
|
22
|
+
return this._filter;
|
|
23
|
+
}
|
|
24
|
+
get numValuesPerNode() {
|
|
25
|
+
return this._numValuesPerNode;
|
|
26
|
+
}
|
|
27
|
+
toStruct() {
|
|
28
|
+
let details = {
|
|
29
|
+
StartTime: this.startTime,
|
|
30
|
+
EndTime: this.endTime,
|
|
31
|
+
Filter: this.filter.toStruct(),
|
|
32
|
+
NumValuesPerNode: this.numValuesPerNode
|
|
33
|
+
};
|
|
34
|
+
return details;
|
|
35
|
+
}
|
|
36
|
+
static fromStruct(details) {
|
|
37
|
+
if (undefined == details.StartTime || !(details.StartTime instanceof Date) ||
|
|
38
|
+
undefined == details.EndTime || !(details.EndTime instanceof Date) ||
|
|
39
|
+
undefined == details.Filter)
|
|
40
|
+
return null;
|
|
41
|
+
let filter = _1.UaEventFilter.fromStruct(details.Filter);
|
|
42
|
+
if (null == filter)
|
|
43
|
+
return null;
|
|
44
|
+
return new UaReadEventDetails(details.StartTime, details.EndTime, filter, details.NumValuesPerNode);
|
|
45
|
+
}
|
|
46
|
+
toExtensionObject() {
|
|
47
|
+
return new types_1.UaExtensionObject(UaReadEventDetails.dataTypeId, (0, opcua_webapi_1.ReadEventDetailsToJSONTyped)(this.toStruct()));
|
|
48
|
+
}
|
|
49
|
+
static fromExtensionObject(extensionObject) {
|
|
50
|
+
if (!UaReadEventDetails.dataTypeId.equal(extensionObject.typeId))
|
|
51
|
+
return null;
|
|
52
|
+
let details = (0, opcua_webapi_1.ReadEventDetailsFromJSON)(extensionObject.body);
|
|
53
|
+
return UaReadEventDetails.fromStruct(details);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.UaReadEventDetails = UaReadEventDetails;
|
|
57
|
+
UaReadEventDetails.dataTypeId = new types_1.UaNodeId(nodes_1.DataTypeIds.ReadEventDetails);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReadRawModifiedDetails } from "opcua-webapi";
|
|
2
|
+
import { UaExtensionObject, UaNodeId } from "../types";
|
|
3
|
+
export declare class UaReadRawModifiedDetails {
|
|
4
|
+
static dataTypeId: UaNodeId;
|
|
5
|
+
private _startTime;
|
|
6
|
+
private _endTime;
|
|
7
|
+
private _numValuesPerNode;
|
|
8
|
+
private _returnBounds;
|
|
9
|
+
private _isReadModified;
|
|
10
|
+
constructor(startTime: Date, endTime: Date, numValuesPerNode?: number, returnBounds?: boolean | null, isReadModified?: boolean | null);
|
|
11
|
+
get startTime(): Date;
|
|
12
|
+
get endTime(): Date;
|
|
13
|
+
get numValuesPerNode(): number;
|
|
14
|
+
get returnBounds(): boolean;
|
|
15
|
+
get isReadModified(): boolean;
|
|
16
|
+
toStruct(): ReadRawModifiedDetails;
|
|
17
|
+
static fromStruct(details: ReadRawModifiedDetails): UaReadRawModifiedDetails | null;
|
|
18
|
+
toExtensionObject(): UaExtensionObject;
|
|
19
|
+
static fromExtensionObject(extensionObject: UaExtensionObject): UaReadRawModifiedDetails | null;
|
|
20
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UaReadRawModifiedDetails = void 0;
|
|
4
|
+
const opcua_webapi_1 = require("opcua-webapi");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const nodes_1 = require("../nodes");
|
|
7
|
+
class UaReadRawModifiedDetails {
|
|
8
|
+
constructor(startTime, endTime, numValuesPerNode, returnBounds, isReadModified) {
|
|
9
|
+
this._startTime = startTime;
|
|
10
|
+
this._endTime = endTime;
|
|
11
|
+
this._numValuesPerNode = (numValuesPerNode > 0) ? numValuesPerNode : 0;
|
|
12
|
+
this._returnBounds = (returnBounds) ? returnBounds : null;
|
|
13
|
+
this._isReadModified = (isReadModified) ? isReadModified : null;
|
|
14
|
+
}
|
|
15
|
+
get startTime() {
|
|
16
|
+
return this._startTime;
|
|
17
|
+
}
|
|
18
|
+
get endTime() {
|
|
19
|
+
return this._endTime;
|
|
20
|
+
}
|
|
21
|
+
get numValuesPerNode() {
|
|
22
|
+
return this._numValuesPerNode;
|
|
23
|
+
}
|
|
24
|
+
get returnBounds() {
|
|
25
|
+
return this._returnBounds;
|
|
26
|
+
}
|
|
27
|
+
get isReadModified() {
|
|
28
|
+
return this._isReadModified;
|
|
29
|
+
}
|
|
30
|
+
toStruct() {
|
|
31
|
+
let details = {
|
|
32
|
+
StartTime: this.startTime,
|
|
33
|
+
EndTime: this.endTime,
|
|
34
|
+
NumValuesPerNode: this.numValuesPerNode,
|
|
35
|
+
ReturnBounds: this.returnBounds,
|
|
36
|
+
IsReadModified: this.isReadModified
|
|
37
|
+
};
|
|
38
|
+
return details;
|
|
39
|
+
}
|
|
40
|
+
static fromStruct(details) {
|
|
41
|
+
let startTime = details.StartTime;
|
|
42
|
+
let endTime = details.EndTime;
|
|
43
|
+
if (null == startTime || null == endTime)
|
|
44
|
+
return null;
|
|
45
|
+
return new UaReadRawModifiedDetails(startTime, endTime, details.NumValuesPerNode, details.ReturnBounds, details.IsReadModified);
|
|
46
|
+
}
|
|
47
|
+
toExtensionObject() {
|
|
48
|
+
return new types_1.UaExtensionObject(UaReadRawModifiedDetails.dataTypeId, (0, opcua_webapi_1.ReadRawModifiedDetailsToJSONTyped)(this.toStruct()));
|
|
49
|
+
}
|
|
50
|
+
static fromExtensionObject(extensionObject) {
|
|
51
|
+
if (!UaReadRawModifiedDetails.dataTypeId.equal(extensionObject.typeId))
|
|
52
|
+
return null;
|
|
53
|
+
let details = (0, opcua_webapi_1.ReadRawModifiedDetailsFromJSON)(extensionObject.body);
|
|
54
|
+
return UaReadRawModifiedDetails.fromStruct(details);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.UaReadRawModifiedDetails = UaReadRawModifiedDetails;
|
|
58
|
+
UaReadRawModifiedDetails.dataTypeId = new types_1.UaNodeId(nodes_1.DataTypeIds.ReadRawModifiedDetails);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SimpleAttributeOperand } from "opcua-webapi";
|
|
2
|
+
import { UaExtensionObject, UaNodeId } from "../types";
|
|
3
|
+
export declare class UaSimpleAttributeOperand {
|
|
4
|
+
static dataTypeId: UaNodeId;
|
|
5
|
+
private _browsePath;
|
|
6
|
+
private _typeDefinitionId;
|
|
7
|
+
constructor(browsePath: Array<string>, typeDefinitionId?: UaNodeId | null);
|
|
8
|
+
get browsePath(): Array<string>;
|
|
9
|
+
get typeDefinitionId(): UaNodeId;
|
|
10
|
+
toStruct(): SimpleAttributeOperand;
|
|
11
|
+
static fromStruct(operand: SimpleAttributeOperand): UaSimpleAttributeOperand | null;
|
|
12
|
+
toExtensionObject(): UaExtensionObject;
|
|
13
|
+
static fromExtensionObject(extensionObject: UaExtensionObject): UaSimpleAttributeOperand | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UaSimpleAttributeOperand = void 0;
|
|
4
|
+
const opcua_webapi_1 = require("opcua-webapi");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const nodes_1 = require("../nodes");
|
|
7
|
+
class UaSimpleAttributeOperand {
|
|
8
|
+
constructor(browsePath, typeDefinitionId) {
|
|
9
|
+
this._browsePath = browsePath;
|
|
10
|
+
this._typeDefinitionId = (typeDefinitionId) ? typeDefinitionId : types_1.UaNodeId.nullNodeId;
|
|
11
|
+
}
|
|
12
|
+
get browsePath() {
|
|
13
|
+
return this._browsePath;
|
|
14
|
+
}
|
|
15
|
+
get typeDefinitionId() {
|
|
16
|
+
return this._typeDefinitionId;
|
|
17
|
+
}
|
|
18
|
+
toStruct() {
|
|
19
|
+
let operand = {
|
|
20
|
+
BrowsePath: this._browsePath,
|
|
21
|
+
TypeDefinitionId: (!this._typeDefinitionId.isEmpty()) ? this._typeDefinitionId.toString() : undefined
|
|
22
|
+
};
|
|
23
|
+
return operand;
|
|
24
|
+
}
|
|
25
|
+
static fromStruct(operand) {
|
|
26
|
+
if (null == operand.BrowsePath)
|
|
27
|
+
return null;
|
|
28
|
+
let browsePath = operand.BrowsePath;
|
|
29
|
+
let dataTypeId = (0, types_1.parseUaNodeIdOrNull)(operand.TypeDefinitionId);
|
|
30
|
+
return new UaSimpleAttributeOperand(browsePath, dataTypeId);
|
|
31
|
+
}
|
|
32
|
+
toExtensionObject() {
|
|
33
|
+
return new types_1.UaExtensionObject(UaSimpleAttributeOperand.dataTypeId, (0, opcua_webapi_1.SimpleAttributeOperandToJSONTyped)(this.toStruct()));
|
|
34
|
+
}
|
|
35
|
+
static fromExtensionObject(extensionObject) {
|
|
36
|
+
if (!UaSimpleAttributeOperand.dataTypeId.equal(extensionObject.typeId))
|
|
37
|
+
return null;
|
|
38
|
+
let operand = (0, opcua_webapi_1.SimpleAttributeOperandFromJSON)(extensionObject.body);
|
|
39
|
+
return UaSimpleAttributeOperand.fromStruct(operand);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.UaSimpleAttributeOperand = UaSimpleAttributeOperand;
|
|
43
|
+
UaSimpleAttributeOperand.dataTypeId = new types_1.UaNodeId(nodes_1.DataTypeIds.SimpleAttributeOperand);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./UaArgument";
|
|
2
|
+
export * from "./UaContentFilter";
|
|
3
|
+
export * from "./UaContentFilterElement";
|
|
4
|
+
export * from "./UaElementOperand";
|
|
5
|
+
export * from "./UaEnumValueType";
|
|
6
|
+
export * from "./UaEUInformation";
|
|
7
|
+
export * from "./UaEventFilter";
|
|
8
|
+
export * from "./UaHistoryData";
|
|
9
|
+
export * from "./UaHistoryEvent";
|
|
10
|
+
export * from "./UaLiteralOperand";
|
|
11
|
+
export * from "./UaRange";
|
|
12
|
+
export * from "./UaReadAtTimeDetails";
|
|
13
|
+
export * from "./UaReadEventDetails";
|
|
14
|
+
export * from "./UaReadRawModifiedDetails";
|
|
15
|
+
export * from "./UaSimpleAttributeOperand";
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
__exportStar(require("./UaArgument"), exports);
|
|
18
|
+
__exportStar(require("./UaContentFilter"), exports);
|
|
19
|
+
__exportStar(require("./UaContentFilterElement"), exports);
|
|
20
|
+
__exportStar(require("./UaElementOperand"), exports);
|
|
21
|
+
__exportStar(require("./UaEnumValueType"), exports);
|
|
22
|
+
__exportStar(require("./UaEUInformation"), exports);
|
|
23
|
+
__exportStar(require("./UaEventFilter"), exports);
|
|
24
|
+
__exportStar(require("./UaHistoryData"), exports);
|
|
25
|
+
__exportStar(require("./UaHistoryEvent"), exports);
|
|
26
|
+
__exportStar(require("./UaLiteralOperand"), exports);
|
|
27
|
+
__exportStar(require("./UaRange"), exports);
|
|
28
|
+
__exportStar(require("./UaReadAtTimeDetails"), exports);
|
|
29
|
+
__exportStar(require("./UaReadEventDetails"), exports);
|
|
30
|
+
__exportStar(require("./UaReadRawModifiedDetails"), exports);
|
|
31
|
+
__exportStar(require("./UaSimpleAttributeOperand"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UaStatusCode } from "./UaStatusCode";
|
|
2
|
+
import { UaVariant } from "./UaVariant";
|
|
3
|
+
export declare class UaDataValue {
|
|
4
|
+
private _value;
|
|
5
|
+
private _statusCode;
|
|
6
|
+
private _sourceTimestamp;
|
|
7
|
+
private _serverTimestamp;
|
|
8
|
+
constructor(value: UaVariant, statusCode?: UaStatusCode, sourceTimestamp?: Date, serverTimestamp?: Date);
|
|
9
|
+
get value(): UaVariant;
|
|
10
|
+
get statusCode(): UaStatusCode;
|
|
11
|
+
get sourceTimestamp(): Date | null;
|
|
12
|
+
get serverTimestamp(): Date | null;
|
|
13
|
+
static dataValue(value: UaVariant, timeStamp?: Date): UaDataValue;
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UaDataValue = void 0;
|
|
4
|
+
const UaStatusCode_1 = require("./UaStatusCode");
|
|
5
|
+
class UaDataValue {
|
|
6
|
+
constructor(value, statusCode, sourceTimestamp, serverTimestamp) {
|
|
7
|
+
this._value = value;
|
|
8
|
+
this._statusCode = (statusCode) ? statusCode : (0, UaStatusCode_1.makeUaStatusCode)();
|
|
9
|
+
this._sourceTimestamp = (sourceTimestamp) ? sourceTimestamp : null;
|
|
10
|
+
this._serverTimestamp = (serverTimestamp) ? serverTimestamp : null;
|
|
11
|
+
}
|
|
12
|
+
get value() {
|
|
13
|
+
return this._value;
|
|
14
|
+
}
|
|
15
|
+
get statusCode() {
|
|
16
|
+
return this._statusCode;
|
|
17
|
+
}
|
|
18
|
+
get sourceTimestamp() {
|
|
19
|
+
return this._sourceTimestamp;
|
|
20
|
+
}
|
|
21
|
+
get serverTimestamp() {
|
|
22
|
+
return this._serverTimestamp;
|
|
23
|
+
}
|
|
24
|
+
static dataValue(value, timeStamp) {
|
|
25
|
+
return new UaDataValue(value, undefined, timeStamp, timeStamp);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.UaDataValue = UaDataValue;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UaError = void 0;
|
|
4
|
+
class UaError extends Error {
|
|
5
|
+
constructor(statusCode) {
|
|
6
|
+
super();
|
|
7
|
+
this._statusCode = statusCode;
|
|
8
|
+
this.name = statusCode.name;
|
|
9
|
+
this.message = statusCode.name;
|
|
10
|
+
}
|
|
11
|
+
get statusCode() {
|
|
12
|
+
return this._statusCode;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.UaError = UaError;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UaNodeId } from ".";
|
|
2
|
+
export declare class UaExpandedNodeId {
|
|
3
|
+
private _nodeId;
|
|
4
|
+
private _namespaceUri;
|
|
5
|
+
private _serverIndex;
|
|
6
|
+
constructor(nodeId: UaNodeId, namespaceUri?: string | null, serverIndex?: number);
|
|
7
|
+
get namespaceUri(): string | null;
|
|
8
|
+
get serverIndex(): number;
|
|
9
|
+
isEmpty(): boolean;
|
|
10
|
+
equal(other: UaExpandedNodeId): boolean;
|
|
11
|
+
isLocalNodeId(): boolean;
|
|
12
|
+
getNodeId(namespaceUris?: Array<string>): UaNodeId | null;
|
|
13
|
+
toString(): string;
|
|
14
|
+
}
|
|
15
|
+
export declare function parseUaExpandedNodeId(value: string): UaExpandedNodeId;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UaExpandedNodeId = void 0;
|
|
4
|
+
exports.parseUaExpandedNodeId = parseUaExpandedNodeId;
|
|
5
|
+
/**
|
|
6
|
+
* @module node-opcua-nodeid
|
|
7
|
+
*/
|
|
8
|
+
const _1 = require(".");
|
|
9
|
+
class UaExpandedNodeId {
|
|
10
|
+
constructor(nodeId, namespaceUri, serverIndex) {
|
|
11
|
+
this._nodeId = nodeId;
|
|
12
|
+
this._namespaceUri = (namespaceUri) ? namespaceUri : null;
|
|
13
|
+
this._serverIndex = (serverIndex) ? serverIndex : 0;
|
|
14
|
+
}
|
|
15
|
+
get namespaceUri() {
|
|
16
|
+
return this._namespaceUri;
|
|
17
|
+
}
|
|
18
|
+
get serverIndex() {
|
|
19
|
+
return this._serverIndex;
|
|
20
|
+
}
|
|
21
|
+
isEmpty() {
|
|
22
|
+
return this._nodeId.isEmpty();
|
|
23
|
+
}
|
|
24
|
+
equal(other) {
|
|
25
|
+
if (!this._nodeId.equal(other._nodeId))
|
|
26
|
+
return false;
|
|
27
|
+
if (this._serverIndex !== other._serverIndex)
|
|
28
|
+
return false;
|
|
29
|
+
if (this._namespaceUri !== other._namespaceUri)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
isLocalNodeId() {
|
|
34
|
+
return (this._namespaceUri) ? false : true;
|
|
35
|
+
}
|
|
36
|
+
getNodeId(namespaceUris) {
|
|
37
|
+
if (this.isLocalNodeId())
|
|
38
|
+
return this._nodeId;
|
|
39
|
+
// To be implemented
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
toString() {
|
|
43
|
+
// To be implemented
|
|
44
|
+
return this._nodeId.toString();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.UaExpandedNodeId = UaExpandedNodeId;
|
|
48
|
+
function parseUaExpandedNodeId(value) {
|
|
49
|
+
let nodeId = (0, _1.parseUaNodeId)(value);
|
|
50
|
+
return new UaExpandedNodeId(nodeId, null, 0);
|
|
51
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UaExtensionObject = void 0;
|
|
4
|
+
class UaExtensionObject {
|
|
5
|
+
constructor(typeId, body) {
|
|
6
|
+
this._typeId = typeId;
|
|
7
|
+
this._body = body;
|
|
8
|
+
}
|
|
9
|
+
isValid() {
|
|
10
|
+
return (this._typeId.isEmpty()) ? false : true;
|
|
11
|
+
}
|
|
12
|
+
get body() {
|
|
13
|
+
return this._body;
|
|
14
|
+
}
|
|
15
|
+
get typeId() {
|
|
16
|
+
return this._typeId;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.UaExtensionObject = UaExtensionObject;
|