node-opcua-address-space 2.51.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/.mocharc.yml +12 -0
- package/LICENSE +20 -0
- package/dist/source/address_space_ts.d.ts +122 -0
- package/dist/source/address_space_ts.js +18 -0
- package/dist/source/address_space_ts.js.map +1 -0
- package/dist/source/continuation_points/continuation_point_manager.d.ts +21 -0
- package/dist/source/continuation_points/continuation_point_manager.js +100 -0
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -0
- package/dist/source/helpers/adjust_browse_direction.d.ts +5 -0
- package/dist/source/helpers/adjust_browse_direction.js +12 -0
- package/dist/source/helpers/adjust_browse_direction.js.map +1 -0
- package/dist/source/helpers/argument_list.d.ts +30 -0
- package/dist/source/helpers/argument_list.js +237 -0
- package/dist/source/helpers/argument_list.js.map +1 -0
- package/dist/source/helpers/call_helpers.d.ts +6 -0
- package/dist/source/helpers/call_helpers.js +71 -0
- package/dist/source/helpers/call_helpers.js.map +1 -0
- package/dist/source/helpers/check_event_clause.d.ts +17 -0
- package/dist/source/helpers/check_event_clause.js +53 -0
- package/dist/source/helpers/check_event_clause.js.map +1 -0
- package/dist/source/helpers/coerce_enum_value.d.ts +6 -0
- package/dist/source/helpers/coerce_enum_value.js +34 -0
- package/dist/source/helpers/coerce_enum_value.js.map +1 -0
- package/dist/source/helpers/dump_tools.d.ts +14 -0
- package/dist/source/helpers/dump_tools.js +79 -0
- package/dist/source/helpers/dump_tools.js.map +1 -0
- package/dist/source/helpers/ensure_secure_access.d.ts +9 -0
- package/dist/source/helpers/ensure_secure_access.js +90 -0
- package/dist/source/helpers/ensure_secure_access.js.map +1 -0
- package/dist/source/helpers/make_optionals_map.d.ts +21 -0
- package/dist/source/helpers/make_optionals_map.js +30 -0
- package/dist/source/helpers/make_optionals_map.js.map +1 -0
- package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +3 -0
- package/dist/source/helpers/resolve_opaque_on_address_space.js +37 -0
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -0
- package/dist/source/index.d.ts +39 -0
- package/dist/source/index.js +62 -0
- package/dist/source/index.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +12 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.d.ts +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_discrete_item.d.ts +4 -0
- package/dist/source/interfaces/data_access/ua_discrete_item.js +3 -0
- package/dist/source/interfaces/data_access/ua_discrete_item.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_multistate_discrete.d.ts +25 -0
- package/dist/source/interfaces/data_access/ua_multistate_discrete.js +3 -0
- package/dist/source/interfaces/data_access/ua_multistate_discrete.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +21 -0
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js +3 -0
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.d.ts +27 -0
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js +3 -0
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +24 -0
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js +3 -0
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_two_state_discrete.d.ts +17 -0
- package/dist/source/interfaces/data_access/ua_two_state_discrete.js +3 -0
- package/dist/source/interfaces/data_access/ua_two_state_discrete.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +12 -0
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js +3 -0
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_y_array_item.d.ts +4 -0
- package/dist/source/interfaces/data_access/ua_y_array_item.js +3 -0
- package/dist/source/interfaces/data_access/ua_y_array_item.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +8 -0
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.js +3 -0
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.js.map +1 -0
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.d.ts +11 -0
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js +3 -0
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js.map +1 -0
- package/dist/source/interfaces/state_machine/finite_state_machine.d.ts +69 -0
- package/dist/source/interfaces/state_machine/finite_state_machine.js +3 -0
- package/dist/source/interfaces/state_machine/finite_state_machine.js.map +1 -0
- package/dist/source/interfaces/state_machine/program_finite_state_machine.d.ts +74 -0
- package/dist/source/interfaces/state_machine/program_finite_state_machine.js +3 -0
- package/dist/source/interfaces/state_machine/program_finite_state_machine.js.map +1 -0
- package/dist/source/interfaces/state_machine/state_machine.d.ts +342 -0
- package/dist/source/interfaces/state_machine/state_machine.js +3 -0
- package/dist/source/interfaces/state_machine/state_machine.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +12 -0
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +3 -0
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +49 -0
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js +3 -0
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.d.ts +18 -0
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.js +3 -0
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +11 -0
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js +3 -0
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +222 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js +3 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_state_variable.d.ts +29 -0
- package/dist/source/interfaces/state_machine/ua_state_variable.js +3 -0
- package/dist/source/interfaces/state_machine/ua_state_variable.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +6 -0
- package/dist/source/interfaces/state_machine/ua_transition_ex.js +3 -0
- package/dist/source/interfaces/state_machine/ua_transition_ex.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_two_state_variable.d.ts +26 -0
- package/dist/source/interfaces/state_machine/ua_two_state_variable.js +3 -0
- package/dist/source/interfaces/state_machine/ua_two_state_variable.js.map +1 -0
- package/dist/source/interfaces/subscription_diagnostics_variable.d.ts +41 -0
- package/dist/source/interfaces/subscription_diagnostics_variable.js +3 -0
- package/dist/source/interfaces/subscription_diagnostics_variable.js.map +1 -0
- package/dist/source/interfaces/ua_authorisation_service.d.ts +1 -0
- package/dist/source/interfaces/ua_authorisation_service.js +3 -0
- package/dist/source/interfaces/ua_authorisation_service.js.map +1 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +8 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -0
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +10 -0
- package/dist/source/loader/generateAddressSpaceRaw.js +59 -0
- package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -0
- package/dist/source/loader/load_nodeset2.d.ts +13 -0
- package/dist/source/loader/load_nodeset2.js +1392 -0
- package/dist/source/loader/load_nodeset2.js.map +1 -0
- package/dist/source/loader/namespace_post_step.d.ts +6 -0
- package/dist/source/loader/namespace_post_step.js +48 -0
- package/dist/source/loader/namespace_post_step.js.map +1 -0
- package/dist/source/loader/register_node_promoter.d.ts +3 -0
- package/dist/source/loader/register_node_promoter.js +10 -0
- package/dist/source/loader/register_node_promoter.js.map +1 -0
- package/dist/source/namespace.d.ts +6 -0
- package/dist/source/namespace.js +3 -0
- package/dist/source/namespace.js.map +1 -0
- package/dist/source/namespace_alarm_and_condition.d.ts +24 -0
- package/dist/source/namespace_alarm_and_condition.js +3 -0
- package/dist/source/namespace_alarm_and_condition.js.map +1 -0
- package/dist/source/namespace_data_access.d.ts +42 -0
- package/dist/source/namespace_data_access.js +3 -0
- package/dist/source/namespace_data_access.js.map +1 -0
- package/dist/source/namespace_machine_state.d.ts +7 -0
- package/dist/source/namespace_machine_state.js +3 -0
- package/dist/source/namespace_machine_state.js.map +1 -0
- package/dist/source/pseudo_session.d.ts +55 -0
- package/dist/source/pseudo_session.js +205 -0
- package/dist/source/pseudo_session.js.map +1 -0
- package/dist/source/session_context.d.ts +111 -0
- package/dist/source/session_context.js +266 -0
- package/dist/source/session_context.js.map +1 -0
- package/dist/source/set_namespace_meta_data.d.ts +2 -0
- package/dist/source/set_namespace_meta_data.js +60 -0
- package/dist/source/set_namespace_meta_data.js.map +1 -0
- package/dist/source/ua_namespace_meta_data_type.d.ts +71 -0
- package/dist/source/ua_namespace_meta_data_type.js +3 -0
- package/dist/source/ua_namespace_meta_data_type.js.map +1 -0
- package/dist/source/ua_root_folder.d.ts +9 -0
- package/dist/source/ua_root_folder.js +3 -0
- package/dist/source/ua_root_folder.js.map +1 -0
- package/dist/source/ua_two_state_variable_ex.d.ts +23 -0
- package/dist/source/ua_two_state_variable_ex.js +3 -0
- package/dist/source/ua_two_state_variable_ex.js.map +1 -0
- package/dist/source/xml_writer.d.ts +9 -0
- package/dist/source/xml_writer.js +3 -0
- package/dist/source/xml_writer.js.map +1 -0
- package/dist/src/address_space.d.ts +393 -0
- package/dist/src/address_space.js +1375 -0
- package/dist/src/address_space.js.map +1 -0
- package/dist/src/address_space_change_event_tools.d.ts +6 -0
- package/dist/src/address_space_change_event_tools.js +150 -0
- package/dist/src/address_space_change_event_tools.js.map +1 -0
- package/dist/src/address_space_private.d.ts +44 -0
- package/dist/src/address_space_private.js +3 -0
- package/dist/src/address_space_private.js.map +1 -0
- package/dist/src/alarms_and_conditions/base_event_type.d.ts +26 -0
- package/dist/src/alarms_and_conditions/base_event_type.js +41 -0
- package/dist/src/alarms_and_conditions/base_event_type.js.map +1 -0
- package/dist/src/alarms_and_conditions/check_where_clause.d.ts +4 -0
- package/dist/src/alarms_and_conditions/check_where_clause.js +110 -0
- package/dist/src/alarms_and_conditions/check_where_clause.js.map +1 -0
- package/dist/src/alarms_and_conditions/condition.d.ts +5 -0
- package/dist/src/alarms_and_conditions/condition.js +81 -0
- package/dist/src/alarms_and_conditions/condition.js.map +1 -0
- package/dist/src/alarms_and_conditions/condition_info.d.ts +27 -0
- package/dist/src/alarms_and_conditions/condition_info.js +55 -0
- package/dist/src/alarms_and_conditions/condition_info.js.map +1 -0
- package/dist/src/alarms_and_conditions/condition_snapshot.d.ts +232 -0
- package/dist/src/alarms_and_conditions/condition_snapshot.js +667 -0
- package/dist/src/alarms_and_conditions/condition_snapshot.js.map +1 -0
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +21 -0
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +47 -0
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -0
- package/dist/src/alarms_and_conditions/extract_event_fields.d.ts +10 -0
- package/dist/src/alarms_and_conditions/extract_event_fields.js +90 -0
- package/dist/src/alarms_and_conditions/extract_event_fields.js.map +1 -0
- package/dist/src/alarms_and_conditions/index.d.ts +18 -0
- package/dist/src/alarms_and_conditions/index.js +31 -0
- package/dist/src/alarms_and_conditions/index.js.map +1 -0
- package/dist/src/alarms_and_conditions/shelving_state_machine.d.ts +22 -0
- package/dist/src/alarms_and_conditions/shelving_state_machine.js +241 -0
- package/dist/src/alarms_and_conditions/shelving_state_machine.js.map +1 -0
- package/dist/src/alarms_and_conditions/trip_alarm.d.ts +16 -0
- package/dist/src/alarms_and_conditions/trip_alarm.js +21 -0
- package/dist/src/alarms_and_conditions/trip_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.d.ts +54 -0
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js +255 -0
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +62 -0
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +244 -0
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.d.ts +138 -0
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js +460 -0
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +118 -0
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +417 -0
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +29 -0
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +39 -0
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.d.ts +35 -0
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js +32 -0
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +21 -0
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +26 -0
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_condition_base.d.ts +191 -0
- package/dist/src/alarms_and_conditions/ua_condition_base.js +1029 -0
- package/dist/src/alarms_and_conditions/ua_condition_base.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +182 -0
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +1021 -0
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.d.ts +11 -0
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.js +58 -0
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +17 -0
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +58 -0
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.d.ts +24 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js +59 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +27 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +57 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.d.ts +14 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js +17 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +9 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +12 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.d.ts +22 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js +87 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +38 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +87 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.d.ts +6 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js +11 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +10 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +8 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_limit_alarm.d.ts +76 -0
- package/dist/src/alarms_and_conditions/ua_limit_alarm.js +237 -0
- package/dist/src/alarms_and_conditions/ua_limit_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +98 -0
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +233 -0
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.d.ts +27 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js +62 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +28 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +51 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.d.ts +49 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js +176 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +25 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +163 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.d.ts +47 -0
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js +151 -0
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +39 -0
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +136 -0
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.d.ts +16 -0
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js +18 -0
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +16 -0
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +18 -0
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -0
- package/dist/src/apply_condition_refresh.d.ts +6 -0
- package/dist/src/apply_condition_refresh.js +28 -0
- package/dist/src/apply_condition_refresh.js.map +1 -0
- package/dist/src/base_node.d.ts +279 -0
- package/dist/src/base_node.js +1364 -0
- package/dist/src/base_node.js.map +1 -0
- package/dist/src/base_node_impl.d.ts +281 -0
- package/dist/src/base_node_impl.js +1394 -0
- package/dist/src/base_node_impl.js.map +1 -0
- package/dist/src/base_node_private.d.ts +61 -0
- package/dist/src/base_node_private.js +521 -0
- package/dist/src/base_node_private.js.map +1 -0
- package/dist/src/data_access/add_dataItem_stuff.d.ts +11 -0
- package/dist/src/data_access/add_dataItem_stuff.js +62 -0
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -0
- package/dist/src/data_access/check_variant_compatibility_ua_analog_item.d.ts +1 -0
- package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js +35 -0
- package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js.map +1 -0
- package/dist/src/data_access/ua_analog_item.d.ts +13 -0
- package/dist/src/data_access/ua_analog_item.js +37 -0
- package/dist/src/data_access/ua_analog_item.js.map +1 -0
- package/dist/src/data_access/ua_data_item.d.ts +16 -0
- package/dist/src/data_access/ua_data_item.js +66 -0
- package/dist/src/data_access/ua_data_item.js.map +1 -0
- package/dist/src/data_access/ua_multistate_discrete.d.ts +23 -0
- package/dist/src/data_access/ua_multistate_discrete.js +131 -0
- package/dist/src/data_access/ua_multistate_discrete.js.map +1 -0
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +32 -0
- package/dist/src/data_access/ua_multistate_discrete_impl.js +131 -0
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -0
- package/dist/src/data_access/ua_multistate_value_discrete.d.ts +51 -0
- package/dist/src/data_access/ua_multistate_value_discrete.js +249 -0
- package/dist/src/data_access/ua_multistate_value_discrete.js.map +1 -0
- package/dist/src/data_access/ua_two_state_discrete.d.ts +25 -0
- package/dist/src/data_access/ua_two_state_discrete.js +154 -0
- package/dist/src/data_access/ua_two_state_discrete.js.map +1 -0
- package/dist/src/event_data.d.ts +29 -0
- package/dist/src/event_data.js +96 -0
- package/dist/src/event_data.js.map +1 -0
- package/dist/src/extension_object_array_node.d.ts +61 -0
- package/dist/src/extension_object_array_node.js +266 -0
- package/dist/src/extension_object_array_node.js.map +1 -0
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +26 -0
- package/dist/src/historical_access/address_space_historical_data_node.js +662 -0
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -0
- package/dist/src/index_current.d.ts +42 -0
- package/dist/src/index_current.js +71 -0
- package/dist/src/index_current.js.map +1 -0
- package/dist/src/namespace.d.ts +475 -0
- package/dist/src/namespace.js +1775 -0
- package/dist/src/namespace.js.map +1 -0
- package/dist/src/namespace_impl.d.ts +463 -0
- package/dist/src/namespace_impl.js +1763 -0
- package/dist/src/namespace_impl.js.map +1 -0
- package/dist/src/namespace_private.d.ts +21 -0
- package/dist/src/namespace_private.js +29 -0
- package/dist/src/namespace_private.js.map +1 -0
- package/dist/src/nodeid_manager.d.ts +36 -0
- package/dist/src/nodeid_manager.js +196 -0
- package/dist/src/nodeid_manager.js.map +1 -0
- package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +2 -0
- package/dist/src/nodeset_tools/adjust_namespace_array.js +14 -0
- package/dist/src/nodeset_tools/adjust_namespace_array.js.map +1 -0
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -0
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +39 -0
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -0
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +2 -0
- package/dist/src/nodeset_tools/nodeset_to_xml.js +1155 -0
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -0
- package/dist/src/nodeset_tools/typedictionary_to_xml.d.ts +2 -0
- package/dist/src/nodeset_tools/typedictionary_to_xml.js +147 -0
- package/dist/src/nodeset_tools/typedictionary_to_xml.js.map +1 -0
- package/dist/src/reference.d.ts +43 -0
- package/dist/src/reference.js +138 -0
- package/dist/src/reference.js.map +1 -0
- package/dist/src/reference_impl.d.ts +43 -0
- package/dist/src/reference_impl.js +138 -0
- package/dist/src/reference_impl.js.map +1 -0
- package/dist/src/role_permissions.d.ts +2 -0
- package/dist/src/role_permissions.js +11 -0
- package/dist/src/role_permissions.js.map +1 -0
- package/dist/src/session_context.d.ts +4 -0
- package/dist/src/session_context.js +9 -0
- package/dist/src/session_context.js.map +1 -0
- package/dist/src/state_machine/finite_state_machine.d.ts +67 -0
- package/dist/src/state_machine/finite_state_machine.js +354 -0
- package/dist/src/state_machine/finite_state_machine.js.map +1 -0
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +34 -0
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +244 -0
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -0
- package/dist/src/state_machine/ua_two_state_variable.d.ts +61 -0
- package/dist/src/state_machine/ua_two_state_variable.js +332 -0
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -0
- package/dist/src/tool_isSupertypeOf.d.ts +17 -0
- package/dist/src/tool_isSupertypeOf.js +103 -0
- package/dist/src/tool_isSupertypeOf.js.map +1 -0
- package/dist/src/ua_condition_type.d.ts +8 -0
- package/dist/src/ua_condition_type.js +3 -0
- package/dist/src/ua_condition_type.js.map +1 -0
- package/dist/src/ua_data_type.d.ts +83 -0
- package/dist/src/ua_data_type.js +289 -0
- package/dist/src/ua_data_type.js.map +1 -0
- package/dist/src/ua_data_type_impl.d.ts +83 -0
- package/dist/src/ua_data_type_impl.js +291 -0
- package/dist/src/ua_data_type_impl.js.map +1 -0
- package/dist/src/ua_method.d.ts +42 -0
- package/dist/src/ua_method.js +204 -0
- package/dist/src/ua_method.js.map +1 -0
- package/dist/src/ua_method_impl.d.ts +40 -0
- package/dist/src/ua_method_impl.js +203 -0
- package/dist/src/ua_method_impl.js.map +1 -0
- package/dist/src/ua_object.d.ts +29 -0
- package/dist/src/ua_object.js +153 -0
- package/dist/src/ua_object.js.map +1 -0
- package/dist/src/ua_object_impl.d.ts +29 -0
- package/dist/src/ua_object_impl.js +156 -0
- package/dist/src/ua_object_impl.js.map +1 -0
- package/dist/src/ua_object_type.d.ts +49 -0
- package/dist/src/ua_object_type.js +124 -0
- package/dist/src/ua_object_type.js.map +1 -0
- package/dist/src/ua_object_type_impl.d.ts +48 -0
- package/dist/src/ua_object_type_impl.js +124 -0
- package/dist/src/ua_object_type_impl.js.map +1 -0
- package/dist/src/ua_reference_type.d.ts +42 -0
- package/dist/src/ua_reference_type.js +138 -0
- package/dist/src/ua_reference_type.js.map +1 -0
- package/dist/src/ua_reference_type_impl.d.ts +43 -0
- package/dist/src/ua_reference_type_impl.js +138 -0
- package/dist/src/ua_reference_type_impl.js.map +1 -0
- package/dist/src/ua_variable.d.ts +346 -0
- package/dist/src/ua_variable.js +1721 -0
- package/dist/src/ua_variable.js.map +1 -0
- package/dist/src/ua_variable_impl.d.ts +353 -0
- package/dist/src/ua_variable_impl.js +1719 -0
- package/dist/src/ua_variable_impl.js.map +1 -0
- package/dist/src/ua_variable_type.d.ts +54 -0
- package/dist/src/ua_variable_type.js +555 -0
- package/dist/src/ua_variable_type.js.map +1 -0
- package/dist/src/ua_variable_type_impl.d.ts +63 -0
- package/dist/src/ua_variable_type_impl.js +556 -0
- package/dist/src/ua_variable_type_impl.js.map +1 -0
- package/dist/src/ua_view.d.ts +16 -0
- package/dist/src/ua_view.js +42 -0
- package/dist/src/ua_view.js.map +1 -0
- package/dist/src/ua_view_impl.d.ts +15 -0
- package/dist/src/ua_view_impl.js +37 -0
- package/dist/src/ua_view_impl.js.map +1 -0
- package/distHelpers/add_event_generator_object.d.ts +3 -0
- package/distHelpers/add_event_generator_object.js +66 -0
- package/distHelpers/add_event_generator_object.js.map +1 -0
- package/distHelpers/alarms_and_conditions_demo.d.ts +10 -0
- package/distHelpers/alarms_and_conditions_demo.js +115 -0
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -0
- package/distHelpers/assertHasMatchingReference.d.ts +19 -0
- package/distHelpers/assertHasMatchingReference.js +41 -0
- package/distHelpers/assertHasMatchingReference.js.map +1 -0
- package/distHelpers/boiler_system.d.ts +113 -0
- package/distHelpers/boiler_system.js +397 -0
- package/distHelpers/boiler_system.js.map +1 -0
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +5 -0
- package/distHelpers/create_minimalist_address_space_nodeset.js +171 -0
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -0
- package/distHelpers/dump_statemachine.d.ts +6 -0
- package/distHelpers/dump_statemachine.js +116 -0
- package/distHelpers/dump_statemachine.js.map +1 -0
- package/distHelpers/get_address_space_fixture.d.ts +1 -0
- package/distHelpers/get_address_space_fixture.js +31 -0
- package/distHelpers/get_address_space_fixture.js.map +1 -0
- package/distHelpers/get_mini_address_space.d.ts +7 -0
- package/distHelpers/get_mini_address_space.js +37 -0
- package/distHelpers/get_mini_address_space.js.map +1 -0
- package/distHelpers/index.d.ts +11 -0
- package/distHelpers/index.js +24 -0
- package/distHelpers/index.js.map +1 -0
- package/distNodeJS/generate_address_space.d.ts +4 -0
- package/distNodeJS/generate_address_space.js +31 -0
- package/distNodeJS/generate_address_space.js.map +1 -0
- package/distNodeJS/index.d.ts +1 -0
- package/distNodeJS/index.js +14 -0
- package/distNodeJS/index.js.map +1 -0
- package/generate.js +1 -0
- package/nodeJS.d.ts +1 -0
- package/nodeJS.js +1 -0
- package/package.json +87 -0
- package/source/address_space_ts.ts +217 -0
- package/source/continuation_points/continuation_point_manager.ts +121 -0
- package/source/helpers/adjust_browse_direction.ts +15 -0
- package/source/helpers/argument_list.ts +286 -0
- package/source/helpers/call_helpers.ts +112 -0
- package/source/helpers/check_event_clause.ts +62 -0
- package/source/helpers/coerce_enum_value.ts +33 -0
- package/source/helpers/dump_tools.ts +92 -0
- package/source/helpers/ensure_secure_access.ts +88 -0
- package/source/helpers/make_optionals_map.ts +49 -0
- package/source/helpers/resolve_opaque_on_address_space.ts +23 -0
- package/source/index.ts +49 -0
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +13 -0
- package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +26 -0
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +34 -0
- package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +14 -0
- package/source/interfaces/data_access/ua_y_array_item_ex.ts +10 -0
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +14 -0
- package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +50 -0
- package/source/interfaces/state_machine/ua_program_state_machine_type.ts +13 -0
- package/source/interfaces/state_machine/ua_state_machine_type.ts +261 -0
- package/source/interfaces/state_machine/ua_transition_ex.ts +7 -0
- package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +8 -0
- package/source/loader/generateAddressSpaceRaw.ts +79 -0
- package/source/loader/load_nodeset2.ts +1600 -0
- package/source/loader/namespace_post_step.ts +36 -0
- package/source/loader/register_node_promoter.ts +8 -0
- package/source/namespace.ts +9 -0
- package/source/namespace_alarm_and_condition.ts +47 -0
- package/source/namespace_data_access.ts +60 -0
- package/source/namespace_machine_state.ts +13 -0
- package/source/pseudo_session.ts +288 -0
- package/source/session_context.ts +345 -0
- package/source/set_namespace_meta_data.ts +68 -0
- package/source/ua_root_folder.ts +10 -0
- package/source/ua_two_state_variable_ex.ts +35 -0
- package/source/xml_writer.ts +15 -0
- package/source_nodejs/generate_address_space.ts +36 -0
- package/source_nodejs/index.ts +1 -0
- package/src/address_space.ts +1575 -0
- package/src/address_space_change_event_tools.ts +177 -0
- package/src/address_space_private.ts +98 -0
- package/src/alarms_and_conditions/check_where_clause.ts +148 -0
- package/src/alarms_and_conditions/condition.ts +89 -0
- package/src/alarms_and_conditions/condition_info.ts +66 -0
- package/src/alarms_and_conditions/condition_snapshot.ts +766 -0
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +66 -0
- package/src/alarms_and_conditions/extract_event_fields.ts +104 -0
- package/src/alarms_and_conditions/index.ts +18 -0
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +339 -0
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +513 -0
- package/src/alarms_and_conditions/ua_base_event_impl.ts +55 -0
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +50 -0
- package/src/alarms_and_conditions/ua_condition_impl.ts +1298 -0
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +81 -0
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +110 -0
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +19 -0
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +130 -0
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +24 -0
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +305 -0
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +108 -0
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +224 -0
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +186 -0
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +27 -0
- package/src/apply_condition_refresh.ts +30 -0
- package/src/base_node_impl.ts +1749 -0
- package/src/base_node_private.ts +690 -0
- package/src/data_access/add_dataItem_stuff.ts +75 -0
- package/src/data_access/check_variant_compatibility_ua_analog_item.ts +41 -0
- package/src/data_access/ua_multistate_discrete_impl.ts +168 -0
- package/src/data_access/ua_multistate_value_discrete.ts +299 -0
- package/src/data_access/ua_two_state_discrete.ts +185 -0
- package/src/event_data.ts +117 -0
- package/src/extension_object_array_node.ts +325 -0
- package/src/historical_access/address_space_historical_data_node.ts +828 -0
- package/src/index_current.ts +52 -0
- package/src/namespace_impl.ts +2181 -0
- package/src/namespace_private.ts +60 -0
- package/src/nodeid_manager.ts +228 -0
- package/src/nodeset_tools/adjust_namespace_array.ts +11 -0
- package/src/nodeset_tools/construct_namespace_dependency.ts +40 -0
- package/src/nodeset_tools/nodeset_to_xml.ts +1317 -0
- package/src/nodeset_tools/typedictionary_to_xml.ts +175 -0
- package/src/reference_impl.ts +169 -0
- package/src/role_permissions.ts +6 -0
- package/src/state_machine/finite_state_machine.ts +428 -0
- package/src/state_machine/ua_shelving_state_machine_ex.ts +314 -0
- package/src/state_machine/ua_two_state_variable.ts +421 -0
- package/src/tool_isSupertypeOf.ts +129 -0
- package/src/ua_condition_type.ts +10 -0
- package/src/ua_data_type_impl.ts +356 -0
- package/src/ua_method_impl.ts +278 -0
- package/src/ua_object_impl.ts +203 -0
- package/src/ua_object_type_impl.ts +158 -0
- package/src/ua_reference_type_impl.ts +174 -0
- package/src/ua_variable_impl.ts +2277 -0
- package/src/ua_variable_type_impl.ts +741 -0
- package/src/ua_view_impl.ts +54 -0
- package/testHelpers.d.ts +1 -0
- package/testHelpers.js +1 -0
- package/test_helpers/add_event_generator_object.ts +71 -0
- package/test_helpers/alarms_and_conditions_demo.ts +147 -0
- package/test_helpers/assertHasMatchingReference.ts +43 -0
- package/test_helpers/boiler_system.ts +618 -0
- package/test_helpers/create_minimalist_address_space_nodeset.ts +208 -0
- package/test_helpers/dump_statemachine.ts +155 -0
- package/test_helpers/get_address_space_fixture.ts +30 -0
- package/test_helpers/get_mini_address_space.ts +42 -0
- package/test_helpers/index.ts +11 -0
- package/test_helpers/test_fixtures/dataType_in_separateNamespace.xml +150 -0
- package/test_helpers/test_fixtures/dataType_in_separateNamespace_basic.xml +57 -0
- package/test_helpers/test_fixtures/dataType_in_separateNamespace_mix.xml +136 -0
- package/test_helpers/test_fixtures/dataType_withEnumeration.xml +82 -0
- package/test_helpers/test_fixtures/dataType_with_isOptionSet.xml +194 -0
- package/test_helpers/test_fixtures/dataType_with_structures.xml +605 -0
- package/test_helpers/test_fixtures/dataType_with_union.xml +1 -0
- package/test_helpers/test_fixtures/datatype_as_per_1.04.xml +91 -0
- package/test_helpers/test_fixtures/fixture_empty_nodeset2.xml +106 -0
- package/test_helpers/test_fixtures/fixture_simple_statemachine_nodeset2.xml +1303 -0
- package/test_helpers/test_fixtures/fixuture_nodeset_objects_with_some_methods.xml +362 -0
- package/test_helpers/test_fixtures/issue_846.xml +3172 -0
- package/test_helpers/test_fixtures/issue_899_variable_with_nodeid_value.xml +33 -0
- package/test_helpers/test_fixtures/mini.Node.Set2.xml +4508 -0
- package/test_helpers/test_fixtures/mini.nodeset.withVariousVariables.xml +194 -0
- package/test_helpers/test_fixtures/minimalist_nodeset_with_models.xml +8 -0
- package/test_helpers/test_fixtures/minimalist_nodeset_with_models_more_complex.xml +16 -0
- package/test_helpers/test_fixtures/nodeset_with_analog_items.xml +45 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
|
+
*/
|
|
4
|
+
import { assert } from "node-opcua-assert";
|
|
5
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
6
|
+
import { UADiscreteAlarm, UADiscreteAlarm_Base } from "node-opcua-nodeset-ua";
|
|
7
|
+
import { INamespace, UAEventType } from "../../source";
|
|
8
|
+
import { UAAlarmConditionEx, UAAlarmConditionHelper, UAAlarmConditionImpl } from "./ua_alarm_condition_impl";
|
|
9
|
+
|
|
10
|
+
export interface UADiscreteAlarmHelper extends UAAlarmConditionHelper {
|
|
11
|
+
on(eventName:string, eventHandle: any): this;
|
|
12
|
+
}
|
|
13
|
+
export interface UADiscreteAlarmEx extends
|
|
14
|
+
UAAlarmConditionEx,
|
|
15
|
+
Omit<UADiscreteAlarm_Base, "suppressedState"| "silenceState" | "shelvingState" | "outOfServiceState" | "latchedState" | "confirmedState" | "ackedState" | "comfirmedState" | "activeState" | "enabledState" >,
|
|
16
|
+
UADiscreteAlarmHelper {
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
/*=
|
|
20
|
+
* +----------------------+
|
|
21
|
+
* | UAAlarmCondition |
|
|
22
|
+
* +----------------------+
|
|
23
|
+
* ^
|
|
24
|
+
* |
|
|
25
|
+
* +--------+---------+
|
|
26
|
+
* | UADiscreteAlarm |
|
|
27
|
+
* +------------------+
|
|
28
|
+
* ^
|
|
29
|
+
* |
|
|
30
|
+
* +--------+---------+
|
|
31
|
+
* | UAOffNormalAlarm |
|
|
32
|
+
* +------------------+
|
|
33
|
+
* ^
|
|
34
|
+
* |
|
|
35
|
+
* +--------+---------+
|
|
36
|
+
* | UATripAlarm |
|
|
37
|
+
* +------------------+
|
|
38
|
+
*
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The DiscreteAlarmType is used to classify Types into Alarm Conditions where the input for the
|
|
45
|
+
* Alarm may take on only a certain number of possible values (e.g. true/false,
|
|
46
|
+
* running/stopped/terminating).
|
|
47
|
+
*/
|
|
48
|
+
export class UADiscreteAlarmImpl extends UAAlarmConditionImpl implements UADiscreteAlarmEx {
|
|
49
|
+
|
|
50
|
+
public static instantiate(
|
|
51
|
+
namespace: INamespace,
|
|
52
|
+
discreteAlarmTypeId: UAEventType | NodeId | string,
|
|
53
|
+
options: any,
|
|
54
|
+
data: any
|
|
55
|
+
): UADiscreteAlarmImpl {
|
|
56
|
+
|
|
57
|
+
const addressSpace = namespace.addressSpace;
|
|
58
|
+
|
|
59
|
+
const discreteAlarmType = addressSpace.findEventType(discreteAlarmTypeId);
|
|
60
|
+
/* istanbul ignore next */
|
|
61
|
+
if (!discreteAlarmType) {
|
|
62
|
+
throw new Error(" cannot find Condition Type for " + discreteAlarmType);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const discreteAlarmTypeBase = addressSpace.findObjectType("DiscreteAlarmType");
|
|
66
|
+
assert(discreteAlarmTypeBase, "expecting DiscreteAlarmType - please check you nodeset xml file!");
|
|
67
|
+
|
|
68
|
+
/* eventTypeNode should be subtypeOf("DiscreteAlarmType"); */
|
|
69
|
+
/* istanbul ignore next */
|
|
70
|
+
if (!discreteAlarmType.isSupertypeOf(discreteAlarmTypeBase as any)) {
|
|
71
|
+
throw new Error("UADiscreteAlarm.instantiate : event found is not subType of DiscreteAlarmType");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const alarmNode = UAAlarmConditionImpl.instantiate(
|
|
75
|
+
namespace,
|
|
76
|
+
discreteAlarmType.nodeId, options, data) as UADiscreteAlarm;
|
|
77
|
+
Object.setPrototypeOf(alarmNode, UADiscreteAlarmImpl.prototype);
|
|
78
|
+
|
|
79
|
+
return alarmNode as UADiscreteAlarmImpl;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
|
+
*/
|
|
4
|
+
import { assert } from "node-opcua-assert";
|
|
5
|
+
import { DataValue } from "node-opcua-data-value";
|
|
6
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
7
|
+
import { DataType } from "node-opcua-variant";
|
|
8
|
+
import { UAExclusiveDeviationAlarm_Base } from "node-opcua-nodeset-ua";
|
|
9
|
+
|
|
10
|
+
import { UAVariable, UAVariableT } from "../../source";
|
|
11
|
+
import { AddressSpace } from "../address_space";
|
|
12
|
+
import { NamespacePrivate } from "../namespace_private";
|
|
13
|
+
import {
|
|
14
|
+
DeviationAlarmHelper_getSetpointNodeNode,
|
|
15
|
+
DeviationAlarmHelper_getSetpointValue,
|
|
16
|
+
DeviationAlarmHelper_install_setpoint,
|
|
17
|
+
DeviationAlarmHelper_onSetpointDataValueChange,
|
|
18
|
+
DeviationStuff,
|
|
19
|
+
InstallSetPointOptions
|
|
20
|
+
} from "./deviation_alarm_helper";
|
|
21
|
+
|
|
22
|
+
import { UAExclusiveLimitAlarmEx, UAExclusiveLimitAlarmImpl } from "./ua_exclusive_limit_alarm_impl";
|
|
23
|
+
import { UALimitAlarmImpl } from "./ua_limit_alarm_impl";
|
|
24
|
+
|
|
25
|
+
export interface UAExclusiveDeviationAlarmEx
|
|
26
|
+
extends Omit<
|
|
27
|
+
UAExclusiveDeviationAlarm_Base,
|
|
28
|
+
| "ackedState"
|
|
29
|
+
| "activeState"
|
|
30
|
+
| "confirmedState"
|
|
31
|
+
| "enabledState"
|
|
32
|
+
| "latchedState"
|
|
33
|
+
| "limitState"
|
|
34
|
+
| "outOfServiceState"
|
|
35
|
+
| "shelvingState"
|
|
36
|
+
| "silenceState"
|
|
37
|
+
| "suppressedState"
|
|
38
|
+
>,
|
|
39
|
+
UAExclusiveLimitAlarmEx,
|
|
40
|
+
DeviationStuff {}
|
|
41
|
+
|
|
42
|
+
export declare interface UAExclusiveDeviationAlarmImpl extends UAExclusiveDeviationAlarmEx, UAExclusiveLimitAlarmImpl {
|
|
43
|
+
on(eventName: string, eventHandler: any): this;
|
|
44
|
+
get addressSpace(): AddressSpace;
|
|
45
|
+
}
|
|
46
|
+
export class UAExclusiveDeviationAlarmImpl extends UAExclusiveLimitAlarmImpl implements UAExclusiveDeviationAlarmEx {
|
|
47
|
+
public static instantiate(
|
|
48
|
+
namespace: NamespacePrivate,
|
|
49
|
+
type: string | NodeId,
|
|
50
|
+
options: any,
|
|
51
|
+
data: any
|
|
52
|
+
): UAExclusiveDeviationAlarmImpl {
|
|
53
|
+
const addressSpace = namespace.addressSpace;
|
|
54
|
+
|
|
55
|
+
const exclusiveDeviationAlarmType = addressSpace.findEventType("ExclusiveDeviationAlarmType");
|
|
56
|
+
/* istanbul ignore next */
|
|
57
|
+
if (!exclusiveDeviationAlarmType) {
|
|
58
|
+
throw new Error("cannot find ExclusiveDeviationAlarmType");
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
assert(type === exclusiveDeviationAlarmType.browseName.toString());
|
|
62
|
+
|
|
63
|
+
const alarm = UAExclusiveLimitAlarmImpl.instantiate(namespace, type, options, data) as UAExclusiveDeviationAlarmImpl;
|
|
64
|
+
Object.setPrototypeOf(alarm, UAExclusiveDeviationAlarmImpl.prototype);
|
|
65
|
+
assert(alarm instanceof UAExclusiveDeviationAlarmImpl);
|
|
66
|
+
assert(alarm instanceof UAExclusiveLimitAlarmImpl);
|
|
67
|
+
assert(alarm instanceof UALimitAlarmImpl);
|
|
68
|
+
|
|
69
|
+
alarm._install_setpoint(options);
|
|
70
|
+
|
|
71
|
+
return alarm;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public getSetpointNodeNode(): UAVariable {
|
|
75
|
+
return DeviationAlarmHelper_getSetpointNodeNode.call(this);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
public getSetpointValue(): number | null {
|
|
79
|
+
return DeviationAlarmHelper_getSetpointValue.call(this);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
public _onSetpointDataValueChange(dataValue: DataValue): void {
|
|
83
|
+
DeviationAlarmHelper_onSetpointDataValueChange.call(this, dataValue);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
public _install_setpoint(options: InstallSetPointOptions): any {
|
|
87
|
+
return DeviationAlarmHelper_install_setpoint.call(this, options);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public _setStateBasedOnInputValue(value: number):void {
|
|
91
|
+
const setpointValue = this.getSetpointValue();
|
|
92
|
+
if (setpointValue === null) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
assert(isFinite(setpointValue));
|
|
96
|
+
// call base class implementation
|
|
97
|
+
UAExclusiveLimitAlarmImpl.prototype._setStateBasedOnInputValue.call(this, value - setpointValue);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
export interface UAExclusiveDeviationAlarmHelper {
|
|
101
|
+
setpointNode: UAVariableT<NodeId, DataType.NodeId>;
|
|
102
|
+
setpointNodeNode: UAVariable;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/*
|
|
106
|
+
UAExclusiveDeviationAlarm.prototype.getSetpointNodeNode = DeviationAlarmHelper.getSetpointNodeNode;
|
|
107
|
+
UAExclusiveDeviationAlarm.prototype.getSetpointValue = DeviationAlarmHelper.getSetpointValue;
|
|
108
|
+
UAExclusiveDeviationAlarm.prototype._onSetpointDataValueChange = DeviationAlarmHelper._onSetpointDataValueChange;
|
|
109
|
+
UAExclusiveDeviationAlarm.prototype._install_setpoint = DeviationAlarmHelper._install_setpoint;
|
|
110
|
+
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
|
+
*/
|
|
4
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
5
|
+
import { NamespacePrivate } from "../namespace_private";
|
|
6
|
+
import { UAExclusiveLimitAlarmImpl } from "./ua_exclusive_limit_alarm_impl";
|
|
7
|
+
|
|
8
|
+
export class UAExclusiveLevelAlarmImpl extends UAExclusiveLimitAlarmImpl {
|
|
9
|
+
|
|
10
|
+
public static instantiate(
|
|
11
|
+
namespace: NamespacePrivate,
|
|
12
|
+
type: NodeId | string,
|
|
13
|
+
option: any,
|
|
14
|
+
data: any
|
|
15
|
+
): UAExclusiveLevelAlarmImpl {
|
|
16
|
+
const addressSpace = namespace.addressSpace;
|
|
17
|
+
return UAExclusiveLimitAlarmImpl.instantiate(namespace, type, option, data) as UAExclusiveLevelAlarmImpl;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
|
+
*/
|
|
4
|
+
import { assert } from "node-opcua-assert";
|
|
5
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
6
|
+
import { UAObject } from "node-opcua-address-space-base";
|
|
7
|
+
import { UAExclusiveLimitAlarm, UAExclusiveLimitAlarm_Base } from "node-opcua-nodeset-ua";
|
|
8
|
+
|
|
9
|
+
import { UAEventType, UAExclusiveLimitStateMachineEx } from "../../source";
|
|
10
|
+
import { UATwoStateVariableEx } from "../../source/ua_two_state_variable_ex";
|
|
11
|
+
import { NamespacePrivate } from "../namespace_private";
|
|
12
|
+
import { promoteToStateMachine } from "../state_machine/finite_state_machine";
|
|
13
|
+
import { UAShelvedStateMachineEx } from "../state_machine/ua_shelving_state_machine_ex";
|
|
14
|
+
import { UALimitAlarmEx, UALimitAlarmHelper, UALimitAlarmImpl } from "./ua_limit_alarm_impl";
|
|
15
|
+
|
|
16
|
+
const validState = ["HighHigh", "High", "Low", "LowLow", null];
|
|
17
|
+
|
|
18
|
+
export interface UAExclusiveLimitAlarmHelper extends UALimitAlarmHelper {}
|
|
19
|
+
export interface UAExclusiveLimitAlarmEx
|
|
20
|
+
extends Omit<UAExclusiveLimitAlarm_Base, "limitState">,
|
|
21
|
+
UALimitAlarmEx,
|
|
22
|
+
UAExclusiveLimitAlarmHelper {
|
|
23
|
+
on(eventName: string, eventHandler: any): this;
|
|
24
|
+
|
|
25
|
+
ackedState: UATwoStateVariableEx;
|
|
26
|
+
activeState: UATwoStateVariableEx;
|
|
27
|
+
confirmedState?: UATwoStateVariableEx;
|
|
28
|
+
enabledState: UATwoStateVariableEx;
|
|
29
|
+
latchedState?: UATwoStateVariableEx;
|
|
30
|
+
outOfServiceState?: UATwoStateVariableEx;
|
|
31
|
+
silenceState?: UATwoStateVariableEx;
|
|
32
|
+
suppressedState?: UATwoStateVariableEx;
|
|
33
|
+
//
|
|
34
|
+
limitState: UAExclusiveLimitStateMachineEx;
|
|
35
|
+
shelvingState?: UAShelvedStateMachineEx;
|
|
36
|
+
}
|
|
37
|
+
export declare interface UAExclusiveLimitAlarmImpl extends UAExclusiveLimitAlarmEx {}
|
|
38
|
+
|
|
39
|
+
export class UAExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UAExclusiveLimitAlarmEx {
|
|
40
|
+
/***
|
|
41
|
+
*
|
|
42
|
+
* @method (static)instantiate
|
|
43
|
+
* @param namespace {INamespace}
|
|
44
|
+
* @param type
|
|
45
|
+
* @param options
|
|
46
|
+
* @param data
|
|
47
|
+
* @return {UAExclusiveLimitAlarm}
|
|
48
|
+
*/
|
|
49
|
+
public static instantiate(
|
|
50
|
+
namespace: NamespacePrivate,
|
|
51
|
+
type: UAEventType | string | NodeId,
|
|
52
|
+
options: any,
|
|
53
|
+
data: any
|
|
54
|
+
): UAExclusiveLimitAlarmImpl {
|
|
55
|
+
const addressSpace = namespace.addressSpace;
|
|
56
|
+
|
|
57
|
+
const exclusiveAlarmType = addressSpace.findEventType(type);
|
|
58
|
+
|
|
59
|
+
/* istanbul ignore next */
|
|
60
|
+
if (!exclusiveAlarmType) {
|
|
61
|
+
throw new Error(" cannot find Alarm Condition Type for " + type);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const exclusiveLimitAlarmType = addressSpace.findEventType("ExclusiveLimitAlarmType");
|
|
65
|
+
/* istanbul ignore next */
|
|
66
|
+
if (!exclusiveLimitAlarmType) {
|
|
67
|
+
throw new Error("cannot find ExclusiveLimitAlarmType");
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const node = UALimitAlarmImpl.instantiate(namespace, type, options, data);
|
|
71
|
+
Object.setPrototypeOf(node, UAExclusiveLimitAlarmImpl.prototype);
|
|
72
|
+
const alarm = node as any as UAExclusiveLimitAlarmImpl;
|
|
73
|
+
assert(alarm instanceof UAExclusiveLimitAlarmImpl);
|
|
74
|
+
assert(alarm instanceof UALimitAlarmImpl);
|
|
75
|
+
|
|
76
|
+
// ---------------- install LimitState StateMachine
|
|
77
|
+
assert(alarm.limitState, "limitState is mandatory");
|
|
78
|
+
promoteToStateMachine(alarm.limitState as unknown as UAObject);
|
|
79
|
+
|
|
80
|
+
// start with a inactive state
|
|
81
|
+
alarm.activeState.setValue(false);
|
|
82
|
+
|
|
83
|
+
alarm.updateState();
|
|
84
|
+
|
|
85
|
+
return alarm;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
public _signalNewCondition(stateName: string | null, isActive: boolean, value: string): void {
|
|
89
|
+
assert(stateName === null || typeof isActive === "boolean");
|
|
90
|
+
assert(validState.indexOf(stateName) >= 0, "must have a valid state : " + stateName);
|
|
91
|
+
|
|
92
|
+
const oldState = this.limitState.getCurrentState();
|
|
93
|
+
const oldActive = this.activeState.getValue();
|
|
94
|
+
|
|
95
|
+
if (stateName) {
|
|
96
|
+
this.limitState.setState(stateName);
|
|
97
|
+
} else {
|
|
98
|
+
assert(stateName === null);
|
|
99
|
+
this.limitState.setState(stateName);
|
|
100
|
+
}
|
|
101
|
+
super._signalNewCondition(stateName, isActive, value);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public _setStateBasedOnInputValue(value: number): void {
|
|
105
|
+
assert(isFinite(value));
|
|
106
|
+
let isActive = false;
|
|
107
|
+
|
|
108
|
+
let state = null;
|
|
109
|
+
|
|
110
|
+
const oldState = this.limitState.getCurrentState();
|
|
111
|
+
|
|
112
|
+
if (this.highHighLimit && this.getHighHighLimit() < value) {
|
|
113
|
+
state = "HighHigh";
|
|
114
|
+
isActive = true;
|
|
115
|
+
} else if (this.highLimit && this.getHighLimit() < value) {
|
|
116
|
+
state = "High";
|
|
117
|
+
isActive = true;
|
|
118
|
+
} else if (this.lowLowLimit && this.getLowLowLimit() > value) {
|
|
119
|
+
state = "LowLow";
|
|
120
|
+
isActive = true;
|
|
121
|
+
} else if (this.lowLimit && this.getLowLimit() > value) {
|
|
122
|
+
state = "Low";
|
|
123
|
+
isActive = true;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (state !== oldState) {
|
|
127
|
+
this._signalNewCondition(state, isActive, value.toString());
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
|
+
*/
|
|
4
|
+
import { UAExclusiveRateOfChangeAlarm, UAExclusiveRateOfChangeAlarm_Base } from "node-opcua-nodeset-ua";
|
|
5
|
+
import { UAExclusiveLimitAlarmEx, UAExclusiveLimitAlarmImpl } from "./ua_exclusive_limit_alarm_impl";
|
|
6
|
+
|
|
7
|
+
export interface UAExclusiveRateOfChangeAlarmEx
|
|
8
|
+
extends Omit<
|
|
9
|
+
UAExclusiveRateOfChangeAlarm_Base,
|
|
10
|
+
| "ackedState"
|
|
11
|
+
| "activeState"
|
|
12
|
+
| "confirmedState"
|
|
13
|
+
| "enabledState"
|
|
14
|
+
| "latchedState"
|
|
15
|
+
| "limitState"
|
|
16
|
+
| "outOfServiceState"
|
|
17
|
+
| "shelvingState"
|
|
18
|
+
| "silenceState"
|
|
19
|
+
| "suppressedState"
|
|
20
|
+
>,
|
|
21
|
+
UAExclusiveLimitAlarmEx {
|
|
22
|
+
on(eventName: string, eventHandler: any): this;
|
|
23
|
+
}
|
|
24
|
+
export class UAExclusiveRateOfChangeAlarmImpl extends UAExclusiveLimitAlarmImpl implements UAExclusiveRateOfChangeAlarmEx {}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/* eslint-disable max-statements */
|
|
2
|
+
/**
|
|
3
|
+
* @module node-opcua-address-space.AlarmsAndConditions
|
|
4
|
+
*/
|
|
5
|
+
import { UAEventType } from "node-opcua-address-space-base";
|
|
6
|
+
import { assert } from "node-opcua-assert";
|
|
7
|
+
import { NodeClass } from "node-opcua-data-model";
|
|
8
|
+
import { DataValue } from "node-opcua-data-value";
|
|
9
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
10
|
+
import { UALimitAlarm_Base , UALimitAlarm} from "node-opcua-nodeset-ua";
|
|
11
|
+
import { StatusCodes } from "node-opcua-status-code";
|
|
12
|
+
import { DataType } from "node-opcua-variant";
|
|
13
|
+
import { UATwoStateVariableEx } from "../../source/ua_two_state_variable_ex";
|
|
14
|
+
|
|
15
|
+
import { NamespacePrivate } from "../namespace_private";
|
|
16
|
+
import { UAShelvedStateMachineEx } from "../state_machine/ua_shelving_state_machine_ex";
|
|
17
|
+
import { UAAlarmConditionEx, UAAlarmConditionHelper, UAAlarmConditionImpl } from "./ua_alarm_condition_impl";
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export interface UALimitAlarmHelper extends UAAlarmConditionHelper {
|
|
21
|
+
setLowLowLimit(value: number): void;
|
|
22
|
+
setLowLimit(value: number): void;
|
|
23
|
+
setHighLimit(value: number): void;
|
|
24
|
+
setHighHighLimit(value: number): void ;
|
|
25
|
+
getHighHighLimit(): number;
|
|
26
|
+
getHighLimit(): number;
|
|
27
|
+
getLowLimit(): number;
|
|
28
|
+
getLowLowLimit(): number;
|
|
29
|
+
}
|
|
30
|
+
export interface UALimitAlarmEx extends UALimitAlarm_Base, UAAlarmConditionEx, UALimitAlarmHelper {
|
|
31
|
+
|
|
32
|
+
on(eventName: string, eventHandler: any): this;
|
|
33
|
+
|
|
34
|
+
enabledState: UATwoStateVariableEx;
|
|
35
|
+
ackedState: UATwoStateVariableEx;
|
|
36
|
+
confirmedState?: UATwoStateVariableEx;
|
|
37
|
+
activeState: UATwoStateVariableEx;
|
|
38
|
+
latchedState?: UATwoStateVariableEx;
|
|
39
|
+
outOfServiceState?: UATwoStateVariableEx;
|
|
40
|
+
silenceState?: UATwoStateVariableEx;
|
|
41
|
+
shelvingState?: UAShelvedStateMachineEx;
|
|
42
|
+
suppressedState?: UATwoStateVariableEx;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export declare interface UALimitAlarmImpl extends UALimitAlarmEx, UAAlarmConditionImpl {
|
|
46
|
+
on(eventName: string, eventHandler: any): this;
|
|
47
|
+
}
|
|
48
|
+
export class UALimitAlarmImpl extends UAAlarmConditionImpl implements UALimitAlarmEx {
|
|
49
|
+
/**
|
|
50
|
+
* @method (static)UALimitAlarm.instantiate
|
|
51
|
+
* @param namespace {INamespace}
|
|
52
|
+
* @param limitAlarmTypeId
|
|
53
|
+
* @param options
|
|
54
|
+
* @param options.inputNode
|
|
55
|
+
* @param options.optionals
|
|
56
|
+
* @param options.highHighLimit {Double}
|
|
57
|
+
* @param options.highLimit {Double}
|
|
58
|
+
* @param options.lowLimit {Double}
|
|
59
|
+
* @param options.lowLowLimit {Double}
|
|
60
|
+
* @param data
|
|
61
|
+
* @return {UALimitAlarm}
|
|
62
|
+
*/
|
|
63
|
+
public static instantiate(
|
|
64
|
+
namespace: NamespacePrivate,
|
|
65
|
+
limitAlarmTypeId: UAEventType | NodeId | string,
|
|
66
|
+
options: any,
|
|
67
|
+
data: any
|
|
68
|
+
): UALimitAlarmImpl {
|
|
69
|
+
const addressSpace = namespace.addressSpace;
|
|
70
|
+
|
|
71
|
+
// must provide a inputNode
|
|
72
|
+
// xx assert(Object.prototype.hasOwnProperty.call(options,"conditionOf")); // must provide a conditionOf
|
|
73
|
+
assert(Object.prototype.hasOwnProperty.call(options,"inputNode"), "UALimitAlarm.instantiate: options must provide the inputNode");
|
|
74
|
+
|
|
75
|
+
options.optionals = options.optionals || [];
|
|
76
|
+
let count = 0;
|
|
77
|
+
if (Object.prototype.hasOwnProperty.call(options,"highHighLimit")) {
|
|
78
|
+
options.optionals.push("HighHighLimit");
|
|
79
|
+
options.optionals.push("HighHighState");
|
|
80
|
+
count++;
|
|
81
|
+
}
|
|
82
|
+
if (Object.prototype.hasOwnProperty.call(options,"highLimit")) {
|
|
83
|
+
options.optionals.push("HighLimit");
|
|
84
|
+
options.optionals.push("HighState");
|
|
85
|
+
count++;
|
|
86
|
+
}
|
|
87
|
+
if (Object.prototype.hasOwnProperty.call(options,"lowLimit")) {
|
|
88
|
+
options.optionals.push("LowLimit");
|
|
89
|
+
options.optionals.push("LowState");
|
|
90
|
+
count++;
|
|
91
|
+
}
|
|
92
|
+
if (Object.prototype.hasOwnProperty.call(options,"lowLowLimit")) {
|
|
93
|
+
options.optionals.push("LowLowLimit");
|
|
94
|
+
options.optionals.push("LowLowState");
|
|
95
|
+
count++;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// xx assert(options.optionals,"must provide an optionals");
|
|
99
|
+
const alarmNode = UAAlarmConditionImpl.instantiate(namespace, limitAlarmTypeId, options, data) as UALimitAlarmImpl;
|
|
100
|
+
Object.setPrototypeOf(alarmNode, UALimitAlarmImpl.prototype);
|
|
101
|
+
|
|
102
|
+
assert(alarmNode.conditionOfNode() !== null);
|
|
103
|
+
|
|
104
|
+
const inputNode = addressSpace._coerceNode(options.inputNode);
|
|
105
|
+
if (!inputNode) {
|
|
106
|
+
throw new Error("Expecting a valid input node");
|
|
107
|
+
}
|
|
108
|
+
assert(inputNode.nodeClass === NodeClass.Variable);
|
|
109
|
+
|
|
110
|
+
// ----------------------- Install Limit Alarm specifics
|
|
111
|
+
// from spec 1.03:
|
|
112
|
+
// Four optional limits are defined that configure the states of the derived limit Alarm Types.
|
|
113
|
+
// These Properties shall be set for any Alarm limits that are exposed by the derived limit Alarm
|
|
114
|
+
// Types. These Properties are listed as optional but at least one is required. For cases where
|
|
115
|
+
// an underlying system cannot provide the actual value of a limit, the limit Property shall still be
|
|
116
|
+
// provided, but will have its AccessLevel set to not readable. It is assumed that the limits are
|
|
117
|
+
// described using the same Engineering Unit that is assigned to the variable that is the source
|
|
118
|
+
// of the alarm. For Rate of change limit alarms, it is assumed this rate is units per second
|
|
119
|
+
// unless otherwise specified.
|
|
120
|
+
if (count === 0) {
|
|
121
|
+
throw new Error("at least one limit is required");
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const dataType = addressSpace.findCorrespondingBasicDataType(options.inputNode.dataType);
|
|
125
|
+
|
|
126
|
+
alarmNode._dataType = dataType;
|
|
127
|
+
|
|
128
|
+
if (Object.prototype.hasOwnProperty.call(options,"highHighLimit")) {
|
|
129
|
+
alarmNode.setHighHighLimit(options.highHighLimit);
|
|
130
|
+
}
|
|
131
|
+
if (Object.prototype.hasOwnProperty.call(options,"highLimit")) {
|
|
132
|
+
alarmNode.setHighLimit(options.highLimit);
|
|
133
|
+
}
|
|
134
|
+
if (Object.prototype.hasOwnProperty.call(options,"lowLimit")) {
|
|
135
|
+
alarmNode.setLowLimit(options.lowLimit);
|
|
136
|
+
}
|
|
137
|
+
if (Object.prototype.hasOwnProperty.call(options,"lowLowLimit")) {
|
|
138
|
+
alarmNode.setLowLowLimit(options.lowLowLimit);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/*
|
|
142
|
+
* The InputNode Property provides the NodeId of the Variable the Value of which is used as
|
|
143
|
+
* primary input in the calculation of the Alarm state. If this Variable is not in the AddressSpace,
|
|
144
|
+
* a Null NodeId shall be provided. In some systems, an Alarm may be calculated based on
|
|
145
|
+
* multiple Variables Values; it is up to the system to determine which Variable’s NodeId is used.
|
|
146
|
+
*/
|
|
147
|
+
assert(alarmNode.inputNode.nodeClass === NodeClass.Variable);
|
|
148
|
+
alarmNode.inputNode.setValueFromSource({ dataType: "NodeId", value: inputNode.nodeId });
|
|
149
|
+
|
|
150
|
+
// install inputNode monitoring for change
|
|
151
|
+
alarmNode.installInputNodeMonitoring(options.inputNode);
|
|
152
|
+
alarmNode._watchLimits();
|
|
153
|
+
|
|
154
|
+
return alarmNode;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
public _dataType: any;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @method getHighHighLimit
|
|
161
|
+
* @return {Number}
|
|
162
|
+
*/
|
|
163
|
+
public getHighHighLimit(): number {
|
|
164
|
+
if (!this.highHighLimit) {
|
|
165
|
+
throw new Error("Alarm do not expose highHighLimit");
|
|
166
|
+
}
|
|
167
|
+
return this.highHighLimit.readValue().value.value;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @method getHighLimit
|
|
172
|
+
* @return {Number}
|
|
173
|
+
*/
|
|
174
|
+
public getHighLimit(): number {
|
|
175
|
+
if (!this.highLimit) {
|
|
176
|
+
throw new Error("Alarm do not expose highLimit");
|
|
177
|
+
}
|
|
178
|
+
return this.highLimit.readValue().value.value;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @method getLowLimit
|
|
183
|
+
* @return {Float}
|
|
184
|
+
*/
|
|
185
|
+
public getLowLimit(): number {
|
|
186
|
+
if (!this.lowLimit) {
|
|
187
|
+
throw new Error("Alarm do not expose lowLimit");
|
|
188
|
+
}
|
|
189
|
+
return this.lowLimit.readValue().value.value;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @method getLowLowLimit
|
|
194
|
+
* @return {Float}
|
|
195
|
+
*/
|
|
196
|
+
public getLowLowLimit(): number {
|
|
197
|
+
if (!this.lowLowLimit) {
|
|
198
|
+
throw new Error("Alarm do not expose lowLowLimit");
|
|
199
|
+
}
|
|
200
|
+
return this.lowLowLimit.readValue().value.value;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* @method setHighHighLimit
|
|
205
|
+
* @param value {Float}
|
|
206
|
+
*/
|
|
207
|
+
public setHighHighLimit(value: number): void {
|
|
208
|
+
if (!this.highHighLimit) {
|
|
209
|
+
throw new Error("LimitAlarm instance must expose the optional HighHighLimit property");
|
|
210
|
+
}
|
|
211
|
+
this.highHighLimit.setValueFromSource({ dataType: this._dataType, value });
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @method setHighLimit
|
|
216
|
+
* @param value {Float}
|
|
217
|
+
*/
|
|
218
|
+
public setHighLimit(value: number): void {
|
|
219
|
+
if (!this.highLimit) {
|
|
220
|
+
throw new Error("LimitAlarm instance must expose the optional HighLimit property");
|
|
221
|
+
}
|
|
222
|
+
this.highLimit.setValueFromSource({ dataType: this._dataType, value });
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* @method setLowLimit
|
|
227
|
+
* @param value {Float}
|
|
228
|
+
*/
|
|
229
|
+
public setLowLimit(value: number): void {
|
|
230
|
+
if (!this.lowLimit) {
|
|
231
|
+
throw new Error("LimitAlarm instance must expose the optional LowLimit property");
|
|
232
|
+
}
|
|
233
|
+
this.lowLimit.setValueFromSource({ dataType: this._dataType, value });
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @method setLowLowLimit
|
|
239
|
+
* @param value {Float}
|
|
240
|
+
*/
|
|
241
|
+
public setLowLowLimit(value: number): void {
|
|
242
|
+
if (!this.lowLowLimit) {
|
|
243
|
+
throw new Error("LimitAlarm instance must expose the optional LowLowLimit property");
|
|
244
|
+
}
|
|
245
|
+
this.lowLowLimit.setValueFromSource({ dataType: this._dataType, value });
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
public _onInputDataValueChange(dataValue: DataValue): void {
|
|
249
|
+
assert(dataValue instanceof DataValue);
|
|
250
|
+
|
|
251
|
+
if (
|
|
252
|
+
dataValue.statusCode === StatusCodes.BadWaitingForInitialData &&
|
|
253
|
+
dataValue.statusCode === StatusCodes.UncertainInitialValue
|
|
254
|
+
) {
|
|
255
|
+
// we are not ready yet to use the input node value
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (dataValue.statusCode !== StatusCodes.Good) {
|
|
259
|
+
// what shall we do ?
|
|
260
|
+
this._signalNewCondition(null);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
if (dataValue.value.dataType === DataType.Null) {
|
|
264
|
+
// what shall we do ?
|
|
265
|
+
this._signalNewCondition(null);
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
const value = dataValue.value.value;
|
|
269
|
+
this._setStateBasedOnInputValue(value);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
protected _setStateBasedOnInputValue(value: number): void {
|
|
273
|
+
throw new Error("_setStateBasedOnInputValue must be overriden");
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
protected _watchLimits(): void {
|
|
277
|
+
/// ----------------------------------------------------------------------
|
|
278
|
+
/// Installing Limits monitored
|
|
279
|
+
const _updateState = () => this.updateState();
|
|
280
|
+
|
|
281
|
+
if (this.highHighLimit) {
|
|
282
|
+
this.highHighLimit.on("value_changed", _updateState);
|
|
283
|
+
}
|
|
284
|
+
if (this.highLimit) {
|
|
285
|
+
this.highLimit.on("value_changed", _updateState);
|
|
286
|
+
}
|
|
287
|
+
if (this.lowLimit) {
|
|
288
|
+
this.lowLimit.on("value_changed", _updateState);
|
|
289
|
+
}
|
|
290
|
+
if (this.lowLowLimit) {
|
|
291
|
+
this.lowLowLimit.on("value_changed", _updateState);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
protected evaluateConditionsAfterEnabled():void {
|
|
296
|
+
assert(this.getEnabledState() === true);
|
|
297
|
+
// simulate input value event
|
|
298
|
+
const input = this.getInputNodeNode();
|
|
299
|
+
if (!input) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
const dataValue = input.readValue();
|
|
303
|
+
this._onInputDataValueChange(dataValue);
|
|
304
|
+
}
|
|
305
|
+
}
|