node-opcua-address-space 2.54.0 → 2.57.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 +20 -20
- package/dist/source/address_space_ts.js.map +1 -1
- package/dist/source/continuation_points/continuation_point_manager.d.ts +27 -16
- package/dist/source/continuation_points/continuation_point_manager.js +141 -48
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
- package/dist/source/helpers/adjust_browse_direction.js.map +1 -1
- package/dist/source/helpers/call_helpers.js.map +1 -1
- package/dist/source/helpers/check_event_clause.js.map +1 -1
- package/dist/source/helpers/coerce_enum_value.js.map +1 -1
- package/dist/source/helpers/ensure_secure_access.js +0 -13
- package/dist/source/helpers/ensure_secure_access.js.map +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js +30 -6
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/loader/register_node_promoter.js.map +1 -1
- package/dist/source/namespace_machine_state.d.ts +1 -1
- package/dist/source/pseudo_session.js +23 -24
- package/dist/source/pseudo_session.js.map +1 -1
- package/dist/source/session_context.js.map +1 -1
- package/dist/source/set_namespace_meta_data.js.map +1 -1
- package/dist/src/address_space.d.ts +7 -8
- package/dist/src/address_space.js +2 -2
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_private.d.ts +4 -5
- package/dist/src/alarms_and_conditions/check_where_clause.js +1 -1
- package/dist/src/alarms_and_conditions/check_where_clause.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/extract_event_fields.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- 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.map +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
- package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js.map +1 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/extension_object_array_node.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.js +28 -59
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +2 -2
- package/dist/src/namespace_impl.js +6 -6
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/nodeid_manager.js +1 -4
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/nodeset_tools/typedictionary_to_xml.d.ts +1 -1
- package/dist/src/nodeset_tools/typedictionary_to_xml.js +3 -2
- package/dist/src/nodeset_tools/typedictionary_to_xml.js.map +1 -1
- package/dist/src/reference_impl.js +3 -1
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/tool_isSupertypeOf.js.map +1 -1
- package/dist/src/ua_method_impl.d.ts +1 -1
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.d.ts +10 -6
- package/dist/src/ua_object_impl.js +1 -1
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.js +3 -1
- package/dist/src/ua_reference_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +8 -7
- package/dist/src/ua_variable_impl.js +6 -10
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/src/ua_view_impl.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/boiler_system.d.ts +1 -1
- package/distHelpers/boiler_system.js +1 -2
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js +1 -0
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/date_utils.d.ts +3 -0
- package/distHelpers/date_utils.js +10 -0
- package/distHelpers/date_utils.js.map +1 -0
- package/distHelpers/get_mini_address_space.js.map +1 -1
- package/distHelpers/index.d.ts +2 -0
- package/distHelpers/index.js +2 -0
- package/distHelpers/index.js.map +1 -1
- package/distHelpers/mock_session.d.ts +14 -0
- package/distHelpers/mock_session.js +26 -0
- package/distHelpers/mock_session.js.map +1 -0
- package/generate.js +1 -1
- package/nodeJS.d.ts +1 -1
- package/package.json +39 -40
- package/source/address_space_ts.ts +0 -3
- package/source/continuation_points/continuation_point_manager.ts +178 -64
- package/source/helpers/adjust_browse_direction.ts +3 -3
- package/source/helpers/argument_list.ts +1 -1
- package/source/helpers/call_helpers.ts +0 -1
- package/source/helpers/check_event_clause.ts +2 -9
- package/source/helpers/coerce_enum_value.ts +3 -3
- package/source/helpers/ensure_secure_access.ts +1 -13
- package/source/helpers/resolve_opaque_on_address_space.ts +4 -1
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +13 -13
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +0 -1
- package/source/interfaces/data_access/ua_y_array_item_ex.ts +4 -2
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +5 -1
- package/source/interfaces/state_machine/ua_state_machine_type.ts +2 -2
- package/source/loader/load_nodeset2.ts +41 -9
- package/source/loader/namespace_post_step.ts +1 -2
- package/source/loader/register_node_promoter.ts +4 -1
- package/source/namespace.ts +4 -6
- package/source/namespace_machine_state.ts +1 -2
- package/source/pseudo_session.ts +37 -29
- package/source/session_context.ts +1 -8
- package/source/set_namespace_meta_data.ts +21 -15
- package/source/xml_writer.ts +0 -1
- package/source_nodejs/index.ts +1 -1
- package/src/address_space.ts +17 -16
- package/src/address_space_private.ts +7 -12
- package/src/alarms_and_conditions/check_where_clause.ts +21 -22
- package/src/alarms_and_conditions/condition.ts +0 -1
- package/src/alarms_and_conditions/extract_event_fields.ts +0 -1
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +7 -4
- package/src/alarms_and_conditions/ua_base_event_impl.ts +11 -15
- package/src/alarms_and_conditions/ua_condition_impl.ts +22 -31
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +39 -33
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +2 -2
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +4 -5
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +16 -16
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +8 -8
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +9 -10
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +2 -4
- package/src/apply_condition_refresh.ts +2 -2
- package/src/base_node_impl.ts +2 -2
- package/src/data_access/add_dataItem_stuff.ts +4 -4
- package/src/data_access/check_variant_compatibility_ua_analog_item.ts +12 -15
- package/src/data_access/ua_multistate_discrete_impl.ts +6 -3
- package/src/data_access/ua_multistate_value_discrete.ts +1 -1
- package/src/event_data.ts +1 -7
- package/src/extension_object_array_node.ts +4 -10
- package/src/historical_access/address_space_historical_data_node.ts +39 -63
- package/src/namespace_impl.ts +5 -5
- package/src/namespace_private.ts +1 -1
- package/src/nodeid_manager.ts +2 -5
- package/src/nodeset_tools/nodeset_to_xml.ts +5 -5
- package/src/nodeset_tools/typedictionary_to_xml.ts +7 -5
- package/src/reference_impl.ts +4 -2
- package/src/state_machine/finite_state_machine.ts +426 -428
- package/src/state_machine/ua_shelving_state_machine_ex.ts +13 -4
- package/src/state_machine/ua_two_state_variable.ts +5 -7
- package/src/tool_isSupertypeOf.ts +2 -6
- package/src/ua_condition_type.ts +0 -1
- package/src/ua_method_impl.ts +18 -8
- package/src/ua_object_impl.ts +13 -8
- package/src/ua_object_type_impl.ts +7 -4
- package/src/ua_reference_type_impl.ts +6 -12
- package/src/ua_variable_impl.ts +11 -15
- package/src/ua_variable_type_impl.ts +2 -2
- package/src/ua_view_impl.ts +3 -6
- package/testHelpers.d.ts +1 -1
- package/test_helpers/add_event_generator_object.ts +2 -2
- package/test_helpers/alarms_and_conditions_demo.ts +9 -8
- package/test_helpers/assertHasMatchingReference.ts +43 -43
- package/test_helpers/boiler_system.ts +610 -618
- package/test_helpers/create_minimalist_address_space_nodeset.ts +13 -13
- package/test_helpers/date_utils.ts +5 -0
- package/test_helpers/dump_statemachine.ts +2 -2
- package/test_helpers/get_address_space_fixture.ts +30 -30
- package/test_helpers/get_mini_address_space.ts +42 -42
- package/test_helpers/index.ts +13 -11
- package/test_helpers/mock_session.ts +34 -0
- package/test_helpers/test_fixtures/dataType_in_separateNamespace.xml +150 -150
- package/test_helpers/test_fixtures/dataType_in_separateNamespace_basic.xml +57 -57
- package/test_helpers/test_fixtures/dataType_in_separateNamespace_mix.xml +135 -135
- package/test_helpers/test_fixtures/dataType_issue.xml +80 -0
- package/test_helpers/test_fixtures/dataType_withEnumeration.xml +82 -82
- package/test_helpers/test_fixtures/dataType_with_isOptionSet.xml +194 -194
- package/test_helpers/test_fixtures/dataType_with_union.xml +1 -1
- package/test_helpers/test_fixtures/datatype_as_per_1.04.xml +1 -2
- package/test_helpers/test_fixtures/fixture_empty_nodeset2.xml +106 -106
- package/test_helpers/test_fixtures/fixture_simple_statemachine_nodeset2.xml +1303 -1303
- package/test_helpers/test_fixtures/fixuture_nodeset_objects_with_some_methods.xml +362 -362
- package/test_helpers/test_fixtures/issue_846.xml +3172 -3172
- package/test_helpers/test_fixtures/issue_899_variable_with_nodeid_value.xml +32 -32
- package/test_helpers/test_fixtures/mini.nodeset.withVariousVariables.xml +194 -194
- package/test_helpers/test_fixtures/minimalist_nodeset_with_models.xml +8 -8
- package/test_helpers/test_fixtures/minimalist_nodeset_with_models_more_complex.xml +16 -16
- package/test_helpers/test_fixtures/nodeset_with_analog_items.xml +45 -45
- package/.nyc_output/0d52ec22-23b7-4df1-9695-d5cf1dc6a6a7.json +0 -1
- package/.nyc_output/processinfo/0d52ec22-23b7-4df1-9695-d5cf1dc6a6a7.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/.vscode/settings.json +0 -7
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.d.ts +0 -23
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js +0 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_discrete_item.d.ts +0 -6
- package/dist/source/interfaces/data_access/ua_discrete_item.js +0 -3
- package/dist/source/interfaces/data_access/ua_discrete_item.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_discrete.d.ts +0 -25
- package/dist/source/interfaces/data_access/ua_multistate_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_multistate_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.d.ts +0 -27
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_two_state_discrete.d.ts +0 -17
- package/dist/source/interfaces/data_access/ua_two_state_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_two_state_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_y_array_item.d.ts +0 -19
- package/dist/source/interfaces/data_access/ua_y_array_item.js +0 -3
- package/dist/source/interfaces/data_access/ua_y_array_item.js.map +0 -1
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.d.ts +0 -11
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/finite_state_machine.d.ts +0 -70
- package/dist/source/interfaces/state_machine/finite_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/finite_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/program_finite_state_machine.d.ts +0 -74
- package/dist/source/interfaces/state_machine/program_finite_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/program_finite_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/state_machine.d.ts +0 -342
- package/dist/source/interfaces/state_machine/state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.d.ts +0 -18
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_state_variable.d.ts +0 -29
- package/dist/source/interfaces/state_machine/ua_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_state_variable.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_two_state_variable.d.ts +0 -26
- package/dist/source/interfaces/state_machine/ua_two_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_two_state_variable.js.map +0 -1
- package/dist/source/interfaces/subscription_diagnostics_variable.d.ts +0 -41
- package/dist/source/interfaces/subscription_diagnostics_variable.js +0 -3
- package/dist/source/interfaces/subscription_diagnostics_variable.js.map +0 -1
- package/dist/source/ua_namespace_meta_data_type.d.ts +0 -71
- package/dist/source/ua_namespace_meta_data_type.js +0 -3
- package/dist/source/ua_namespace_meta_data_type.js.map +0 -1
- package/dist/src/alarms_and_conditions/base_event_type.d.ts +0 -26
- package/dist/src/alarms_and_conditions/base_event_type.js +0 -41
- package/dist/src/alarms_and_conditions/base_event_type.js.map +0 -1
- package/dist/src/alarms_and_conditions/shelving_state_machine.d.ts +0 -22
- package/dist/src/alarms_and_conditions/shelving_state_machine.js +0 -241
- package/dist/src/alarms_and_conditions/shelving_state_machine.js.map +0 -1
- package/dist/src/alarms_and_conditions/trip_alarm.d.ts +0 -16
- package/dist/src/alarms_and_conditions/trip_alarm.js +0 -21
- package/dist/src/alarms_and_conditions/trip_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.d.ts +0 -54
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js +0 -255
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.d.ts +0 -138
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js +0 -460
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.d.ts +0 -35
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js +0 -32
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_condition_base.d.ts +0 -191
- package/dist/src/alarms_and_conditions/ua_condition_base.js +0 -1029
- package/dist/src/alarms_and_conditions/ua_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.d.ts +0 -11
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.js +0 -58
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.d.ts +0 -24
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js +0 -59
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.d.ts +0 -14
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js +0 -17
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.d.ts +0 -22
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js +0 -87
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.d.ts +0 -6
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js +0 -11
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm.d.ts +0 -76
- package/dist/src/alarms_and_conditions/ua_limit_alarm.js +0 -237
- package/dist/src/alarms_and_conditions/ua_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.d.ts +0 -27
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js +0 -62
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.d.ts +0 -49
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js +0 -176
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.d.ts +0 -47
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js +0 -151
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.d.ts +0 -16
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js +0 -18
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js.map +0 -1
- package/dist/src/base_node.d.ts +0 -279
- package/dist/src/base_node.js +0 -1364
- package/dist/src/base_node.js.map +0 -1
- package/dist/src/data_access/ua_analog_item.d.ts +0 -13
- package/dist/src/data_access/ua_analog_item.js +0 -37
- package/dist/src/data_access/ua_analog_item.js.map +0 -1
- package/dist/src/data_access/ua_data_item.d.ts +0 -16
- package/dist/src/data_access/ua_data_item.js +0 -66
- package/dist/src/data_access/ua_data_item.js.map +0 -1
- package/dist/src/data_access/ua_multistate_discrete.d.ts +0 -23
- package/dist/src/data_access/ua_multistate_discrete.js +0 -131
- package/dist/src/data_access/ua_multistate_discrete.js.map +0 -1
- package/dist/src/namespace.d.ts +0 -479
- package/dist/src/namespace.js +0 -1774
- package/dist/src/namespace.js.map +0 -1
- package/dist/src/reference.d.ts +0 -43
- package/dist/src/reference.js +0 -138
- package/dist/src/reference.js.map +0 -1
- package/dist/src/session_context.d.ts +0 -4
- package/dist/src/session_context.js +0 -9
- package/dist/src/session_context.js.map +0 -1
- package/dist/src/ua_data_type.d.ts +0 -83
- package/dist/src/ua_data_type.js +0 -289
- package/dist/src/ua_data_type.js.map +0 -1
- package/dist/src/ua_method.d.ts +0 -42
- package/dist/src/ua_method.js +0 -204
- package/dist/src/ua_method.js.map +0 -1
- package/dist/src/ua_object.d.ts +0 -29
- package/dist/src/ua_object.js +0 -153
- package/dist/src/ua_object.js.map +0 -1
- package/dist/src/ua_object_type.d.ts +0 -49
- package/dist/src/ua_object_type.js +0 -124
- package/dist/src/ua_object_type.js.map +0 -1
- package/dist/src/ua_reference_type.d.ts +0 -42
- package/dist/src/ua_reference_type.js +0 -138
- package/dist/src/ua_reference_type.js.map +0 -1
- package/dist/src/ua_variable.d.ts +0 -346
- package/dist/src/ua_variable.js +0 -1721
- package/dist/src/ua_variable.js.map +0 -1
- package/dist/src/ua_variable_type.d.ts +0 -54
- package/dist/src/ua_variable_type.js +0 -555
- package/dist/src/ua_variable_type.js.map +0 -1
- package/dist/src/ua_view.d.ts +0 -16
- package/dist/src/ua_view.js +0 -42
- package/dist/src/ua_view.js.map +0 -1
- package/src/alarms_and_conditions/debug.log +0 -1
- package/test_helpers/test_fixtures/issue_849.xml +0 -3169
|
@@ -22,14 +22,23 @@ import { promoteToStateMachine, UAStateMachineImpl } from "./finite_state_machin
|
|
|
22
22
|
const debugLog = make_debugLog(__filename);
|
|
23
23
|
const doDebug = checkDebugFlag(__filename);
|
|
24
24
|
|
|
25
|
-
export interface UAShelvedStateMachineHelper
|
|
25
|
+
export interface UAShelvedStateMachineHelper {
|
|
26
26
|
_timer: NodeJS.Timer | null;
|
|
27
27
|
_sheveldTime: Date;
|
|
28
28
|
_unshelvedTime: Date;
|
|
29
29
|
_duration: number;
|
|
30
30
|
}
|
|
31
|
-
export interface UAShelvedStateMachineEx
|
|
32
|
-
Omit<
|
|
31
|
+
export interface UAShelvedStateMachineEx
|
|
32
|
+
extends Omit<
|
|
33
|
+
UAShelvedStateMachine_Base,
|
|
34
|
+
| "oneShotShelvedToUnshelved"
|
|
35
|
+
| "unshelvedToTimedShelved"
|
|
36
|
+
| "unshelvedToOneShotShelved"
|
|
37
|
+
| "timedShelvedToUnshelved"
|
|
38
|
+
| "timedShelvedToOneShotShelved"
|
|
39
|
+
| "oneShotShelvedToTimedShelved"
|
|
40
|
+
>,
|
|
41
|
+
UAShelvedStateMachineHelper {
|
|
33
42
|
unshelveTime: UAProperty<number, DataType.Double>;
|
|
34
43
|
unshelved: UAState;
|
|
35
44
|
timedShelved: UAState;
|
|
@@ -115,7 +124,7 @@ function _unshelve_method(inputArguments: VariantLike[], context: ISessionContex
|
|
|
115
124
|
});
|
|
116
125
|
}
|
|
117
126
|
|
|
118
|
-
export function _clear_timer_if_any(shelvingState: UAShelvedStateMachineEx) {
|
|
127
|
+
export function _clear_timer_if_any(shelvingState: UAShelvedStateMachineEx): void {
|
|
119
128
|
if (shelvingState._timer) {
|
|
120
129
|
clearTimeout(shelvingState._timer);
|
|
121
130
|
// xx console.log("_clear_timer_if_any shelvingState = ",shelvingState._timer,shelvingState.constructor.name);
|
|
@@ -8,7 +8,7 @@ import { BrowseDirection, coerceLocalizedText, LocalizedText, LocalizedTextLike
|
|
|
8
8
|
import { DataValueT, DataValueOptionsT } from "node-opcua-data-value";
|
|
9
9
|
import { NodeId, resolveNodeId } from "node-opcua-nodeid";
|
|
10
10
|
import { sameNodeId } from "node-opcua-nodeid";
|
|
11
|
-
import { StatusCodes,StatusCode,
|
|
11
|
+
import { StatusCodes, StatusCode, StatusCodeCallback } from "node-opcua-status-code";
|
|
12
12
|
import { Variant, VariantLike, VariantT } from "node-opcua-variant";
|
|
13
13
|
import { DataType } from "node-opcua-variant";
|
|
14
14
|
import { BaseNode, BindVariableOptions, INamespace, UAReference, UAVariable, ISessionContext } from "node-opcua-address-space-base";
|
|
@@ -16,7 +16,6 @@ import { UATwoStateVariable } from "node-opcua-nodeset-ua";
|
|
|
16
16
|
import { NumericRange } from "node-opcua-numeric-range";
|
|
17
17
|
import { QualifiedNameLike } from "node-opcua-data-model";
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
// public interfaces
|
|
21
20
|
import { registerNodePromoter } from "../../source/loader/register_node_promoter";
|
|
22
21
|
import { AddTwoStateVariableOptions } from "../../source/address_space_ts";
|
|
@@ -130,7 +129,7 @@ export function _install_TwoStateVariable_machinery(
|
|
|
130
129
|
assert(node.minimumSamplingInterval === 0);
|
|
131
130
|
assert(node.typeDefinitionObj.browseName.toString() === "TwoStateVariableType");
|
|
132
131
|
assert(node.dataTypeObj.browseName.toString() === "LocalizedText");
|
|
133
|
-
assert(Object.prototype.hasOwnProperty.call(node,"valueRank") && (node.valueRank === -1 || node.valueRank === 0));
|
|
132
|
+
assert(Object.prototype.hasOwnProperty.call(node, "valueRank") && (node.valueRank === -1 || node.valueRank === 0));
|
|
134
133
|
|
|
135
134
|
// promote node into a UATwoStateVariable
|
|
136
135
|
const _node = promoteToTwoStateVariable(node);
|
|
@@ -161,8 +160,8 @@ export interface TwoStateVariableInitializeOptions {
|
|
|
161
160
|
}
|
|
162
161
|
|
|
163
162
|
export declare interface UATwoStateVariableImpl extends UATwoStateVariableEx {
|
|
164
|
-
on():this;
|
|
165
|
-
once():this;
|
|
163
|
+
on(): this;
|
|
164
|
+
once(): this;
|
|
166
165
|
readValue(
|
|
167
166
|
context?: ISessionContext | null,
|
|
168
167
|
indexRange?: NumericRange,
|
|
@@ -207,7 +206,6 @@ export class UATwoStateVariableImpl extends UAVariableImplT<LocalizedText, DataT
|
|
|
207
206
|
}
|
|
208
207
|
|
|
209
208
|
public initialize(options: TwoStateVariableInitializeOptions): void {
|
|
210
|
-
|
|
211
209
|
if (options.trueState) {
|
|
212
210
|
assert(!!options.falseState);
|
|
213
211
|
assert(typeof options.trueState === "string");
|
|
@@ -264,7 +262,7 @@ export class UATwoStateVariableImpl extends UAVariableImplT<LocalizedText, DataT
|
|
|
264
262
|
},
|
|
265
263
|
StatusCodes.Good
|
|
266
264
|
);
|
|
267
|
-
} else if (Object.prototype.hasOwnProperty.call(options.value,"dataType")) {
|
|
265
|
+
} else if (Object.prototype.hasOwnProperty.call(options.value, "dataType")) {
|
|
268
266
|
assert((options.value as VariantLike).dataType === DataType.Boolean);
|
|
269
267
|
this.id.setValueFromSource(options.value as VariantLike, StatusCodes.Good);
|
|
270
268
|
} else {
|
|
@@ -10,10 +10,6 @@ import { BaseNode, UADataType, UAObjectType, UAReference, UAReferenceType, UAVar
|
|
|
10
10
|
import { BaseNode_getCache } from "./base_node_private";
|
|
11
11
|
import { ReferenceImpl } from "./reference_impl";
|
|
12
12
|
import { BaseNodeImpl } from "./base_node_impl";
|
|
13
|
-
import { UAReferenceTypeImpl } from "./ua_reference_type_impl";
|
|
14
|
-
import { UADataTypeImpl } from "./ua_data_type_impl";
|
|
15
|
-
import { UAObjectTypeImpl } from "./ua_object_type_impl";
|
|
16
|
-
import { UAVariableTypeImpl } from "./ua_variable_type_impl";
|
|
17
13
|
|
|
18
14
|
const HasSubTypeNodeId = resolveNodeId("HasSubtype");
|
|
19
15
|
|
|
@@ -38,7 +34,7 @@ function _slow_isSupertypeOf<T extends UAType>(this: T, Class: typeof BaseNodeIm
|
|
|
38
34
|
|
|
39
35
|
for (const subType1 of subTypes) {
|
|
40
36
|
const subTypeId = subType1.nodeId;
|
|
41
|
-
const subTypeNode =
|
|
37
|
+
const subTypeNode = this.addressSpace.findNode(subTypeId) as any as T;
|
|
42
38
|
// istanbul ignore next
|
|
43
39
|
if (!subTypeNode) {
|
|
44
40
|
throw new Error("Cannot find object with nodeId " + subTypeId.toString());
|
|
@@ -101,7 +97,7 @@ export function construct_isSupertypeOf<T extends UAType>(Class: typeof BaseNode
|
|
|
101
97
|
}
|
|
102
98
|
|
|
103
99
|
export function construct_slow_isSupertypeOf<T extends UAType>(Class: typeof BaseNodeImpl) {
|
|
104
|
-
return function (this: T, baseType: T) {
|
|
100
|
+
return function (this: T, baseType: T): boolean {
|
|
105
101
|
return _slow_isSupertypeOf.call(this, Class, baseType);
|
|
106
102
|
};
|
|
107
103
|
}
|
package/src/ua_condition_type.ts
CHANGED
package/src/ua_method_impl.ts
CHANGED
|
@@ -15,7 +15,18 @@ import { StatusCodes } from "node-opcua-status-code";
|
|
|
15
15
|
import { CallMethodResultOptions, PermissionType } from "node-opcua-types";
|
|
16
16
|
import { Variant } from "node-opcua-variant";
|
|
17
17
|
import { DataType, VariantLike } from "node-opcua-variant";
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
MethodFunctor,
|
|
20
|
+
MethodFunctorCallback,
|
|
21
|
+
UAMethod,
|
|
22
|
+
UAObject,
|
|
23
|
+
CloneExtraInfo,
|
|
24
|
+
CloneFilter,
|
|
25
|
+
CloneOptions,
|
|
26
|
+
UAObjectType,
|
|
27
|
+
ISessionContext,
|
|
28
|
+
UAVariable
|
|
29
|
+
} from "node-opcua-address-space-base";
|
|
19
30
|
import { SessionContext } from "../source";
|
|
20
31
|
import { _clone } from "./base_node_private";
|
|
21
32
|
import { _handle_hierarchy_parent } from "./namespace_impl";
|
|
@@ -26,12 +37,12 @@ const warningLog = make_warningLog(__filename);
|
|
|
26
37
|
const debugLog = make_debugLog(__filename);
|
|
27
38
|
const errorLog = make_errorLog(__filename);
|
|
28
39
|
|
|
29
|
-
function default_check_valid_argument(arg:
|
|
30
|
-
return arg.constructor.name === "Argument";
|
|
40
|
+
function default_check_valid_argument(arg: unknown): boolean {
|
|
41
|
+
return (arg as any).constructor.name === "Argument";
|
|
31
42
|
}
|
|
32
43
|
|
|
33
44
|
export class UAMethodImpl extends BaseNodeImpl implements UAMethod {
|
|
34
|
-
public static checkValidArgument(args:
|
|
45
|
+
public static checkValidArgument(args: unknown): boolean {
|
|
35
46
|
return default_check_valid_argument(args);
|
|
36
47
|
}
|
|
37
48
|
|
|
@@ -47,7 +58,7 @@ export class UAMethodImpl extends BaseNodeImpl implements UAMethod {
|
|
|
47
58
|
|
|
48
59
|
public value?: any;
|
|
49
60
|
public methodDeclarationId: NodeId;
|
|
50
|
-
public _getExecutableFlag?: (this: UAMethod, context: ISessionContext| null) => boolean;
|
|
61
|
+
public _getExecutableFlag?: (this: UAMethod, context: ISessionContext | null) => boolean;
|
|
51
62
|
|
|
52
63
|
public _asyncExecutionFunction?: MethodFunctor;
|
|
53
64
|
|
|
@@ -80,11 +91,10 @@ export class UAMethodImpl extends BaseNodeImpl implements UAMethod {
|
|
|
80
91
|
}
|
|
81
92
|
|
|
82
93
|
public readAttribute(
|
|
83
|
-
context: ISessionContext | null,
|
|
84
|
-
attributeId: AttributeIds,
|
|
94
|
+
context: ISessionContext | null,
|
|
95
|
+
attributeId: AttributeIds,
|
|
85
96
|
indexRange?: NumericRange,
|
|
86
97
|
dataEncoding?: QualifiedNameLike | null
|
|
87
|
-
|
|
88
98
|
): DataValue {
|
|
89
99
|
const options: DataValueLike = {};
|
|
90
100
|
switch (attributeId) {
|
package/src/ua_object_impl.ts
CHANGED
|
@@ -20,23 +20,28 @@ import {
|
|
|
20
20
|
UAMethod,
|
|
21
21
|
UAObject,
|
|
22
22
|
UAObjectType,
|
|
23
|
-
CloneOptions,
|
|
23
|
+
CloneOptions,
|
|
24
|
+
CloneFilter,
|
|
25
|
+
CloneExtraInfo,
|
|
26
|
+
BaseNode,
|
|
27
|
+
UAEventType,
|
|
28
|
+
IEventData
|
|
24
29
|
} from "node-opcua-address-space-base";
|
|
25
30
|
|
|
26
|
-
import { BaseNodeImpl } from "./base_node_impl";
|
|
31
|
+
import { BaseNodeImpl, InternalBaseNodeOptions } from "./base_node_impl";
|
|
27
32
|
import { _clone, ToStringBuilder, UAObject_toString } from "./base_node_private";
|
|
28
|
-
import { apply_condition_refresh } from "./apply_condition_refresh";
|
|
33
|
+
import { apply_condition_refresh, ConditionRefreshCache } from "./apply_condition_refresh";
|
|
29
34
|
|
|
30
35
|
export class UAObjectImpl extends BaseNodeImpl implements UAObject {
|
|
31
36
|
public readonly nodeClass = NodeClass.Object;
|
|
32
37
|
public readonly eventNotifier: number;
|
|
33
|
-
public readonly symbolicName: string;
|
|
38
|
+
public readonly symbolicName: string | null;
|
|
34
39
|
|
|
35
40
|
get typeDefinitionObj(): UAObjectType {
|
|
36
41
|
return super.typeDefinitionObj as UAObjectType;
|
|
37
42
|
}
|
|
38
43
|
|
|
39
|
-
constructor(options:
|
|
44
|
+
constructor(options: InternalBaseNodeOptions & { eventNotifier?: number; symbolicName?: string | null }) {
|
|
40
45
|
super(options);
|
|
41
46
|
this.eventNotifier = options.eventNotifier || 0;
|
|
42
47
|
assert(typeof this.eventNotifier === "number" && isValidByte(this.eventNotifier));
|
|
@@ -72,7 +77,7 @@ export class UAObjectImpl extends BaseNodeImpl implements UAObject {
|
|
|
72
77
|
options = {
|
|
73
78
|
...options,
|
|
74
79
|
eventNotifier: this.eventNotifier,
|
|
75
|
-
symbolicName: this.symbolicName
|
|
80
|
+
symbolicName: this.symbolicName || undefined
|
|
76
81
|
};
|
|
77
82
|
|
|
78
83
|
const cloneObject = _clone.call(this, UAObjectImpl, options, optionalFilter, extraInfo) as UAObject;
|
|
@@ -145,7 +150,7 @@ export class UAObjectImpl extends BaseNodeImpl implements UAObject {
|
|
|
145
150
|
this._bubble_up_event(eventData1);
|
|
146
151
|
}
|
|
147
152
|
|
|
148
|
-
public _bubble_up_event(eventData:
|
|
153
|
+
public _bubble_up_event(eventData: IEventData): void {
|
|
149
154
|
const addressSpace = this.addressSpace;
|
|
150
155
|
|
|
151
156
|
const queue: any[] = [];
|
|
@@ -191,7 +196,7 @@ export class UAObjectImpl extends BaseNodeImpl implements UAObject {
|
|
|
191
196
|
elements2.forEach(addInQueue);
|
|
192
197
|
}
|
|
193
198
|
}
|
|
194
|
-
public _conditionRefresh(_cache?:
|
|
199
|
+
public _conditionRefresh(_cache?: ConditionRefreshCache): void {
|
|
195
200
|
apply_condition_refresh.call(this, _cache);
|
|
196
201
|
}
|
|
197
202
|
|
|
@@ -23,7 +23,11 @@ import { BaseNodeImpl } from "./base_node_impl";
|
|
|
23
23
|
import { ToStringBuilder, UAObjectType_toString } from "./base_node_private";
|
|
24
24
|
import { get_subtypeOf, get_subtypeOfObj } from "./tool_isSupertypeOf";
|
|
25
25
|
import * as tools from "./tool_isSupertypeOf";
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
assertUnusedChildBrowseName,
|
|
28
|
+
initialize_properties_and_components,
|
|
29
|
+
topMostParentIsObjectTypeOrVariableType
|
|
30
|
+
} from "./ua_variable_type_impl";
|
|
27
31
|
import { AddressSpacePrivate } from "./address_space_private";
|
|
28
32
|
|
|
29
33
|
export class UAObjectTypeImpl extends BaseNodeImpl implements UAObjectType {
|
|
@@ -101,8 +105,8 @@ export class UAObjectTypeImpl extends BaseNodeImpl implements UAObjectType {
|
|
|
101
105
|
"expecting a browse name"
|
|
102
106
|
);
|
|
103
107
|
|
|
104
|
-
assert(!Object.prototype.hasOwnProperty.call(options,"propertyOf"), "an Object shall not be a PropertyOf an other object");
|
|
105
|
-
assert(!Object.prototype.hasOwnProperty.call(options,"optional"), "do you mean optionals ?");
|
|
108
|
+
assert(!Object.prototype.hasOwnProperty.call(options, "propertyOf"), "an Object shall not be a PropertyOf an other object");
|
|
109
|
+
assert(!Object.prototype.hasOwnProperty.call(options, "optional"), "do you mean optionals ?");
|
|
106
110
|
|
|
107
111
|
assertUnusedChildBrowseName(addressSpace, options);
|
|
108
112
|
|
|
@@ -113,7 +117,6 @@ export class UAObjectTypeImpl extends BaseNodeImpl implements UAObjectType {
|
|
|
113
117
|
|
|
114
118
|
const copyAlsoModellingRules = topMostParentIsObjectTypeOrVariableType(addressSpace, options);
|
|
115
119
|
|
|
116
|
-
|
|
117
120
|
const opts: AddObjectOptions = {
|
|
118
121
|
browseName: options.browseName,
|
|
119
122
|
componentOf: options.componentOf,
|
|
@@ -17,14 +17,10 @@ import { BaseNodeImpl, InternalBaseNodeOptions } from "./base_node_impl";
|
|
|
17
17
|
import * as tools from "./tool_isSupertypeOf";
|
|
18
18
|
import { get_subtypeOf, get_subtypeOfObj } from "./tool_isSupertypeOf";
|
|
19
19
|
import { ReferenceImpl } from "./reference_impl";
|
|
20
|
-
import {
|
|
21
|
-
BaseNode_getCache
|
|
22
|
-
} from "./base_node_private";
|
|
23
|
-
|
|
20
|
+
import { BaseNode_getCache } from "./base_node_private";
|
|
24
21
|
|
|
25
22
|
const ReferenceTypeCounter = { count: 0 };
|
|
26
23
|
|
|
27
|
-
|
|
28
24
|
function _internal_getAllSubtypes(referenceType: UAReferenceType): UAReferenceTypePublic[] {
|
|
29
25
|
const addressSpace = referenceType.addressSpace;
|
|
30
26
|
const possibleReferenceTypes: UAReferenceType[] = [];
|
|
@@ -45,7 +41,6 @@ function _internal_getAllSubtypes(referenceType: UAReferenceType): UAReferenceTy
|
|
|
45
41
|
}
|
|
46
42
|
|
|
47
43
|
function _getAllSubtypes(ref: UAReferenceType) {
|
|
48
|
-
|
|
49
44
|
const _cache = BaseNode_getCache(ref);
|
|
50
45
|
|
|
51
46
|
if (!_cache._allSubTypesVersion || _cache._allSubTypesVersion < ReferenceTypeCounter.count) {
|
|
@@ -69,9 +64,8 @@ function _internal_getSubtypeIndex(referenceType: UAReferenceType): { [key: stri
|
|
|
69
64
|
}
|
|
70
65
|
|
|
71
66
|
function _getSubtypeIndex(referenceType: UAReferenceType): { [key: string]: UAReferenceTypePublic } {
|
|
72
|
-
|
|
73
67
|
const _cache = BaseNode_getCache(referenceType);
|
|
74
|
-
if (!_cache._subtype_idx
|
|
68
|
+
if (!_cache._subtype_idx || _cache._subtype_idxVersion < ReferenceTypeCounter.count) {
|
|
75
69
|
// the cache need to be invalidated
|
|
76
70
|
_cache._subtype_idx = null;
|
|
77
71
|
}
|
|
@@ -82,7 +76,6 @@ function _getSubtypeIndex(referenceType: UAReferenceType): { [key: string]: UARe
|
|
|
82
76
|
return _cache._subtype_idx;
|
|
83
77
|
}
|
|
84
78
|
|
|
85
|
-
|
|
86
79
|
export interface UAReferenceTypeOptions extends InternalBaseNodeOptions {
|
|
87
80
|
isAbstract?: boolean;
|
|
88
81
|
symmetric?: boolean;
|
|
@@ -154,7 +147,9 @@ export class UAReferenceTypeImpl extends BaseNodeImpl implements UAReferenceType
|
|
|
154
147
|
return str;
|
|
155
148
|
}
|
|
156
149
|
|
|
157
|
-
public install_extra_properties(): void {
|
|
150
|
+
public install_extra_properties(): void {
|
|
151
|
+
/** */
|
|
152
|
+
}
|
|
158
153
|
|
|
159
154
|
/**
|
|
160
155
|
* returns a array of all ReferenceTypes in the addressSpace that are self or a subType of self
|
|
@@ -166,9 +161,8 @@ export class UAReferenceTypeImpl extends BaseNodeImpl implements UAReferenceType
|
|
|
166
161
|
|
|
167
162
|
public checkHasSubtype(ref: UAReference | NodeId): boolean {
|
|
168
163
|
const _index = _getSubtypeIndex(this);
|
|
169
|
-
const referenceTypeNodeId = ref instanceof ReferenceImpl ? ref.nodeId : ref as NodeId;
|
|
164
|
+
const referenceTypeNodeId = ref instanceof ReferenceImpl ? ref.nodeId : (ref as NodeId);
|
|
170
165
|
const _key = referenceTypeNodeId.toString();
|
|
171
166
|
return !!_index[_key];
|
|
172
167
|
}
|
|
173
|
-
|
|
174
168
|
}
|
package/src/ua_variable_impl.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// tslint:disable:max-line-length
|
|
9
9
|
import * as chalk from "chalk";
|
|
10
10
|
|
|
11
|
-
import { GetFunc, SetFunc } from "node-opcua-address-space-base";
|
|
11
|
+
import { ContinuationData, GetFunc, SetFunc } from "node-opcua-address-space-base";
|
|
12
12
|
import { assert } from "node-opcua-assert";
|
|
13
13
|
import {
|
|
14
14
|
isValidDataEncoding,
|
|
@@ -1507,7 +1507,7 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
1507
1507
|
return this.$extensionObject;
|
|
1508
1508
|
}
|
|
1509
1509
|
|
|
1510
|
-
public updateExtensionObjectPartial(partialExtensionObject?: {[key:string]: any}): ExtensionObject {
|
|
1510
|
+
public updateExtensionObjectPartial(partialExtensionObject?: { [key: string]: any }): ExtensionObject {
|
|
1511
1511
|
setExtensionObjectValue(this, partialExtensionObject);
|
|
1512
1512
|
return this.$extensionObject;
|
|
1513
1513
|
}
|
|
@@ -1571,7 +1571,7 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
1571
1571
|
| ReadAtTimeDetails,
|
|
1572
1572
|
indexRange: NumericRange | null,
|
|
1573
1573
|
dataEncoding: QualifiedNameLike | null,
|
|
1574
|
-
|
|
1574
|
+
continuationData: ContinuationData
|
|
1575
1575
|
): Promise<HistoryReadResult>;
|
|
1576
1576
|
|
|
1577
1577
|
public historyRead(
|
|
@@ -1584,7 +1584,7 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
1584
1584
|
| ReadAtTimeDetails,
|
|
1585
1585
|
indexRange: NumericRange | null,
|
|
1586
1586
|
dataEncoding: QualifiedNameLike | null,
|
|
1587
|
-
|
|
1587
|
+
continuationData: ContinuationData,
|
|
1588
1588
|
callback: CallbackT<HistoryReadResult>
|
|
1589
1589
|
): void;
|
|
1590
1590
|
public historyRead(
|
|
@@ -1597,19 +1597,15 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
1597
1597
|
| ReadAtTimeDetails,
|
|
1598
1598
|
indexRange: NumericRange | null,
|
|
1599
1599
|
dataEncoding: QualifiedNameLike | null,
|
|
1600
|
-
|
|
1600
|
+
continuationData: ContinuationData,
|
|
1601
1601
|
callback?: CallbackT<HistoryReadResult>
|
|
1602
1602
|
): any {
|
|
1603
|
-
if (!callback) {
|
|
1604
|
-
callback = continuationPoint as any as CallbackT<HistoryReadResult>;
|
|
1605
|
-
continuationPoint = undefined;
|
|
1606
|
-
}
|
|
1607
1603
|
assert(context instanceof SessionContext);
|
|
1608
1604
|
assert(callback instanceof Function);
|
|
1609
1605
|
if (typeof this._historyRead !== "function") {
|
|
1610
|
-
return callback(null, new HistoryReadResult({ statusCode: StatusCodes.BadNotReadable }));
|
|
1606
|
+
return callback!(null, new HistoryReadResult({ statusCode: StatusCodes.BadNotReadable }));
|
|
1611
1607
|
}
|
|
1612
|
-
this._historyRead(context, historyReadDetails, indexRange, dataEncoding,
|
|
1608
|
+
this._historyRead(context, historyReadDetails, indexRange, dataEncoding, continuationData, callback!);
|
|
1613
1609
|
}
|
|
1614
1610
|
|
|
1615
1611
|
public _historyReadRaw(
|
|
@@ -1617,7 +1613,7 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
1617
1613
|
historyReadRawModifiedDetails: ReadRawModifiedDetails,
|
|
1618
1614
|
indexRange: NumericRange | null,
|
|
1619
1615
|
dataEncoding: QualifiedNameLike | null,
|
|
1620
|
-
|
|
1616
|
+
continuationData: ContinuationData,
|
|
1621
1617
|
callback: CallbackT<HistoryReadResult>
|
|
1622
1618
|
): void {
|
|
1623
1619
|
throw new Error("");
|
|
@@ -1628,7 +1624,7 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
1628
1624
|
historyReadRawModifiedDetails: ReadRawModifiedDetails,
|
|
1629
1625
|
indexRange: NumericRange | null,
|
|
1630
1626
|
dataEncoding: QualifiedNameLike | null,
|
|
1631
|
-
|
|
1627
|
+
continuationData: ContinuationData,
|
|
1632
1628
|
callback?: CallbackT<HistoryReadResult>
|
|
1633
1629
|
): any {
|
|
1634
1630
|
throw new Error("");
|
|
@@ -1644,7 +1640,7 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
1644
1640
|
| ReadAtTimeDetails,
|
|
1645
1641
|
indexRange: NumericRange | null,
|
|
1646
1642
|
dataEncoding: QualifiedNameLike | null,
|
|
1647
|
-
|
|
1643
|
+
continuationData: ContinuationData,
|
|
1648
1644
|
callback: CallbackT<HistoryReadResult>
|
|
1649
1645
|
): void {
|
|
1650
1646
|
const result = new HistoryReadResult({
|
|
@@ -1672,7 +1668,7 @@ export class UAVariableImpl extends BaseNodeImpl implements UAVariable {
|
|
|
1672
1668
|
historyReadRawModifiedDetails: ReadRawModifiedDetails,
|
|
1673
1669
|
indexRange: NumericRange | null,
|
|
1674
1670
|
dataEncoding: QualifiedNameLike | null,
|
|
1675
|
-
|
|
1671
|
+
continuationData: ContinuationData,
|
|
1676
1672
|
callback: CallbackT<HistoryReadResult>
|
|
1677
1673
|
): any {
|
|
1678
1674
|
throw new Error("");
|
|
@@ -122,8 +122,8 @@ export class UAVariableTypeImpl extends BaseNodeImpl implements UAVariableType {
|
|
|
122
122
|
|
|
123
123
|
this.minimumSamplingInterval = 0;
|
|
124
124
|
|
|
125
|
-
this.historizing = isNullOrUndefined(options.historizing) ? false : options.historizing as boolean;
|
|
126
|
-
this.isAbstract = isNullOrUndefined(options.isAbstract) ? false : options.isAbstract as boolean;
|
|
125
|
+
this.historizing = isNullOrUndefined(options.historizing) ? false : (options.historizing as boolean);
|
|
126
|
+
this.isAbstract = isNullOrUndefined(options.isAbstract) ? false : (options.isAbstract as boolean);
|
|
127
127
|
|
|
128
128
|
this.value = options.value; // optional default value for instances of this UAVariableType
|
|
129
129
|
|
package/src/ua_view_impl.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { AttributeIds } from "node-opcua-data-model";
|
|
|
7
7
|
import { DataValue, DataValueLike } from "node-opcua-data-value";
|
|
8
8
|
import { StatusCodes } from "node-opcua-status-code";
|
|
9
9
|
import { DataType } from "node-opcua-variant";
|
|
10
|
-
import { ISessionContext, UAView
|
|
10
|
+
import { ISessionContext, UAView } from "node-opcua-address-space-base";
|
|
11
11
|
|
|
12
12
|
import { SessionContext } from "../source/session_context";
|
|
13
13
|
import { BaseNodeImpl, InternalBaseNodeOptions } from "./base_node_impl";
|
|
@@ -17,7 +17,6 @@ export interface InternalViewOptions extends InternalBaseNodeOptions {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export class UAViewImpl extends BaseNodeImpl implements UAView {
|
|
20
|
-
|
|
21
20
|
public readonly nodeClass = NodeClass.View;
|
|
22
21
|
public readonly containsNoLoops: boolean;
|
|
23
22
|
public readonly eventNotifier: number;
|
|
@@ -29,13 +28,11 @@ export class UAViewImpl extends BaseNodeImpl implements UAView {
|
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
public readAttribute(context: ISessionContext | null, attributeId: AttributeIds): DataValue {
|
|
32
|
-
|
|
33
31
|
context = context || SessionContext.defaultContext;
|
|
34
|
-
|
|
32
|
+
|
|
35
33
|
const options: DataValueLike = {};
|
|
36
34
|
|
|
37
35
|
switch (attributeId) {
|
|
38
|
-
|
|
39
36
|
case AttributeIds.EventNotifier:
|
|
40
37
|
options.value = { dataType: DataType.UInt32, value: this.eventNotifier };
|
|
41
38
|
options.statusCode = StatusCodes.Good;
|
|
@@ -47,7 +44,7 @@ export class UAViewImpl extends BaseNodeImpl implements UAView {
|
|
|
47
44
|
break;
|
|
48
45
|
|
|
49
46
|
default:
|
|
50
|
-
|
|
47
|
+
return super.readAttribute(context, attributeId);
|
|
51
48
|
}
|
|
52
49
|
return new DataValue(options);
|
|
53
50
|
}
|
package/testHelpers.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./distHelpers";
|
|
1
|
+
export * from "./distHelpers";
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
import { StatusCodes } from "node-opcua-status-code";
|
|
5
5
|
import { DataType, Variant } from "node-opcua-variant";
|
|
6
6
|
import { INamespace, UAObject, ISessionContext, MethodFunctorCallback } from "node-opcua-address-space-base";
|
|
7
|
-
import { UAFolder
|
|
7
|
+
import { UAFolder } from "node-opcua-nodeset-ua";
|
|
8
8
|
|
|
9
|
-
export function add_eventGeneratorObject(namespace: INamespace, parentFolder: UAFolder | string) {
|
|
9
|
+
export function add_eventGeneratorObject(namespace: INamespace, parentFolder: UAFolder | string): void {
|
|
10
10
|
const myEvtType = namespace.addEventType({
|
|
11
11
|
browseName: "MyEventType",
|
|
12
12
|
subtypeOf: "BaseEventType" // should be implicit
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
4
|
import { assert } from "node-opcua-assert";
|
|
5
|
-
import { AddressSpace, UAExclusiveLimitAlarmImpl, UAObject, UAVariable} from "..";
|
|
6
|
-
import { UANonExclusiveLimitAlarmEx
|
|
5
|
+
import { AddressSpace, UAExclusiveLimitAlarmImpl, UAObject, UAVariable } from "..";
|
|
6
|
+
import { UANonExclusiveLimitAlarmEx, UAExclusiveLimitAlarmEx } from "..";
|
|
7
7
|
|
|
8
8
|
export interface IAlarmTestData {
|
|
9
9
|
tankLevel: UAVariable;
|
|
@@ -13,8 +13,7 @@ export interface IAlarmTestData {
|
|
|
13
13
|
tankTripCondition: null;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export function construct_demo_alarm_in_address_space(test: IAlarmTestData, addressSpace: AddressSpace) {
|
|
17
|
-
|
|
16
|
+
export function construct_demo_alarm_in_address_space(test: IAlarmTestData, addressSpace: AddressSpace): void {
|
|
18
17
|
const a = addressSpace as any;
|
|
19
18
|
if (a.construct_demo_alarm_in_address_space_called) {
|
|
20
19
|
return;
|
|
@@ -72,20 +71,22 @@ export function construct_demo_alarm_in_address_space(test: IAlarmTestData, addr
|
|
|
72
71
|
"Confirm" // confirm state and confirm Method
|
|
73
72
|
]
|
|
74
73
|
}) as UAExclusiveLimitAlarmImpl;
|
|
75
|
-
|
|
74
|
+
|
|
76
75
|
assert(tankLevelCondition.browseName.toString() === "1:TankLevelCondition");
|
|
77
76
|
|
|
78
77
|
assert(tankLevel.findReferences("HasCondition").length === 1);
|
|
79
78
|
assert(tankLevel.findReferencesAsObject("HasCondition", true).length === 1);
|
|
80
|
-
|
|
79
|
+
|
|
81
80
|
const conditionName = tankLevel.findReferencesAsObject("HasCondition", true)[0].browseName.toString();
|
|
82
|
-
const conditionTypeDefinition =
|
|
81
|
+
const conditionTypeDefinition = (
|
|
82
|
+
tankLevel.findReferencesAsObject("HasCondition", true)[0] as UAObject
|
|
83
|
+
).typeDefinitionObj.browseName.toString();
|
|
83
84
|
const conditionJavascriptClass = tankLevel.findReferencesAsObject("HasCondition", true)[0].constructor.name.toString();
|
|
84
85
|
if (false) {
|
|
85
86
|
console.log(conditionName, conditionTypeDefinition, conditionJavascriptClass);
|
|
86
87
|
}
|
|
87
88
|
assert("1:TankLevelCondition" === conditionName);
|
|
88
|
-
assert("ExclusiveLimitAlarmType" === conditionTypeDefinition)
|
|
89
|
+
assert("ExclusiveLimitAlarmType" === conditionTypeDefinition);
|
|
89
90
|
assert("UAExclusiveLimitAlarmImpl" === conditionJavascriptClass);
|
|
90
91
|
|
|
91
92
|
// ----------------------------------------------------------------
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-address-space
|
|
3
|
-
*/
|
|
4
|
-
import { assert } from "node-opcua-assert";
|
|
5
|
-
import { NodeId, sameNodeId } from "node-opcua-nodeid";
|
|
6
|
-
import { AddReferenceOpts, BaseNode, UAReference } from "..";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* asserts that the provided reference exists in the node references
|
|
10
|
-
*
|
|
11
|
-
* @method assertHasMatchingReference
|
|
12
|
-
*
|
|
13
|
-
* @param node
|
|
14
|
-
* @param reference (Reference}
|
|
15
|
-
* @param reference.referenceType {String}
|
|
16
|
-
* @param reference.nodeId {NodeId}
|
|
17
|
-
* @param reference.isForward {Boolean}
|
|
18
|
-
*
|
|
19
|
-
* @example:
|
|
20
|
-
*
|
|
21
|
-
* assertHasMatchingReference(node,{ referenceType: "Organizes",i sForward:true, nodeId: "ns=1,i=12" });
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
25
|
-
export function assertHasMatchingReference(node: BaseNode, reference: AddReferenceOpts) {
|
|
26
|
-
const addressSpace = node.addressSpace;
|
|
27
|
-
|
|
28
|
-
const normalizedReference = addressSpace.normalizeReferenceType(reference);
|
|
29
|
-
assert(normalizedReference.referenceType instanceof NodeId);
|
|
30
|
-
|
|
31
|
-
let refs = node.findReferences(normalizedReference.referenceType, normalizedReference.isForward);
|
|
32
|
-
|
|
33
|
-
refs = refs.filter((ref: UAReference) => {
|
|
34
|
-
return sameNodeId(ref.nodeId, normalizedReference.nodeId);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const dispOpts = { addressSpace };
|
|
38
|
-
|
|
39
|
-
if (refs.length !== 1) {
|
|
40
|
-
throw new Error(" Cannot find reference " + JSON.stringify(normalizedReference));
|
|
41
|
-
}
|
|
42
|
-
assert(refs.length === 1);
|
|
43
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space
|
|
3
|
+
*/
|
|
4
|
+
import { assert } from "node-opcua-assert";
|
|
5
|
+
import { NodeId, sameNodeId } from "node-opcua-nodeid";
|
|
6
|
+
import { AddReferenceOpts, BaseNode, UAReference } from "..";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* asserts that the provided reference exists in the node references
|
|
10
|
+
*
|
|
11
|
+
* @method assertHasMatchingReference
|
|
12
|
+
*
|
|
13
|
+
* @param node
|
|
14
|
+
* @param reference (Reference}
|
|
15
|
+
* @param reference.referenceType {String}
|
|
16
|
+
* @param reference.nodeId {NodeId}
|
|
17
|
+
* @param reference.isForward {Boolean}
|
|
18
|
+
*
|
|
19
|
+
* @example:
|
|
20
|
+
*
|
|
21
|
+
* assertHasMatchingReference(node,{ referenceType: "Organizes",i sForward:true, nodeId: "ns=1,i=12" });
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export function assertHasMatchingReference(node: BaseNode, reference: AddReferenceOpts): void {
|
|
26
|
+
const addressSpace = node.addressSpace;
|
|
27
|
+
|
|
28
|
+
const normalizedReference = addressSpace.normalizeReferenceType(reference);
|
|
29
|
+
assert(normalizedReference.referenceType instanceof NodeId);
|
|
30
|
+
|
|
31
|
+
let refs = node.findReferences(normalizedReference.referenceType, normalizedReference.isForward);
|
|
32
|
+
|
|
33
|
+
refs = refs.filter((ref: UAReference) => {
|
|
34
|
+
return sameNodeId(ref.nodeId, normalizedReference.nodeId);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const dispOpts = { addressSpace };
|
|
38
|
+
|
|
39
|
+
if (refs.length !== 1) {
|
|
40
|
+
throw new Error(" Cannot find reference " + JSON.stringify(normalizedReference));
|
|
41
|
+
}
|
|
42
|
+
assert(refs.length === 1);
|
|
43
|
+
}
|