node-opcua-address-space 2.73.0 → 2.75.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.
- package/LICENSE +3 -1
- package/dist/source/helpers/argument_list.d.ts +1 -2
- package/dist/source/helpers/argument_list.js +2 -29
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/helpers/multiform_func.js +4 -2
- package/dist/source/helpers/multiform_func.js.map +1 -1
- package/dist/source/index.d.ts +0 -2
- package/dist/source/index.js +1 -5
- package/dist/source/index.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +5 -11
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js +0 -7
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +4 -6
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +16 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +1 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +2 -4
- package/dist/source/namespace_alarm_and_condition.d.ts +19 -11
- package/dist/src/address_space.js +17 -12
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +3 -12
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +84 -93
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +3 -2
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +27 -12
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
- package/dist/src/alarms_and_conditions/index.d.ts +0 -2
- package/dist/src/alarms_and_conditions/index.js +0 -2
- package/dist/src/alarms_and_conditions/index.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +5 -5
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +4 -6
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +13 -13
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +15 -15
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +3 -3
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +18 -13
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/event_data.d.ts +22 -17
- package/dist/src/event_data.js +33 -64
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/index_current.d.ts +0 -1
- package/dist/src/index_current.js +0 -1
- package/dist/src/index_current.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +14 -11
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js +16 -4
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.js +1 -1
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/ua_object_impl.js +0 -1
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.d.ts +1 -1
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.js +2 -1
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/package.json +38 -38
- package/source/helpers/argument_list.ts +4 -36
- package/source/helpers/multiform_func.ts +5 -3
- package/source/index.ts +0 -2
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +12 -30
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +8 -6
- package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +9 -0
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +4 -0
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +4 -0
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +4 -0
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +16 -1
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +1 -0
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +1 -2
- package/source/namespace_alarm_and_condition.ts +48 -23
- package/src/address_space.ts +22 -16
- package/src/alarms_and_conditions/condition.ts +1 -1
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +95 -102
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +33 -18
- package/src/alarms_and_conditions/index.ts +0 -2
- package/src/alarms_and_conditions/ua_condition_impl.ts +5 -5
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +5 -6
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +6 -8
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +5 -3
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +18 -16
- package/src/event_data.ts +47 -77
- package/src/index_current.ts +0 -1
- package/src/namespace_impl.ts +47 -26
- package/src/nodeset_tools/nodeset_to_xml.ts +18 -6
- package/src/state_machine/ua_two_state_variable.ts +1 -1
- package/src/ua_object_impl.ts +1 -2
- package/src/ua_variable_impl.ts +3 -11
- package/test_helpers/alarms_and_conditions_demo.ts +4 -1
- package/test_helpers/test_fixtures/variabletype_with_value.xml +10 -10
- package/source/helpers/check_event_clause.ts +0 -55
- package/src/alarms_and_conditions/check_where_clause.ts +0 -147
- package/src/alarms_and_conditions/extract_event_fields.ts +0 -103
|
@@ -14,9 +14,7 @@ import { UAShelvedStateMachineEx } from "../../source";
|
|
|
14
14
|
import { InstantiateLimitAlarmOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options";
|
|
15
15
|
import { UALimitAlarmEx } from "../../source/interfaces/alarms_and_conditions/ua_limit_alarm_ex";
|
|
16
16
|
import { NamespacePrivate } from "../namespace_private";
|
|
17
|
-
import {
|
|
18
|
-
UAAlarmConditionImpl
|
|
19
|
-
} from "./ua_alarm_condition_impl";
|
|
17
|
+
import { UAAlarmConditionImpl } from "./ua_alarm_condition_impl";
|
|
20
18
|
|
|
21
19
|
const warningLog = make_warningLog("AlarmsAndConditions");
|
|
22
20
|
|
|
@@ -35,11 +33,11 @@ const uaLimitAlarmInputSupportedDataType: DataType[] = [
|
|
|
35
33
|
DataType.UInt32
|
|
36
34
|
];
|
|
37
35
|
|
|
38
|
-
export interface UALimitAlarmImpl extends UALimitAlarmEx
|
|
36
|
+
export interface UALimitAlarmImpl extends UALimitAlarmEx {
|
|
39
37
|
shelvingState?: UAShelvedStateMachineEx;
|
|
40
38
|
}
|
|
41
39
|
export class UALimitAlarmImpl extends UAAlarmConditionImpl implements UALimitAlarmEx {
|
|
42
|
-
|
|
40
|
+
/**
|
|
43
41
|
* @method (static)UALimitAlarm.instantiate
|
|
44
42
|
* @param namespace {INamespace}
|
|
45
43
|
* @param limitAlarmTypeId
|
|
@@ -127,8 +125,8 @@ export class UALimitAlarmImpl extends UAAlarmConditionImpl implements UALimitAla
|
|
|
127
125
|
throw new Error(message);
|
|
128
126
|
}
|
|
129
127
|
|
|
130
|
-
if (Object.prototype.hasOwnProperty.call(options, "highHighLimit")) {
|
|
131
|
-
alarmNode.setHighHighLimit(options.highHighLimit);
|
|
128
|
+
if (Object.prototype.hasOwnProperty.call(options, "highHighLimit") && options.highHighLimit !== undefined) {
|
|
129
|
+
alarmNode.setHighHighLimit(options.highHighLimit!);
|
|
132
130
|
}
|
|
133
131
|
if (Object.prototype.hasOwnProperty.call(options, "highLimit")) {
|
|
134
132
|
alarmNode.setHighLimit(options.highLimit);
|
|
@@ -136,7 +134,7 @@ export class UALimitAlarmImpl extends UAAlarmConditionImpl implements UALimitAla
|
|
|
136
134
|
if (Object.prototype.hasOwnProperty.call(options, "lowLimit")) {
|
|
137
135
|
alarmNode.setLowLimit(options.lowLimit);
|
|
138
136
|
}
|
|
139
|
-
if (Object.prototype.hasOwnProperty.call(options, "lowLowLimit")) {
|
|
137
|
+
if (Object.prototype.hasOwnProperty.call(options, "lowLowLimit") && options.lowLowLimit != undefined) {
|
|
140
138
|
alarmNode.setLowLowLimit(options.lowLowLimit);
|
|
141
139
|
}
|
|
142
140
|
|
|
@@ -6,8 +6,8 @@ import { assert } from "node-opcua-assert";
|
|
|
6
6
|
|
|
7
7
|
import { DataValue } from "node-opcua-data-value";
|
|
8
8
|
import { NodeId } from "node-opcua-nodeid";
|
|
9
|
-
import { VariantOptions } from "node-opcua-variant";
|
|
10
|
-
import { UAVariable } from "node-opcua-address-space-base";
|
|
9
|
+
import { DataType, VariantOptions } from "node-opcua-variant";
|
|
10
|
+
import { UAVariable, UAVariableT } from "node-opcua-address-space-base";
|
|
11
11
|
import { NamespacePrivate } from "../namespace_private";
|
|
12
12
|
import { AddressSpace } from "../address_space";
|
|
13
13
|
import { InstantiateLimitAlarmOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options";
|
|
@@ -20,6 +20,8 @@ import {
|
|
|
20
20
|
} from "./deviation_alarm_helper";
|
|
21
21
|
import { UALimitAlarmImpl } from "./ua_limit_alarm_impl";
|
|
22
22
|
import { UANonExclusiveLimitAlarmImpl } from "./ua_non_exclusive_limit_alarm_impl";
|
|
23
|
+
|
|
24
|
+
|
|
23
25
|
export declare interface UANonExclusiveDeviationAlarmImpl extends UANonExclusiveLimitAlarmImpl, UANonExclusiveDeviationAlarmEx {
|
|
24
26
|
on(eventName: string, eventHandler: any): this;
|
|
25
27
|
get addressSpace(): AddressSpace;
|
|
@@ -63,7 +65,7 @@ export class UANonExclusiveDeviationAlarmImpl extends UANonExclusiveLimitAlarmIm
|
|
|
63
65
|
super._setStateBasedOnInputValue(value - setpointValue);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
public getSetpointNodeNode():
|
|
68
|
+
public getSetpointNodeNode(): UAVariableT<number, DataType.Double> | UAVariableT<number, DataType.Float> | undefined {
|
|
67
69
|
return DeviationAlarmHelper_getSetpointNodeNode.call(this);
|
|
68
70
|
}
|
|
69
71
|
|
|
@@ -12,7 +12,7 @@ import { DataType, VariantOptions } from "node-opcua-variant";
|
|
|
12
12
|
import { InstantiateOffNormalAlarmOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options";
|
|
13
13
|
import { UADiscreteAlarmEx } from "../../source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex";
|
|
14
14
|
import { AddressSpacePrivate } from "../address_space_private";
|
|
15
|
-
import {
|
|
15
|
+
import { UADiscreteAlarmImpl } from "./ua_discrete_alarm_impl";
|
|
16
16
|
|
|
17
17
|
function isEqual(value1: any, value2: any) {
|
|
18
18
|
return value1 === value2;
|
|
@@ -39,7 +39,6 @@ export declare interface UAOffNormalAlarmEx
|
|
|
39
39
|
setNormalStateValue(value: any): void;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
43
42
|
export declare interface UAOffNormalAlarmImpl extends UAOffNormalAlarmEx, UADiscreteAlarmImpl {
|
|
44
43
|
on(eventName: string, eventHandler: any): this;
|
|
45
44
|
}
|
|
@@ -103,21 +102,24 @@ export class UAOffNormalAlarmImpl extends UADiscreteAlarmImpl implements UAOffNo
|
|
|
103
102
|
* If this Variable is not in the AddressSpace, a NULL NodeId shall be provided.
|
|
104
103
|
*
|
|
105
104
|
*/
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (normalState) {
|
|
117
|
-
// install normalState monitoring for change
|
|
118
|
-
normalState.on("value_changed", (newDataValue: DataValue /*, oldDataValue: DataValue*/) => {
|
|
119
|
-
alarmNode._onNormalStateDataValueChange(newDataValue);
|
|
105
|
+
if (options.normalState) {
|
|
106
|
+
const normalState = addressSpace._coerceNode(options.normalState) as UAVariable | null;
|
|
107
|
+
const normalStateNodeId = normalState ? normalState.nodeId : new NodeId();
|
|
108
|
+
alarmNode.normalState.setValueFromSource({ dataType: DataType.NodeId, value: normalStateNodeId });
|
|
109
|
+
alarmNode.normalState.on("value_changed", (newDataValue: DataValue /*, oldDataValue: DataValue*/) => {
|
|
110
|
+
// The node that contains the normalState value has changed.
|
|
111
|
+
// we must remove the listener on current normalState and replace
|
|
112
|
+
// normalState with the new one and set listener again
|
|
113
|
+
// to do:
|
|
120
114
|
});
|
|
115
|
+
if (normalState) {
|
|
116
|
+
// install normalState monitoring for change
|
|
117
|
+
normalState.on("value_changed", (newDataValue: DataValue /*, oldDataValue: DataValue*/) => {
|
|
118
|
+
alarmNode._onNormalStateDataValueChange(newDataValue);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
} else {
|
|
122
|
+
alarmNode.normalState.setValueFromSource({ dataType: DataType.NodeId, value: NodeId.nullNodeId });
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
alarmNode._mayBe_updateAlarmState();
|
package/src/event_data.ts
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* @module node-opcua-address-space.Private
|
|
3
3
|
*/
|
|
4
4
|
import { assert } from "node-opcua-assert";
|
|
5
|
-
import {
|
|
6
|
-
import { DataValue } from "node-opcua-data-value";
|
|
7
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
8
|
-
import { constructBrowsePathFromQualifiedName } from "node-opcua-service-translate-browse-path";
|
|
5
|
+
import { coerceExpandedNodeId, NodeId, sameNodeId } from "node-opcua-nodeid";
|
|
9
6
|
import { StatusCodes } from "node-opcua-status-code";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { BrowsePath, BrowsePathResult } from "node-opcua-types";
|
|
8
|
+
import { Variant, VariantLike } from "node-opcua-variant";
|
|
12
9
|
|
|
13
|
-
import {
|
|
10
|
+
import { BaseNode, IEventData } from "node-opcua-address-space-base";
|
|
11
|
+
import { lowerFirstLetter } from "node-opcua-utils";
|
|
14
12
|
|
|
13
|
+
type NodeIdString = string;
|
|
14
|
+
type FullBrowsePath = string;
|
|
15
15
|
/**
|
|
16
16
|
* @class EventData
|
|
17
17
|
* @param eventTypeNode {BaseNode}
|
|
@@ -21,91 +21,61 @@ export class EventData implements IEventData {
|
|
|
21
21
|
public eventId: NodeId;
|
|
22
22
|
public $eventDataSource: BaseNode;
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
public $cache: {
|
|
25
|
+
__values: { [key: NodeIdString]: Variant };
|
|
26
|
+
__nodeIdToNode: { [key: NodeIdString]: BaseNode };
|
|
27
|
+
__pathToNodeId: { [key: FullBrowsePath]: NodeId };
|
|
28
|
+
__nodeIdToFullPath: { [key: NodeIdString]: FullBrowsePath };
|
|
29
|
+
};
|
|
25
30
|
|
|
26
31
|
constructor(eventTypeNode: BaseNode) {
|
|
27
|
-
this
|
|
32
|
+
this.$cache = {
|
|
33
|
+
__values: {},
|
|
34
|
+
__nodeIdToNode: {},
|
|
35
|
+
__pathToNodeId: {},
|
|
36
|
+
__nodeIdToFullPath: {}
|
|
37
|
+
};
|
|
38
|
+
|
|
28
39
|
this.eventId = new NodeId();
|
|
29
40
|
this.$eventDataSource = eventTypeNode;
|
|
30
41
|
}
|
|
31
42
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* @return {NodeId|null}
|
|
36
|
-
*/
|
|
37
|
-
public resolveSelectClause(selectClause: SimpleAttributeOperand): NodeId | null {
|
|
38
|
-
assert(selectClause instanceof SimpleAttributeOperand);
|
|
39
|
-
const addressSpace = this.$eventDataSource.addressSpace;
|
|
40
|
-
|
|
41
|
-
if (selectClause.browsePath!.length === 0 && selectClause.attributeId === AttributeIds.NodeId) {
|
|
42
|
-
assert(!"Cannot use resolveSelectClause on this selectClause as it has no browsePath");
|
|
43
|
-
}
|
|
44
|
-
// navigate to the innerNode specified by the browsePath [ QualifiedName]
|
|
45
|
-
const browsePath = constructBrowsePathFromQualifiedName(this.$eventDataSource, selectClause.browsePath);
|
|
43
|
+
public _createValue(fullBrowsePath: string, node: BaseNode, variant: VariantLike): void {
|
|
44
|
+
const eventData = this as any;
|
|
45
|
+
assert(!eventData[fullBrowsePath], "already exists " + fullBrowsePath);
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
// xx console.log("xx browse Path", browsePath.toString());
|
|
47
|
+
const lowerName = fullBrowsePath.split(".").map(lowerFirstLetter).join(".");
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
eventData[lowerName] = Variant.coerce(variant);
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
this.$cache.__pathToNodeId[fullBrowsePath] = node.nodeId;
|
|
52
|
+
this.$cache.__nodeIdToNode[node.nodeId.toString()] = node;
|
|
53
|
+
this.$cache.__nodeIdToFullPath[node.nodeId.toString()] = fullBrowsePath;
|
|
54
|
+
this.$cache.__values[node.nodeId.toString()] = eventData[lowerName];
|
|
55
|
+
}
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
if (!browsePathResult.targets) {
|
|
57
|
+
public _browse(browsePath: BrowsePath): BrowsePathResult | null {
|
|
58
|
+
if (!sameNodeId(browsePath.startingNode, this.$eventDataSource.nodeId)) {
|
|
61
59
|
return null;
|
|
62
60
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
61
|
+
const fullBrowsePath = (browsePath.relativePath.elements || []).map((b=>b.targetName.toString())).join(".");
|
|
62
|
+
const nodeId = this.$cache.__pathToNodeId[fullBrowsePath];
|
|
63
|
+
if (!nodeId) return null;
|
|
64
|
+
return new BrowsePathResult({
|
|
65
|
+
statusCode: StatusCodes.Good,
|
|
66
|
+
targets: [{
|
|
67
|
+
remainingPathIndex: 0,
|
|
68
|
+
targetId: coerceExpandedNodeId(nodeId),
|
|
69
|
+
}]
|
|
70
|
+
})
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
public
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
eventData.__nodes[node.nodeId.toString()] = eventData[lowerName];
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* @method readValue
|
|
79
|
-
* @param nodeId {NodeId}
|
|
80
|
-
* @param selectClause {SimpleAttributeOperand}
|
|
81
|
-
* @return {Variant}
|
|
82
|
-
*/
|
|
83
|
-
public readValue(sessionContext: ISessionContext, nodeId: NodeId, selectClause: SimpleAttributeOperand): Variant {
|
|
84
|
-
assert(nodeId instanceof NodeId);
|
|
85
|
-
assert(selectClause instanceof SimpleAttributeOperand);
|
|
86
|
-
assert(nodeId instanceof NodeId);
|
|
87
|
-
const addressSpace = this.$eventDataSource.addressSpace;
|
|
88
|
-
|
|
89
|
-
const node = addressSpace.findNode(nodeId)!;
|
|
90
|
-
const key = node.nodeId.toString();
|
|
91
|
-
|
|
92
|
-
// if the value exists in cache ... we read it from cache...
|
|
93
|
-
const cached_value = this.__nodes[key];
|
|
73
|
+
public _readValue(nodeId: NodeId): Variant | null {
|
|
74
|
+
const key = nodeId.toString();
|
|
75
|
+
const cached_value = this.$cache.__values[key];
|
|
94
76
|
if (cached_value) {
|
|
95
77
|
return cached_value;
|
|
96
78
|
}
|
|
97
|
-
|
|
98
|
-
if (node.nodeClass === NodeClass.Variable && selectClause.attributeId === AttributeIds.Value) {
|
|
99
|
-
const nodeVariable = node as UAVariable;
|
|
100
|
-
return prepare(nodeVariable.readValue(sessionContext, selectClause.indexRange));
|
|
101
|
-
}
|
|
102
|
-
return prepare(node.readAttribute(sessionContext, selectClause.attributeId));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function prepare(dataValue: DataValue): Variant {
|
|
107
|
-
if (dataValue.statusCode === StatusCodes.Good) {
|
|
108
|
-
return dataValue.value;
|
|
79
|
+
return null;
|
|
109
80
|
}
|
|
110
|
-
|
|
111
|
-
}
|
|
81
|
+
}
|
package/src/index_current.ts
CHANGED
|
@@ -7,7 +7,6 @@ export * from "../source/helpers/dump_tools";
|
|
|
7
7
|
export * from "../source/helpers/adjust_browse_direction";
|
|
8
8
|
export * from "../source/pseudo_session";
|
|
9
9
|
export * from "../source/helpers/make_optionals_map";
|
|
10
|
-
export * from "../source/helpers/check_event_clause";
|
|
11
10
|
export * from "../source/helpers/argument_list";
|
|
12
11
|
export * from "../source/helpers/call_helpers";
|
|
13
12
|
export * from "../source/helpers/ensure_secure_access";
|
package/src/namespace_impl.ts
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
RolePermissionTypeOptions
|
|
29
29
|
} from "node-opcua-types";
|
|
30
30
|
import * as utils from "node-opcua-utils";
|
|
31
|
-
import { DataType, Variant, VariantArrayType, verifyRankAndDimensions } from "node-opcua-variant";
|
|
31
|
+
import { DataType, Variant, VariantArrayType, VariantOptions, verifyRankAndDimensions } from "node-opcua-variant";
|
|
32
32
|
import {
|
|
33
33
|
AddBaseNodeOptions,
|
|
34
34
|
AddEnumerationTypeOptions,
|
|
@@ -67,7 +67,14 @@ import {
|
|
|
67
67
|
} from "../source/address_space_ts";
|
|
68
68
|
import { UAStateMachineEx } from "../source/interfaces/state_machine/ua_state_machine_type";
|
|
69
69
|
import { UATransitionEx } from "../source/interfaces/state_machine/ua_transition_ex";
|
|
70
|
-
import {
|
|
70
|
+
import {
|
|
71
|
+
InstantiateAlarmConditionOptions,
|
|
72
|
+
InstantiateExclusiveLimitAlarmOptions,
|
|
73
|
+
InstantiateLimitAlarmOptions,
|
|
74
|
+
InstantiateOffNormalAlarmOptions,
|
|
75
|
+
UATwoStateDiscreteEx,
|
|
76
|
+
UAYArrayItemEx
|
|
77
|
+
} from "../source";
|
|
71
78
|
import { AddAnalogDataItemOptions, AddDataItemOptions } from "../source/namespace_data_access";
|
|
72
79
|
import { UATwoStateVariableEx } from "../source/ua_two_state_variable_ex";
|
|
73
80
|
import { UAMultiStateValueDiscreteEx } from "../source/interfaces/data_access/ua_multistate_value_discrete_ex";
|
|
@@ -79,22 +86,19 @@ import { UALimitAlarmEx } from "../source/interfaces/alarms_and_conditions/ua_li
|
|
|
79
86
|
import { UANonExclusiveDeviationAlarmEx } from "../source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex";
|
|
80
87
|
import { UANonExclusiveLimitAlarmEx } from "../source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex";
|
|
81
88
|
import { UAConditionEx } from "../source/interfaces/alarms_and_conditions/ua_condition_ex";
|
|
89
|
+
import { InstantiateExclusiveDeviationAlarmOptions } from "../source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options";
|
|
90
|
+
import { InstantiateNonExclusiveLimitAlarmOptions } from "../source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options";
|
|
91
|
+
import { InstantiateNonExclusiveDeviationAlarmOptions } from "../source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options";
|
|
82
92
|
|
|
83
93
|
import { _handle_delete_node_model_change_event, _handle_model_change_event } from "./address_space_change_event_tools";
|
|
84
94
|
import { AddressSpacePrivate } from "./address_space_private";
|
|
85
95
|
import { UAConditionImpl } from "./alarms_and_conditions/ua_condition_impl";
|
|
86
96
|
import { UADiscreteAlarmImpl } from "./alarms_and_conditions/ua_discrete_alarm_impl";
|
|
87
|
-
import {
|
|
88
|
-
|
|
89
|
-
} from "./alarms_and_conditions/
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
UANonExclusiveDeviationAlarmImpl
|
|
94
|
-
} from "./alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl";
|
|
95
|
-
import {
|
|
96
|
-
UANonExclusiveLimitAlarmImpl
|
|
97
|
-
} from "./alarms_and_conditions/ua_non_exclusive_limit_alarm_impl";
|
|
97
|
+
import { UAExclusiveDeviationAlarmImpl } from "./alarms_and_conditions/ua_exclusive_deviation_alarm_impl";
|
|
98
|
+
import { UAExclusiveLimitAlarmImpl } from "./alarms_and_conditions/ua_exclusive_limit_alarm_impl";
|
|
99
|
+
import { UALimitAlarmImpl } from "./alarms_and_conditions/ua_limit_alarm_impl";
|
|
100
|
+
import { UANonExclusiveDeviationAlarmImpl } from "./alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl";
|
|
101
|
+
import { UANonExclusiveLimitAlarmImpl } from "./alarms_and_conditions/ua_non_exclusive_limit_alarm_impl";
|
|
98
102
|
import { UAAcknowledgeableConditionImpl, UAAlarmConditionImpl } from "./alarms_and_conditions";
|
|
99
103
|
import { UAOffNormalAlarmEx, UAOffNormalAlarmImpl } from "./alarms_and_conditions/ua_off_normal_alarm_impl";
|
|
100
104
|
import { add_dataItem_stuff } from "./data_access/add_dataItem_stuff";
|
|
@@ -1541,52 +1545,69 @@ export class NamespaceImpl implements NamespacePrivate {
|
|
|
1541
1545
|
|
|
1542
1546
|
public instantiateAcknowledgeableCondition(
|
|
1543
1547
|
conditionTypeId: UAEventType | NodeId | string,
|
|
1544
|
-
options:
|
|
1545
|
-
data
|
|
1548
|
+
options: InstantiateAlarmConditionOptions,
|
|
1549
|
+
data?: Record<string, VariantOptions>
|
|
1546
1550
|
): UAAcknowledgeableConditionImpl {
|
|
1547
1551
|
return UAAcknowledgeableConditionImpl.instantiate(this, conditionTypeId, options, data);
|
|
1548
1552
|
}
|
|
1549
1553
|
|
|
1550
1554
|
public instantiateAlarmCondition(
|
|
1551
1555
|
alarmConditionTypeId: UAEventType | NodeId | string,
|
|
1552
|
-
options:
|
|
1553
|
-
data
|
|
1556
|
+
options: InstantiateAlarmConditionOptions,
|
|
1557
|
+
data?: Record<string, VariantOptions>
|
|
1554
1558
|
): UAAlarmConditionEx {
|
|
1555
1559
|
return UAAlarmConditionImpl.instantiate(this, alarmConditionTypeId, options, data);
|
|
1556
1560
|
}
|
|
1557
1561
|
|
|
1558
|
-
public instantiateLimitAlarm(
|
|
1562
|
+
public instantiateLimitAlarm(
|
|
1563
|
+
limitAlarmTypeId: UAEventType | NodeId | string,
|
|
1564
|
+
options: InstantiateLimitAlarmOptions,
|
|
1565
|
+
data?: Record<string, VariantOptions>
|
|
1566
|
+
): UALimitAlarmEx {
|
|
1559
1567
|
return UALimitAlarmImpl.instantiate(this, limitAlarmTypeId, options, data);
|
|
1560
1568
|
}
|
|
1561
1569
|
|
|
1562
1570
|
public instantiateExclusiveLimitAlarm(
|
|
1563
1571
|
exclusiveLimitAlarmTypeId: UAEventType | NodeId | string,
|
|
1564
|
-
options:
|
|
1565
|
-
data
|
|
1572
|
+
options: InstantiateLimitAlarmOptions,
|
|
1573
|
+
data?: Record<string, VariantOptions>
|
|
1566
1574
|
): UAExclusiveLimitAlarmEx {
|
|
1567
1575
|
return UAExclusiveLimitAlarmImpl.instantiate(this, exclusiveLimitAlarmTypeId, options, data);
|
|
1568
1576
|
}
|
|
1569
1577
|
|
|
1570
|
-
public instantiateExclusiveDeviationAlarm(
|
|
1578
|
+
public instantiateExclusiveDeviationAlarm(
|
|
1579
|
+
options: InstantiateExclusiveDeviationAlarmOptions,
|
|
1580
|
+
data?: Record<string, VariantOptions>
|
|
1581
|
+
): UAExclusiveDeviationAlarmEx {
|
|
1571
1582
|
return UAExclusiveDeviationAlarmImpl.instantiate(this, "ExclusiveDeviationAlarmType", options, data);
|
|
1572
1583
|
}
|
|
1573
1584
|
|
|
1574
1585
|
public instantiateNonExclusiveLimitAlarm(
|
|
1575
1586
|
nonExclusiveLimitAlarmTypeId: UAEventType | NodeId | string,
|
|
1576
|
-
options:
|
|
1577
|
-
data
|
|
1587
|
+
options: InstantiateNonExclusiveLimitAlarmOptions,
|
|
1588
|
+
data?: Record<string, VariantOptions>
|
|
1578
1589
|
): UANonExclusiveLimitAlarmEx {
|
|
1579
1590
|
return UANonExclusiveLimitAlarmImpl.instantiate(this, nonExclusiveLimitAlarmTypeId, options, data);
|
|
1580
1591
|
}
|
|
1581
1592
|
|
|
1582
|
-
public instantiateNonExclusiveDeviationAlarm(
|
|
1593
|
+
public instantiateNonExclusiveDeviationAlarm(
|
|
1594
|
+
options: InstantiateNonExclusiveDeviationAlarmOptions,
|
|
1595
|
+
data?: Record<string, VariantOptions>
|
|
1596
|
+
): UANonExclusiveDeviationAlarmEx {
|
|
1583
1597
|
return UANonExclusiveDeviationAlarmImpl.instantiate(this, "NonExclusiveDeviationAlarmType", options, data);
|
|
1584
1598
|
}
|
|
1585
1599
|
|
|
1586
|
-
public instantiateDiscreteAlarm(
|
|
1600
|
+
public instantiateDiscreteAlarm(
|
|
1601
|
+
discreteAlarmType: UAEventType | NodeId | string,
|
|
1602
|
+
options: InstantiateAlarmConditionOptions,
|
|
1603
|
+
data?: Record<string, VariantOptions>
|
|
1604
|
+
): UADiscreteAlarmEx {
|
|
1587
1605
|
return UADiscreteAlarmImpl.instantiate(this, discreteAlarmType, options, data);
|
|
1588
1606
|
}
|
|
1589
|
-
public instantiateOffNormalAlarm(
|
|
1607
|
+
public instantiateOffNormalAlarm(
|
|
1608
|
+
options: InstantiateOffNormalAlarmOptions,
|
|
1609
|
+
data?: Record<string, VariantOptions>
|
|
1610
|
+
): UAOffNormalAlarmEx {
|
|
1590
1611
|
return UAOffNormalAlarmImpl.instantiate(this, "OffNormalAlarmType", options, data);
|
|
1591
1612
|
}
|
|
1592
1613
|
|
|
@@ -294,8 +294,8 @@ function _dumpVariantInnerValueEnum(xw: XmlWriter, definition: EnumDefinition, v
|
|
|
294
294
|
if (!definition.fields) {
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
-
const field = definition.fields.find((f) => f.value[1] === value);
|
|
298
|
-
xw.text(`${field?.name}_${value}`);
|
|
297
|
+
const field = definition.fields.find((f) => f.value[1] === value || f.name === value);
|
|
298
|
+
xw.text(`${field?.name}_${field?.value[1]}`);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
// eslint-disable-next-line complexity
|
|
@@ -329,7 +329,6 @@ function _dumpVariantInnerValue(
|
|
|
329
329
|
case DataType.Boolean:
|
|
330
330
|
case DataType.SByte:
|
|
331
331
|
case DataType.Byte:
|
|
332
|
-
case DataType.SByte:
|
|
333
332
|
case DataType.Float:
|
|
334
333
|
case DataType.Double:
|
|
335
334
|
case DataType.Int16:
|
|
@@ -779,6 +778,16 @@ function _dumpStructureDefinition(
|
|
|
779
778
|
xw.endElement();
|
|
780
779
|
}
|
|
781
780
|
}
|
|
781
|
+
|
|
782
|
+
function _dumpEncodings(xw: XmlWriter, uaDataType: UADataType) {
|
|
783
|
+
const encodings = uaDataType.findReferencesExAsObject("HasEncoding", BrowseDirection.Forward);
|
|
784
|
+
for (const encoding of encodings) {
|
|
785
|
+
if (encoding.nodeClass !== NodeClass.Object) {
|
|
786
|
+
continue;
|
|
787
|
+
}
|
|
788
|
+
_dumpUAObject(xw, encoding as UAObject);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
782
791
|
function _dumpUADataTypeDefinition(xw: XmlWriter, uaDataType: UADataType) {
|
|
783
792
|
const uaDataTypeBase = uaDataType.subtypeOfObj;
|
|
784
793
|
|
|
@@ -824,6 +833,8 @@ function dumpUADataType(xw: XmlWriter, node: UADataType) {
|
|
|
824
833
|
|
|
825
834
|
xw.endElement();
|
|
826
835
|
|
|
836
|
+
_dumpEncodings(xw, node);
|
|
837
|
+
|
|
827
838
|
dumpAggregates(xw, node);
|
|
828
839
|
}
|
|
829
840
|
|
|
@@ -927,7 +938,10 @@ function dumpUAVariableType(xw: XmlWriter, node: UAVariableType) {
|
|
|
927
938
|
|
|
928
939
|
function dumpUAObject(xw: XmlWriter, node: UAObject) {
|
|
929
940
|
xw.writeComment("Object - " + b(xw, node.browseName) + " {{{{ ");
|
|
930
|
-
|
|
941
|
+
_dumpUAObject(xw, node);
|
|
942
|
+
xw.writeComment("Object - " + b(xw, node.browseName) + " }}}} ");
|
|
943
|
+
}
|
|
944
|
+
function _dumpUAObject(xw: XmlWriter, node: UAObject) {
|
|
931
945
|
xw.visitedNode = xw.visitedNode || {};
|
|
932
946
|
assert(!xw.visitedNode[_hash(node)]);
|
|
933
947
|
xw.visitedNode[_hash(node)] = 1;
|
|
@@ -945,8 +959,6 @@ function dumpUAObject(xw: XmlWriter, node: UAObject) {
|
|
|
945
959
|
dumpAggregates(xw, node);
|
|
946
960
|
|
|
947
961
|
dumpElementInFolder(xw, node as UAObjectImpl);
|
|
948
|
-
|
|
949
|
-
xw.writeComment("Object - " + b(xw, node.browseName) + " }}}} ");
|
|
950
962
|
}
|
|
951
963
|
function dumpElementInFolder(xw: XmlWriter, node: BaseNodeImpl) {
|
|
952
964
|
const aggregates = node
|
|
@@ -297,7 +297,7 @@ export class UATwoStateVariableImpl extends UAVariableImplT<LocalizedText, DataT
|
|
|
297
297
|
// for which state or sub-state should be used. It is up to the Server and will depend on the
|
|
298
298
|
// semantics of the StateMachineType
|
|
299
299
|
//
|
|
300
|
-
// EffectiveDisplayName will be constructed by adding the
|
|
300
|
+
// EffectiveDisplayName will be constructed by adding the EnabledState
|
|
301
301
|
// and the State of the addTrue state
|
|
302
302
|
if (this.effectiveDisplayName) {
|
|
303
303
|
this.id.on("value_changed", () => {
|
package/src/ua_object_impl.ts
CHANGED
|
@@ -156,8 +156,7 @@ export class UAObjectImpl extends BaseNodeImpl implements UAObject {
|
|
|
156
156
|
// coerce EventType
|
|
157
157
|
eventTypeNode = addressSpace.findEventType(eventType as UAEventType) as UAEventType;
|
|
158
158
|
const baseEventType = addressSpace.findEventType("BaseEventType")!;
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
|
|
161
160
|
data.$eventDataSource = eventTypeNode;
|
|
162
161
|
data.sourceNode = data.sourceNode || { dataType: DataType.NodeId, value: this.nodeId };
|
|
163
162
|
|
package/src/ua_variable_impl.ts
CHANGED
|
@@ -16,12 +16,8 @@ import {
|
|
|
16
16
|
defaultCloneFilter,
|
|
17
17
|
GetFunc,
|
|
18
18
|
SetFunc,
|
|
19
|
-
VariableDataValueGetterCallback,
|
|
20
|
-
VariableDataValueGetterPromise,
|
|
21
19
|
VariableDataValueGetterSync,
|
|
22
|
-
VariableDataValueSetterWithCallback
|
|
23
|
-
VariableDataValueSetterWithPromise
|
|
24
|
-
} from "node-opcua-address-space-base";
|
|
20
|
+
VariableDataValueSetterWithCallback} from "node-opcua-address-space-base";
|
|
25
21
|
import { assert } from "node-opcua-assert";
|
|
26
22
|
import {
|
|
27
23
|
isValidDataEncoding,
|
|
@@ -49,12 +45,9 @@ import {
|
|
|
49
45
|
ReadEventDetails,
|
|
50
46
|
ReadProcessedDetails,
|
|
51
47
|
ReadRawModifiedDetails,
|
|
52
|
-
StructureDefinition,
|
|
53
|
-
StructureField,
|
|
54
48
|
WriteValueOptions
|
|
55
49
|
} from "node-opcua-types";
|
|
56
50
|
import * as utils from "node-opcua-utils";
|
|
57
|
-
import { lowerFirstLetter } from "node-opcua-utils";
|
|
58
51
|
import {
|
|
59
52
|
Variant,
|
|
60
53
|
VariantLike,
|
|
@@ -68,7 +61,6 @@ import { StatusCodeCallback } from "node-opcua-status-code";
|
|
|
68
61
|
import {
|
|
69
62
|
IAddressSpace,
|
|
70
63
|
BindVariableOptions,
|
|
71
|
-
ContinuationPoint,
|
|
72
64
|
IVariableHistorian,
|
|
73
65
|
TimestampGetFunc,
|
|
74
66
|
TimestampSetFunc,
|
|
@@ -81,12 +73,12 @@ import {
|
|
|
81
73
|
BaseNode,
|
|
82
74
|
UAVariableT
|
|
83
75
|
} from "node-opcua-address-space-base";
|
|
84
|
-
import {
|
|
76
|
+
import { UAHistoricalDataConfiguration } from "node-opcua-nodeset-ua";
|
|
85
77
|
|
|
86
78
|
import { SessionContext } from "../source/session_context";
|
|
87
79
|
import { convertToCallbackFunction1 } from "../source/helpers/multiform_func";
|
|
88
80
|
import { BaseNodeImpl, InternalBaseNodeOptions } from "./base_node_impl";
|
|
89
|
-
import { _clone, ToStringBuilder, UAVariable_toString
|
|
81
|
+
import { _clone, ToStringBuilder, UAVariable_toString } from "./base_node_private";
|
|
90
82
|
import { EnumerationInfo, IEnumItem, UADataTypeImpl } from "./ua_data_type_impl";
|
|
91
83
|
import { apply_condition_refresh, ConditionRefreshCache } from "./apply_condition_refresh";
|
|
92
84
|
import {
|
|
@@ -69,7 +69,10 @@ export function construct_demo_alarm_in_address_space(test: IAlarmTestData, addr
|
|
|
69
69
|
optionals: [
|
|
70
70
|
"ConfirmedState",
|
|
71
71
|
"Confirm" // confirm state and confirm Method
|
|
72
|
-
]
|
|
72
|
+
],
|
|
73
|
+
|
|
74
|
+
setpointNode: null,
|
|
75
|
+
|
|
73
76
|
}) as UAExclusiveLimitAlarmEx;
|
|
74
77
|
|
|
75
78
|
assert(tankLevelCondition.browseName.toString() === "1:TankLevelCondition");
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<Alias Alias="GasComposition">ns=1;i=48</Alias>
|
|
38
38
|
<Alias Alias="FlowDirection">ns=1;i=49</Alias>
|
|
39
39
|
<Alias Alias="MyEnum">ns=1;i=3002</Alias>
|
|
40
|
-
<Alias Alias="
|
|
40
|
+
<Alias Alias="MyStructDataType">ns=1;i=3003</Alias>
|
|
41
41
|
</Aliases>
|
|
42
42
|
<Extensions>
|
|
43
43
|
</Extensions>
|
|
@@ -272,32 +272,32 @@
|
|
|
272
272
|
</References>
|
|
273
273
|
</UAObject>
|
|
274
274
|
|
|
275
|
-
<UADataType NodeId="ns=1;i=3003" BrowseName="1:
|
|
276
|
-
<DisplayName>
|
|
275
|
+
<UADataType NodeId="ns=1;i=3003" BrowseName="1:MyStructDataType">
|
|
276
|
+
<DisplayName>MyStructDataType</DisplayName>
|
|
277
277
|
<References>
|
|
278
278
|
<Reference ReferenceType="HasEncoding">ns=1;i=5001</Reference>
|
|
279
279
|
<Reference ReferenceType="HasEncoding">ns=1;i=5003</Reference>
|
|
280
280
|
<Reference ReferenceType="HasEncoding">ns=1;i=5002</Reference>
|
|
281
281
|
<Reference ReferenceType="HasSubtype" IsForward="false">i=22</Reference>
|
|
282
282
|
</References>
|
|
283
|
-
<Definition Name="1:
|
|
283
|
+
<Definition Name="1:MyStructDataType">
|
|
284
284
|
<Field DataType="MyEnum" Name="F1"/>
|
|
285
285
|
<Field DataType="MyEnum" ValueRank="1" ArrayDimensions="0" Name="F2"/>
|
|
286
286
|
</Definition>
|
|
287
287
|
</UADataType>
|
|
288
|
-
<UAVariable DataType="String" ParentNodeId="ns=1;i=6002" NodeId="ns=1;i=6006" BrowseName="1:
|
|
289
|
-
<DisplayName>
|
|
288
|
+
<UAVariable DataType="String" ParentNodeId="ns=1;i=6002" NodeId="ns=1;i=6006" BrowseName="1:MyStructType">
|
|
289
|
+
<DisplayName>MyStructType</DisplayName>
|
|
290
290
|
<References>
|
|
291
291
|
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=6002</Reference>
|
|
292
292
|
<Reference ReferenceType="HasTypeDefinition">i=69</Reference>
|
|
293
293
|
<Reference ReferenceType="HasDescription" IsForward="false">ns=1;i=5001</Reference>
|
|
294
294
|
</References>
|
|
295
295
|
<Value>
|
|
296
|
-
<uax:String>
|
|
296
|
+
<uax:String>MyStructDataType</uax:String>
|
|
297
297
|
</Value>
|
|
298
298
|
</UAVariable>
|
|
299
299
|
|
|
300
|
-
<UAVariable DataType="
|
|
300
|
+
<UAVariable DataType="MyStructDataType" NodeId="ns=1;i=6009" BrowseName="1:TestVar" AccessLevel="3">
|
|
301
301
|
<DisplayName>TestVar</DisplayName>
|
|
302
302
|
<References>
|
|
303
303
|
<Reference ReferenceType="HasTypeDefinition">i=63</Reference>
|
|
@@ -309,14 +309,14 @@
|
|
|
309
309
|
<uax:Identifier>ns=1;i=5002</uax:Identifier>
|
|
310
310
|
</uax:TypeId>
|
|
311
311
|
<uax:Body>
|
|
312
|
-
<
|
|
312
|
+
<MyStructDataType xmlns="http://yourorganisation.org/enumInExtObj/Types.xsd">
|
|
313
313
|
<F1>Orange_200</F1>
|
|
314
314
|
<F2>
|
|
315
315
|
<MyEnum>Green_100</MyEnum>
|
|
316
316
|
<MyEnum>Orange_200</MyEnum>
|
|
317
317
|
<MyEnum>Red_300</MyEnum>
|
|
318
318
|
</F2>
|
|
319
|
-
</
|
|
319
|
+
</MyStructDataType>
|
|
320
320
|
</uax:Body>
|
|
321
321
|
</uax:ExtensionObject>
|
|
322
322
|
</Value>
|