node-opcua-address-space 2.163.0 → 2.164.2
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/source/helpers/adjust_browse_direction.js +1 -1
- package/dist/source/helpers/adjust_browse_direction.js.map +1 -1
- package/dist/source/helpers/argument_list.js +8 -8
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/helpers/dump_tools.js +1 -1
- package/dist/source/helpers/dump_tools.js.map +1 -1
- package/dist/source/loader/decode_xml_extension_object.js +3 -3
- package/dist/source/loader/decode_xml_extension_object.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js +7 -7
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/make_xml_extension_object_parser.js +3 -3
- package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/source/loader/namespace_post_step.js +1 -1
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/loader/parsers/extension_object_parser.js +1 -1
- package/dist/source/loader/parsers/extension_object_parser.js.map +1 -1
- package/dist/source/pseudo_session.js +1 -1
- package/dist/source/pseudo_session.js.map +1 -1
- package/dist/source/set_namespace_meta_data.js +3 -3
- package/dist/source/set_namespace_meta_data.js.map +1 -1
- package/dist/src/_instantiate_helpers.js +1 -1
- package/dist/src/_instantiate_helpers.js.map +1 -1
- package/dist/src/_mandatory_child_or_requested_optional_filter.js +3 -3
- package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +1 -1
- package/dist/src/address_space.js +27 -27
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +5 -5
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +1 -0
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +14 -2
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +31 -14
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/base_node_impl.js +20 -20
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/base_node_private.js +20 -20
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +1 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.js +2 -2
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
- package/dist/src/extension_object_array_node.js +7 -7
- package/dist/src/extension_object_array_node.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.js +7 -2
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/namespace_impl.js +18 -18
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/nodeid_manager.js +1 -1
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +4 -4
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.js +2 -2
- package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js +5 -5
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.js +13 -13
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +4 -4
- package/dist/src/state_machine/ua_shelving_state_machine_ex.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/tool_isSubtypeOf.js +1 -1
- package/dist/src/tool_isSubtypeOf.js.map +1 -1
- package/dist/src/ua_data_type_impl.js +2 -0
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_method_impl.js +2 -2
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.js +2 -2
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.js +33 -19
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_impl_ext_obj.js +15 -15
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
- package/dist/src/ua_variable_type_impl.js +2 -2
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/src/validate_data_type_correctness.js +7 -7
- package/dist/src/validate_data_type_correctness.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/distHelpers/boiler_system.js +2 -2
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/get_address_space_fixture.js +2 -2
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/mock_session.d.ts +1 -0
- package/distHelpers/mock_session.js +3 -0
- package/distHelpers/mock_session.js.map +1 -1
- package/distNodeJS/generate_address_space.js +1 -1
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/package.json +38 -38
- package/source/helpers/adjust_browse_direction.ts +1 -1
- package/source/helpers/argument_list.ts +8 -8
- package/source/helpers/dump_tools.ts +1 -1
- package/source/loader/decode_xml_extension_object.ts +3 -3
- package/source/loader/load_nodeset2.ts +7 -7
- package/source/loader/make_xml_extension_object_parser.ts +3 -3
- package/source/loader/namespace_post_step.ts +1 -1
- package/source/loader/parsers/extension_object_parser.ts +1 -1
- package/source/pseudo_session.ts +1 -1
- package/source/set_namespace_meta_data.ts +3 -3
- package/source_nodejs/generate_address_space.ts +1 -1
- package/src/_instantiate_helpers.ts +1 -1
- package/src/_mandatory_child_or_requested_optional_filter.ts +3 -3
- package/src/address_space.ts +27 -27
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +5 -5
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +1 -1
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +2 -2
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +16 -2
- package/src/alarms_and_conditions/ua_condition_impl.ts +38 -18
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +2 -2
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +1 -1
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +2 -2
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +1 -1
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +2 -2
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +1 -1
- package/src/base_node_impl.ts +20 -20
- package/src/base_node_private.ts +20 -20
- package/src/data_access/ua_multistate_value_discrete_impl.ts +1 -1
- package/src/data_access/ua_two_state_discrete_impl.ts +6 -4
- package/src/extension_object_array_node.ts +7 -7
- package/src/historical_access/address_space_historical_data_node.ts +9 -4
- package/src/namespace_impl.ts +18 -18
- package/src/nodeid_manager.ts +1 -1
- package/src/nodeset_tools/construct_namespace_dependency.ts +4 -4
- package/src/nodeset_tools/dump_to_bsd.ts +2 -2
- package/src/nodeset_tools/nodeset_to_xml.ts +5 -5
- package/src/state_machine/finite_state_machine.ts +13 -13
- package/src/state_machine/ua_shelving_state_machine_ex.ts +4 -4
- package/src/state_machine/ua_two_state_variable.ts +1 -1
- package/src/tool_isSubtypeOf.ts +1 -1
- package/src/ua_data_type_impl.ts +2 -0
- package/src/ua_method_impl.ts +2 -2
- package/src/ua_object_impl.ts +2 -2
- package/src/ua_variable_impl.ts +56 -40
- package/src/ua_variable_impl_ext_obj.ts +17 -16
- package/src/ua_variable_type_impl.ts +2 -2
- package/src/validate_data_type_correctness.ts +7 -7
|
@@ -202,7 +202,7 @@ function getOrCreateProperty(
|
|
|
202
202
|
(f) => f instanceof UAVariableImpl && f.browseName.name!.toString() === field.name
|
|
203
203
|
);
|
|
204
204
|
|
|
205
|
-
//
|
|
205
|
+
// c8 ignore next
|
|
206
206
|
if (field.dataType.value === DataType.Variant) {
|
|
207
207
|
// this means that any type of extensions being used here
|
|
208
208
|
debugLog("Warning : variant is not supported in ExtensionObject");
|
|
@@ -210,7 +210,7 @@ function getOrCreateProperty(
|
|
|
210
210
|
|
|
211
211
|
if (selectedComponents.length === 1) {
|
|
212
212
|
property = selectedComponents[0] as UAVariableImpl;
|
|
213
|
-
/*
|
|
213
|
+
/* c8 ignore next */
|
|
214
214
|
} else {
|
|
215
215
|
if (!options!.createMissingProp) {
|
|
216
216
|
return null;
|
|
@@ -247,7 +247,7 @@ function installExt(uaVariable: UAVariableImpl, ext: ExtensionObject) {
|
|
|
247
247
|
for (const field of definition.fields || []) {
|
|
248
248
|
if (field.dataType) {
|
|
249
249
|
const dataTypeNode = addressSpace.findDataType(field.dataType);
|
|
250
|
-
//
|
|
250
|
+
// c8 ignore next
|
|
251
251
|
if (dataTypeNode && dataTypeNode.isSubtypeOf(structure)) {
|
|
252
252
|
// sub structure .. let make an handler too
|
|
253
253
|
const camelCaseName = lowerFirstLetter(field.name!);
|
|
@@ -287,10 +287,11 @@ export function _installExtensionObjectBindingOnProperties(uaVariable: UAVariabl
|
|
|
287
287
|
if (extObj instanceof ExtensionObject) {
|
|
288
288
|
uaVariable.bindExtensionObject(extObj, { createMissingProp: true, force: true });
|
|
289
289
|
} else if (extObj instanceof Array) {
|
|
290
|
-
// istanbul ignore else
|
|
291
290
|
if (dataValue.value.arrayType === VariantArrayType.Array || dataValue.value.arrayType === VariantArrayType.Matrix) {
|
|
292
291
|
_bindExtensionObjectArrayOrMatrix(uaVariable, extObj, { createMissingProp: true, force: true });
|
|
293
|
-
}
|
|
292
|
+
}
|
|
293
|
+
/* c8 ignore next */
|
|
294
|
+
else {
|
|
294
295
|
throw new Error("Internal Error, unexpected case");
|
|
295
296
|
}
|
|
296
297
|
}
|
|
@@ -450,12 +451,12 @@ export function _bindExtensionObject(
|
|
|
450
451
|
): ExtensionObject | null {
|
|
451
452
|
options = options || { createMissingProp: false };
|
|
452
453
|
|
|
453
|
-
//
|
|
454
|
+
// c8 ignore next
|
|
454
455
|
if (!isVariableContainingExtensionObject(uaVariable)) {
|
|
455
456
|
return null;
|
|
456
457
|
}
|
|
457
458
|
|
|
458
|
-
//
|
|
459
|
+
// c8 ignore next
|
|
459
460
|
if (optionalExtensionObject && uaVariable.valueRank === 0) {
|
|
460
461
|
warningLog(
|
|
461
462
|
uaVariable.browseName.toString() +
|
|
@@ -466,12 +467,12 @@ export function _bindExtensionObject(
|
|
|
466
467
|
const addressSpace = uaVariable.addressSpace;
|
|
467
468
|
let extensionObject_;
|
|
468
469
|
|
|
469
|
-
//
|
|
470
|
+
// c8 ignore next
|
|
470
471
|
if (uaVariable.valueRank !== -1 && uaVariable.valueRank !== 1) {
|
|
471
472
|
throw new Error("Cannot bind an extension object here, valueRank must be scalar (-1) or one-dimensional (1)");
|
|
472
473
|
}
|
|
473
474
|
|
|
474
|
-
//
|
|
475
|
+
// c8 ignore next
|
|
475
476
|
doDebug && debugLog(" ------------------------------ binding ", uaVariable.browseName.toString(), uaVariable.nodeId.toString());
|
|
476
477
|
|
|
477
478
|
// ignore bindExtensionObject on sub extension object, bindExtensionObject has to be called from the top most object
|
|
@@ -483,7 +484,7 @@ export function _bindExtensionObject(
|
|
|
483
484
|
const parentDataType = (uaVariable.parent as UAVariable | UAVariableType).dataType;
|
|
484
485
|
const dataTypeNode = addressSpace.findNode(parentDataType) as UADataType;
|
|
485
486
|
const structure = addressSpace.findDataType("Structure")!;
|
|
486
|
-
//
|
|
487
|
+
// c8 ignore next
|
|
487
488
|
if (dataTypeNode && dataTypeNode.isSubtypeOf(structure)) {
|
|
488
489
|
// warningLog(
|
|
489
490
|
// "Ignoring bindExtensionObject on sub extension object",
|
|
@@ -498,7 +499,7 @@ export function _bindExtensionObject(
|
|
|
498
499
|
|
|
499
500
|
// -------------------- make sure we do not bind a variable twice ....
|
|
500
501
|
if (uaVariable.$extensionObject && !optionalExtensionObject) {
|
|
501
|
-
//
|
|
502
|
+
// c8 ignore next
|
|
502
503
|
if (!uaVariable.checkExtensionObjectIsCorrect(uaVariable.$extensionObject!)) {
|
|
503
504
|
warningLog(
|
|
504
505
|
"on node : ",
|
|
@@ -519,7 +520,7 @@ export function _bindExtensionObject(
|
|
|
519
520
|
}
|
|
520
521
|
|
|
521
522
|
if (uaVariable.dataTypeObj.isAbstract) {
|
|
522
|
-
//
|
|
523
|
+
// c8 ignore next
|
|
523
524
|
if (!optionalExtensionObject) {
|
|
524
525
|
warningLog(
|
|
525
526
|
"Warning the DataType associated with this Variable is abstract ",
|
|
@@ -608,12 +609,12 @@ export function _bindExtensionObjectArrayOrMatrix(
|
|
|
608
609
|
options = options || { createMissingProp: false };
|
|
609
610
|
options.createMissingProp = options.createMissingProp || false;
|
|
610
611
|
|
|
611
|
-
//
|
|
612
|
+
// c8 ignore next
|
|
612
613
|
if (uaVariable.valueRank < 1) {
|
|
613
614
|
throw new Error("Variable must be a MultiDimensional array");
|
|
614
615
|
}
|
|
615
616
|
const arrayDimensions = uaVariable.arrayDimensions || [];
|
|
616
|
-
//
|
|
617
|
+
// c8 ignore next
|
|
617
618
|
if (!isVariableContainingExtensionObject(uaVariable)) {
|
|
618
619
|
return [];
|
|
619
620
|
}
|
|
@@ -715,7 +716,7 @@ export function _bindExtensionObjectArrayOrMatrix(
|
|
|
715
716
|
set: (newValue: ExtensionObject, sourceTimestamp: PreciseClock, cache: Set<UAVariableImpl>) => {
|
|
716
717
|
assert(!isProxy(uaVariable.$$extensionObjectArray[capturedIndex]));
|
|
717
718
|
uaVariable.$$extensionObjectArray[capturedIndex] = newValue;
|
|
718
|
-
//
|
|
719
|
+
// c8 ignore next
|
|
719
720
|
if (uaVariable.$$extensionObjectArray !== uaVariable.$dataValue.value.value) {
|
|
720
721
|
warningLog("uaVariable", uaVariable.nodeId.toString());
|
|
721
722
|
warningLog("Houston! We have a problem ");
|
|
@@ -724,7 +725,7 @@ export function _bindExtensionObjectArrayOrMatrix(
|
|
|
724
725
|
propagateTouchValueUpward(capturedUaElement, sourceTimestamp, cache);
|
|
725
726
|
},
|
|
726
727
|
setField: (fieldName: string, newValue: any, sourceTimestamp: PreciseClock, cache?: Set<UAVariableImpl>) => {
|
|
727
|
-
//
|
|
728
|
+
// c8 ignore next doDebug && debugLog("setField", fieldName, newValue, sourceTimestamp, cache);
|
|
728
729
|
const extObj = uaVariable.$$extensionObjectArray[capturedIndex];
|
|
729
730
|
(isProxy(extObj) ? getProxyTarget(extObj) : extObj)[lowerFirstLetter(fieldName)] = newValue;
|
|
730
731
|
propagateTouchValueUpward(capturedUaElement, sourceTimestamp, cache);
|
|
@@ -254,7 +254,7 @@ export class UAVariableTypeImpl extends BaseNodeImpl implements UAVariableType {
|
|
|
254
254
|
|
|
255
255
|
const arrayDimensions = options.arrayDimensions !== undefined ? options.arrayDimensions : this.arrayDimensions;
|
|
256
256
|
|
|
257
|
-
//
|
|
257
|
+
// c8 ignore next
|
|
258
258
|
if (!dataType || dataType.isEmpty()) {
|
|
259
259
|
warningLog(" options.dataType", options.dataType ? options.dataType.toString() : "<null>");
|
|
260
260
|
warningLog(" this.dataType", this.dataType ? this.dataType.toString() : "<null>");
|
|
@@ -366,7 +366,7 @@ export function assertUnusedChildBrowseName(addressSpace: AddressSpacePrivate, o
|
|
|
366
366
|
if (!(parent instanceof BaseNodeImpl)) {
|
|
367
367
|
throw new Error("Invalid parent parent is " + parent.constructor.name);
|
|
368
368
|
}
|
|
369
|
-
//
|
|
369
|
+
// c8 ignore next
|
|
370
370
|
// verify that no components already exists in parent
|
|
371
371
|
if (parent && hasChildWithBrowseName(parent, coerceQualifiedName(options.browseName))) {
|
|
372
372
|
throw new Error(
|
|
@@ -13,7 +13,7 @@ function _dataType_toUADataType(addressSpace: IAddressSpace, dataType: DataType)
|
|
|
13
13
|
assert(dataType !== DataType.Null);
|
|
14
14
|
|
|
15
15
|
const dataTypeNode = addressSpace.findDataType(DataType[dataType]);
|
|
16
|
-
/*
|
|
16
|
+
/* c8 ignore next */
|
|
17
17
|
if (!dataTypeNode) {
|
|
18
18
|
throw new Error(" Cannot find DataType " + DataType[dataType] + " in address Space");
|
|
19
19
|
}
|
|
@@ -49,7 +49,7 @@ export function validateDataTypeCorrectness(
|
|
|
49
49
|
|
|
50
50
|
const destUADataType = addressSpace.findDataType(dataTypeNodeId)!;
|
|
51
51
|
|
|
52
|
-
//
|
|
52
|
+
// c8 ignore next
|
|
53
53
|
if (!destUADataType) {
|
|
54
54
|
throw new Error("Cannot find UADataType " + dataTypeNodeId.toString() + " in address Space");
|
|
55
55
|
}
|
|
@@ -74,12 +74,12 @@ export function validateDataTypeCorrectness(
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
const enumerationUADataType = addressSpace.findDataType("Enumeration");
|
|
77
|
-
//
|
|
77
|
+
// c8 ignore next
|
|
78
78
|
if (!enumerationUADataType) {
|
|
79
79
|
throw new Error("cannot find Enumeration DataType node in standard address space");
|
|
80
80
|
}
|
|
81
81
|
if (destUADataType.isSubtypeOf(enumerationUADataType)) {
|
|
82
|
-
//
|
|
82
|
+
// c8 ignore next
|
|
83
83
|
if (doDebug) {
|
|
84
84
|
debugLog("destUADataType.", destUADataType.browseName.toString(), destUADataType.nodeId.toString());
|
|
85
85
|
debugLog(
|
|
@@ -97,13 +97,13 @@ export function validateDataTypeCorrectness(
|
|
|
97
97
|
|
|
98
98
|
const dest_isSubTypeOf_variant = variantUADataType.isSubtypeOf(builtInUADataType);
|
|
99
99
|
|
|
100
|
-
//
|
|
100
|
+
// c8 ignore next
|
|
101
101
|
if (doDebug) {
|
|
102
102
|
if (dest_isSubTypeOf_variant) {
|
|
103
|
-
/*
|
|
103
|
+
/* c8 ignore next*/
|
|
104
104
|
debugLog(chalk.green(" ---------- Type match !!! "), " on ", context?.toString());
|
|
105
105
|
} else {
|
|
106
|
-
/*
|
|
106
|
+
/* c8 ignore next*/
|
|
107
107
|
debugLog(chalk.red(" ---------- Type mismatch "), " on ", context?.toString());
|
|
108
108
|
}
|
|
109
109
|
debugLog(chalk.cyan(" Variable data Type is = "), destUADataType.browseName.toString());
|