node-opcua-address-space 2.170.1 → 2.172.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.
Files changed (458) hide show
  1. package/dist/source/address_space_ts.d.ts +13 -13
  2. package/dist/source/address_space_ts.js +4 -0
  3. package/dist/source/address_space_ts.js.map +1 -1
  4. package/dist/source/continuation_points/continuation_point_manager.d.ts +6 -3
  5. package/dist/source/continuation_points/continuation_point_manager.js +4 -4
  6. package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
  7. package/dist/source/helpers/adjust_browse_direction.d.ts +1 -1
  8. package/dist/source/helpers/argument_list.d.ts +13 -11
  9. package/dist/source/helpers/argument_list.js +24 -15
  10. package/dist/source/helpers/argument_list.js.map +1 -1
  11. package/dist/source/helpers/call_helpers.d.ts +6 -3
  12. package/dist/source/helpers/call_helpers.js +5 -6
  13. package/dist/source/helpers/call_helpers.js.map +1 -1
  14. package/dist/source/helpers/coerce_enum_value.d.ts +2 -2
  15. package/dist/source/helpers/coerce_enum_value.js +2 -2
  16. package/dist/source/helpers/coerce_enum_value.js.map +1 -1
  17. package/dist/source/helpers/dump_tools.d.ts +3 -3
  18. package/dist/source/helpers/dump_tools.js +2 -2
  19. package/dist/source/helpers/dump_tools.js.map +1 -1
  20. package/dist/source/helpers/ensure_secure_access.d.ts +1 -1
  21. package/dist/source/helpers/ensure_secure_access.js +1 -1
  22. package/dist/source/helpers/ensure_secure_access.js.map +1 -1
  23. package/dist/source/helpers/make_optionals_map.js +0 -5
  24. package/dist/source/helpers/make_optionals_map.js.map +1 -1
  25. package/dist/source/helpers/multiform_func.d.ts +1 -1
  26. package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +1 -1
  27. package/dist/source/helpers/resolve_opaque_on_address_space.js +1 -1
  28. package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -1
  29. package/dist/source/index.d.ts +38 -38
  30. package/dist/source/index.js +53 -54
  31. package/dist/source/index.js.map +1 -1
  32. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +3 -3
  33. package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +11 -11
  34. package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +6 -6
  35. package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +3 -3
  36. package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +4 -4
  37. package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +2 -2
  38. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +2 -2
  39. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +2 -2
  40. package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +4 -3
  41. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +2 -2
  42. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +2 -2
  43. package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +3 -3
  44. package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +10 -13
  45. package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +11 -11
  46. package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +11 -0
  47. package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js +3 -0
  48. package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +1 -0
  49. package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +5 -5
  50. package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +21 -29
  51. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +3 -7
  52. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -23
  53. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -1
  54. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +3 -3
  55. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +8 -10
  56. package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +4 -6
  57. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +5 -5
  58. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +3 -3
  59. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +7 -7
  60. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +5 -8
  61. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +5 -5
  62. package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +3 -3
  63. package/dist/source/interfaces/extension_object_constructor.d.ts +3 -3
  64. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +3 -3
  65. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +2 -2
  66. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +3 -3
  67. package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +6 -6
  68. package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +7 -6
  69. package/dist/source/interfaces/state_machine/ua_state_machine_type.js +4 -0
  70. package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -1
  71. package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +2 -2
  72. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +2 -2
  73. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
  74. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -1
  75. package/dist/source/loader/decode_xml_extension_object.d.ts +4 -4
  76. package/dist/source/loader/decode_xml_extension_object.js +3 -3
  77. package/dist/source/loader/decode_xml_extension_object.js.map +1 -1
  78. package/dist/source/loader/ensure_datatype_extracted.d.ts +2 -2
  79. package/dist/source/loader/ensure_datatype_extracted.js +5 -5
  80. package/dist/source/loader/ensure_datatype_extracted.js.map +1 -1
  81. package/dist/source/loader/generateAddressSpaceRaw.d.ts +3 -3
  82. package/dist/source/loader/generateAddressSpaceRaw.js +6 -6
  83. package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -1
  84. package/dist/source/loader/load_nodeset2.js.map +1 -1
  85. package/dist/source/loader/make_xml_extension_object_parser.d.ts +2 -2
  86. package/dist/source/loader/make_xml_extension_object_parser.js +19 -19
  87. package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -1
  88. package/dist/source/loader/namespace_post_step.d.ts +1 -1
  89. package/dist/source/loader/namespace_post_step.js.map +1 -1
  90. package/dist/source/loader/parsers/extension_object_parser.d.ts +4 -4
  91. package/dist/source/loader/parsers/extension_object_parser.js +22 -23
  92. package/dist/source/loader/parsers/extension_object_parser.js.map +1 -1
  93. package/dist/source/loader/parsers/localized_text_parser.d.ts +2 -2
  94. package/dist/source/loader/parsers/localized_text_parser.js.map +1 -1
  95. package/dist/source/loader/parsers/nodeid_parser.d.ts +1 -1
  96. package/dist/source/loader/parsers/nodeid_parser.js.map +1 -1
  97. package/dist/source/loader/parsers/qualified_name_parser.d.ts +3 -3
  98. package/dist/source/loader/parsers/qualified_name_parser.js.map +1 -1
  99. package/dist/source/loader/parsers/variant_parser.d.ts +5 -5
  100. package/dist/source/loader/parsers/variant_parser.js +13 -13
  101. package/dist/source/loader/parsers/variant_parser.js.map +1 -1
  102. package/dist/source/loader/register_node_promoter.d.ts +1 -1
  103. package/dist/source/loader/register_node_promoter.js.map +1 -1
  104. package/dist/source/namespace.d.ts +4 -4
  105. package/dist/source/namespace_alarm_and_condition.d.ts +22 -21
  106. package/dist/source/namespace_data_access.d.ts +11 -11
  107. package/dist/source/namespace_machine_state.d.ts +4 -4
  108. package/dist/source/pseudo_session.d.ts +8 -5
  109. package/dist/source/pseudo_session.js +28 -28
  110. package/dist/source/pseudo_session.js.map +1 -1
  111. package/dist/source/session_context.js +1 -1
  112. package/dist/source/session_context.js.map +1 -1
  113. package/dist/source/set_namespace_meta_data.d.ts +1 -1
  114. package/dist/source/set_namespace_meta_data.js +1 -1
  115. package/dist/source/set_namespace_meta_data.js.map +1 -1
  116. package/dist/source/ua_addin.d.ts +3 -3
  117. package/dist/source/ua_addin.js +1 -1
  118. package/dist/source/ua_addin.js.map +1 -1
  119. package/dist/source/ua_interface.js +4 -1
  120. package/dist/source/ua_interface.js.map +1 -1
  121. package/dist/source/ua_root_folder.d.ts +1 -1
  122. package/dist/source/ua_two_state_variable_ex.d.ts +5 -5
  123. package/dist/src/_instantiate_helpers.js +1 -1
  124. package/dist/src/_instantiate_helpers.js.map +1 -1
  125. package/dist/src/_mandatory_child_or_requested_optional_filter.d.ts +2 -2
  126. package/dist/src/_mandatory_child_or_requested_optional_filter.js +7 -8
  127. package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +1 -1
  128. package/dist/src/address_space.js +4 -4
  129. package/dist/src/address_space.js.map +1 -1
  130. package/dist/src/address_space_change_event_tools.d.ts +3 -3
  131. package/dist/src/address_space_change_event_tools.js +8 -10
  132. package/dist/src/address_space_change_event_tools.js.map +1 -1
  133. package/dist/src/address_space_private.d.ts +11 -11
  134. package/dist/src/address_space_private.js +3 -0
  135. package/dist/src/address_space_private.js.map +1 -1
  136. package/dist/src/alarms_and_conditions/condition.js.map +1 -1
  137. package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +6 -6
  138. package/dist/src/alarms_and_conditions/condition_info_impl.js +6 -15
  139. package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -1
  140. package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +10 -10
  141. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +76 -47
  142. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
  143. package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +8 -5
  144. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +15 -9
  145. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
  146. package/dist/src/alarms_and_conditions/index.d.ts +3 -3
  147. package/dist/src/alarms_and_conditions/index.js +3 -3
  148. package/dist/src/alarms_and_conditions/index.js.map +1 -1
  149. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +21 -14
  150. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +26 -21
  151. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
  152. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +6 -7
  153. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +30 -28
  154. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
  155. package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +9 -11
  156. package/dist/src/alarms_and_conditions/ua_base_event_impl.js +10 -10
  157. package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
  158. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +3 -1
  159. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +6 -5
  160. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
  161. package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +16 -42
  162. package/dist/src/alarms_and_conditions/ua_condition_impl.js +100 -82
  163. package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
  164. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +12 -7
  165. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +9 -8
  166. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
  167. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +18 -18
  168. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +16 -18
  169. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
  170. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +4 -4
  171. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +2 -2
  172. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
  173. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +10 -9
  174. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +20 -19
  175. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
  176. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +2 -4
  177. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -1
  178. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +12 -38
  179. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +50 -65
  180. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
  181. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +15 -17
  182. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +15 -11
  183. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
  184. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +22 -15
  185. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +35 -24
  186. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
  187. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +15 -16
  188. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +19 -14
  189. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
  190. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +4 -4
  191. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +1 -1
  192. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
  193. package/dist/src/apply_condition_refresh.d.ts +4 -4
  194. package/dist/src/apply_condition_refresh.js +1 -1
  195. package/dist/src/apply_condition_refresh.js.map +1 -1
  196. package/dist/src/base_node_impl.d.ts +4 -6
  197. package/dist/src/base_node_impl.js +3 -3
  198. package/dist/src/base_node_impl.js.map +1 -1
  199. package/dist/src/base_node_private.js +1 -2
  200. package/dist/src/base_node_private.js.map +1 -1
  201. package/dist/src/check_value_rank_compatibility.js +10 -6
  202. package/dist/src/check_value_rank_compatibility.js.map +1 -1
  203. package/dist/src/data_access/add_dataItem_stuff.d.ts +1 -1
  204. package/dist/src/data_access/add_dataItem_stuff.js +2 -22
  205. package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
  206. package/dist/src/data_access/adjust_datavalue_status_code.d.ts +6 -3
  207. package/dist/src/data_access/adjust_datavalue_status_code.js +3 -3
  208. package/dist/src/data_access/adjust_datavalue_status_code.js.map +1 -1
  209. package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +13 -11
  210. package/dist/src/data_access/ua_multistate_discrete_impl.js +28 -23
  211. package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
  212. package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +19 -23
  213. package/dist/src/data_access/ua_multistate_value_discrete_impl.js +31 -31
  214. package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
  215. package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +10 -16
  216. package/dist/src/data_access/ua_two_state_discrete_impl.js +18 -14
  217. package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
  218. package/dist/src/event_data.js.map +1 -1
  219. package/dist/src/extension_object_array_node.d.ts +5 -2
  220. package/dist/src/extension_object_array_node.js +21 -24
  221. package/dist/src/extension_object_array_node.js.map +1 -1
  222. package/dist/src/get_basic_datatype.d.ts +2 -2
  223. package/dist/src/get_basic_datatype.js.map +1 -1
  224. package/dist/src/historical_access/address_space_historical_data_node.d.ts +3 -3
  225. package/dist/src/historical_access/address_space_historical_data_node.js +24 -17
  226. package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
  227. package/dist/src/idx_iterator.js +1 -1
  228. package/dist/src/idx_iterator.js.map +1 -1
  229. package/dist/src/index_current.d.ts +31 -31
  230. package/dist/src/index_current.js +45 -45
  231. package/dist/src/index_current.js.map +1 -1
  232. package/dist/src/namespace_impl.d.ts +4 -3
  233. package/dist/src/namespace_impl.js +17 -14
  234. package/dist/src/namespace_impl.js.map +1 -1
  235. package/dist/src/namespace_private.js.map +1 -1
  236. package/dist/src/nodeid_manager.d.ts +3 -3
  237. package/dist/src/nodeid_manager.js +19 -16
  238. package/dist/src/nodeid_manager.js.map +1 -1
  239. package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +1 -1
  240. package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -2
  241. package/dist/src/nodeset_tools/construct_namespace_dependency.js +7 -7
  242. package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -1
  243. package/dist/src/nodeset_tools/dump_to_bsd.d.ts +1 -1
  244. package/dist/src/nodeset_tools/dump_to_bsd.js +15 -11
  245. package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -1
  246. package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +5 -3
  247. package/dist/src/nodeset_tools/nodeset_to_xml.js +64 -67
  248. package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
  249. package/dist/src/private_namespace.d.ts +2 -2
  250. package/dist/src/private_namespace.js.map +1 -1
  251. package/dist/src/reference_impl.d.ts +2 -2
  252. package/dist/src/reference_impl.js +9 -11
  253. package/dist/src/reference_impl.js.map +1 -1
  254. package/dist/src/role_permissions.d.ts +1 -1
  255. package/dist/src/role_permissions.js.map +1 -1
  256. package/dist/src/state_machine/finite_state_machine.d.ts +11 -14
  257. package/dist/src/state_machine/finite_state_machine.js +36 -30
  258. package/dist/src/state_machine/finite_state_machine.js.map +1 -1
  259. package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +8 -6
  260. package/dist/src/state_machine/ua_shelving_state_machine_ex.js +16 -18
  261. package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
  262. package/dist/src/state_machine/ua_two_state_variable.d.ts +12 -11
  263. package/dist/src/state_machine/ua_two_state_variable.js +24 -29
  264. package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
  265. package/dist/src/tool_isSubtypeOf.d.ts +5 -5
  266. package/dist/src/tool_isSubtypeOf.js +21 -18
  267. package/dist/src/tool_isSubtypeOf.js.map +1 -1
  268. package/dist/src/ua_condition_type.d.ts +1 -1
  269. package/dist/src/ua_data_type_impl.js.map +1 -1
  270. package/dist/src/ua_method_impl.d.ts +9 -5
  271. package/dist/src/ua_method_impl.js +1 -1
  272. package/dist/src/ua_method_impl.js.map +1 -1
  273. package/dist/src/ua_object_impl.d.ts +7 -5
  274. package/dist/src/ua_object_impl.js +13 -11
  275. package/dist/src/ua_object_impl.js.map +1 -1
  276. package/dist/src/ua_object_type_impl.d.ts +7 -5
  277. package/dist/src/ua_object_type_impl.js +4 -5
  278. package/dist/src/ua_object_type_impl.js.map +1 -1
  279. package/dist/src/ua_reference_type_impl.d.ts +6 -8
  280. package/dist/src/ua_reference_type_impl.js +16 -14
  281. package/dist/src/ua_reference_type_impl.js.map +1 -1
  282. package/dist/src/ua_variable_impl.d.ts +43 -45
  283. package/dist/src/ua_variable_impl.js +99 -83
  284. package/dist/src/ua_variable_impl.js.map +1 -1
  285. package/dist/src/ua_variable_impl_ext_obj.d.ts +3 -3
  286. package/dist/src/ua_variable_impl_ext_obj.js +37 -29
  287. package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
  288. package/dist/src/ua_variable_type_impl.d.ts +11 -11
  289. package/dist/src/ua_variable_type_impl.js +13 -21
  290. package/dist/src/ua_variable_type_impl.js.map +1 -1
  291. package/dist/src/ua_view_impl.d.ts +3 -4
  292. package/dist/src/ua_view_impl.js +5 -6
  293. package/dist/src/ua_view_impl.js.map +1 -1
  294. package/dist/src/validate_data_type_correctness.d.ts +2 -2
  295. package/dist/src/validate_data_type_correctness.js +12 -3
  296. package/dist/src/validate_data_type_correctness.js.map +1 -1
  297. package/dist/tsconfig_base.tsbuildinfo +1 -1
  298. package/distHelpers/add_event_generator_object.d.ts +5 -2
  299. package/distHelpers/add_event_generator_object.js +2 -2
  300. package/distHelpers/add_event_generator_object.js.map +1 -1
  301. package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
  302. package/distHelpers/alarms_and_conditions_demo.js +4 -6
  303. package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
  304. package/distHelpers/assertHasMatchingReference.d.ts +1 -1
  305. package/distHelpers/assertHasMatchingReference.js +2 -2
  306. package/distHelpers/assertHasMatchingReference.js.map +1 -1
  307. package/distHelpers/boiler_system.d.ts +6 -3
  308. package/distHelpers/boiler_system.js +44 -42
  309. package/distHelpers/boiler_system.js.map +1 -1
  310. package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
  311. package/distHelpers/create_minimalist_address_space_nodeset.js +25 -27
  312. package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
  313. package/distHelpers/get_address_space_fixture.js +1 -1
  314. package/distHelpers/get_address_space_fixture.js.map +1 -1
  315. package/distHelpers/mock_session.d.ts +7 -7
  316. package/distHelpers/mock_session.js +4 -4
  317. package/distHelpers/mock_session.js.map +1 -1
  318. package/distNodeJS/generate_address_space.d.ts +2 -2
  319. package/distNodeJS/generate_address_space.js +2 -2
  320. package/distNodeJS/generate_address_space.js.map +1 -1
  321. package/package.json +36 -36
  322. package/source/address_space_ts.ts +29 -30
  323. package/source/continuation_points/continuation_point_manager.ts +8 -7
  324. package/source/helpers/adjust_browse_direction.ts +1 -1
  325. package/source/helpers/argument_list.ts +37 -25
  326. package/source/helpers/call_helpers.ts +10 -15
  327. package/source/helpers/coerce_enum_value.ts +4 -4
  328. package/source/helpers/dump_tools.ts +6 -11
  329. package/source/helpers/ensure_secure_access.ts +2 -2
  330. package/source/helpers/make_optionals_map.ts +3 -10
  331. package/source/helpers/multiform_func.ts +1 -1
  332. package/source/helpers/resolve_opaque_on_address_space.ts +2 -2
  333. package/source/index.ts +44 -54
  334. package/source/interfaces/alarms_and_conditions/condition_info_i.ts +3 -4
  335. package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +13 -13
  336. package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +8 -10
  337. package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +4 -5
  338. package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +4 -6
  339. package/source/interfaces/alarms_and_conditions/instantiate_condition_options.ts +3 -3
  340. package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +2 -2
  341. package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +2 -2
  342. package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +6 -3
  343. package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +2 -2
  344. package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +2 -2
  345. package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +11 -11
  346. package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +11 -25
  347. package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +16 -13
  348. package/source/interfaces/alarms_and_conditions/ua_base_event_ex.ts +12 -0
  349. package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +5 -5
  350. package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +30 -54
  351. package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +3 -34
  352. package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +18 -22
  353. package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +8 -15
  354. package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +4 -7
  355. package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +5 -6
  356. package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +3 -3
  357. package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +9 -16
  358. package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +5 -8
  359. package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +5 -5
  360. package/source/interfaces/data_access/ua_y_array_item_ex.ts +3 -3
  361. package/source/interfaces/extension_object_constructor.ts +3 -4
  362. package/source/interfaces/i_condition_variable_type_setter_options.ts +1 -3
  363. package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +3 -3
  364. package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +2 -2
  365. package/source/interfaces/state_machine/ua_program_state_machine_type.ts +3 -3
  366. package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +10 -7
  367. package/source/interfaces/state_machine/ua_state_machine_type.ts +11 -8
  368. package/source/interfaces/state_machine/ua_transition_ex.ts +2 -2
  369. package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +3 -2
  370. package/source/loader/decode_xml_extension_object.ts +7 -7
  371. package/source/loader/ensure_datatype_extracted.ts +14 -19
  372. package/source/loader/generateAddressSpaceRaw.ts +12 -13
  373. package/source/loader/load_nodeset2.ts +3 -3
  374. package/source/loader/make_xml_extension_object_parser.ts +55 -39
  375. package/source/loader/namespace_post_step.ts +3 -4
  376. package/source/loader/parsers/extension_object_parser.ts +63 -62
  377. package/source/loader/parsers/localized_text_parser.ts +3 -3
  378. package/source/loader/parsers/nodeid_parser.ts +2 -3
  379. package/source/loader/parsers/qualified_name_parser.ts +6 -7
  380. package/source/loader/parsers/variant_parser.ts +48 -55
  381. package/source/loader/register_node_promoter.ts +2 -2
  382. package/source/namespace.ts +4 -4
  383. package/source/namespace_alarm_and_condition.ts +22 -22
  384. package/source/namespace_data_access.ts +12 -13
  385. package/source/namespace_machine_state.ts +10 -5
  386. package/source/pseudo_session.ts +53 -50
  387. package/source/session_context.ts +1 -1
  388. package/source/set_namespace_meta_data.ts +3 -3
  389. package/source/ua_addin.ts +10 -11
  390. package/source/ua_interface.ts +10 -7
  391. package/source/ua_root_folder.ts +1 -1
  392. package/source/ua_two_state_variable_ex.ts +5 -5
  393. package/source_nodejs/generate_address_space.ts +5 -9
  394. package/src/_instantiate_helpers.ts +26 -16
  395. package/src/_mandatory_child_or_requested_optional_filter.ts +16 -15
  396. package/src/address_space.ts +23 -31
  397. package/src/address_space_change_event_tools.ts +25 -30
  398. package/src/address_space_private.ts +20 -21
  399. package/src/alarms_and_conditions/condition.ts +0 -2
  400. package/src/alarms_and_conditions/condition_info_impl.ts +11 -19
  401. package/src/alarms_and_conditions/condition_snapshot_impl.ts +106 -82
  402. package/src/alarms_and_conditions/deviation_alarm_helper.ts +20 -15
  403. package/src/alarms_and_conditions/index.ts +3 -3
  404. package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +44 -32
  405. package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +35 -34
  406. package/src/alarms_and_conditions/ua_base_event_impl.ts +15 -19
  407. package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +6 -2
  408. package/src/alarms_and_conditions/ua_condition_impl.ts +140 -130
  409. package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +20 -12
  410. package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +40 -43
  411. package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +7 -7
  412. package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +28 -30
  413. package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +3 -6
  414. package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +59 -90
  415. package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +31 -27
  416. package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +57 -36
  417. package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +31 -27
  418. package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +6 -6
  419. package/src/apply_condition_refresh.ts +7 -8
  420. package/src/base_node_impl.ts +63 -44
  421. package/src/base_node_private.ts +12 -4
  422. package/src/check_value_rank_compatibility.ts +18 -14
  423. package/src/data_access/add_dataItem_stuff.ts +3 -4
  424. package/src/data_access/adjust_datavalue_status_code.ts +7 -7
  425. package/src/data_access/ua_multistate_discrete_impl.ts +44 -28
  426. package/src/data_access/ua_multistate_value_discrete_impl.ts +77 -66
  427. package/src/data_access/ua_two_state_discrete_impl.ts +29 -36
  428. package/src/event_data.ts +53 -53
  429. package/src/extension_object_array_node.ts +27 -28
  430. package/src/get_basic_datatype.ts +4 -5
  431. package/src/historical_access/address_space_historical_data_node.ts +65 -50
  432. package/src/idx_iterator.ts +4 -12
  433. package/src/index_current.ts +33 -45
  434. package/src/namespace_impl.ts +75 -62
  435. package/src/namespace_private.ts +2 -8
  436. package/src/nodeid_manager.ts +30 -27
  437. package/src/nodeset_tools/adjust_namespace_array.ts +1 -1
  438. package/src/nodeset_tools/construct_namespace_dependency.ts +15 -16
  439. package/src/nodeset_tools/dump_to_bsd.ts +27 -22
  440. package/src/nodeset_tools/nodeset_to_xml.ts +95 -114
  441. package/src/private_namespace.ts +3 -6
  442. package/src/reference_impl.ts +11 -14
  443. package/src/role_permissions.ts +1 -1
  444. package/src/state_machine/finite_state_machine.ts +60 -61
  445. package/src/state_machine/ua_shelving_state_machine_ex.ts +23 -23
  446. package/src/state_machine/ua_two_state_variable.ts +34 -31
  447. package/src/tool_isSubtypeOf.ts +48 -33
  448. package/src/ua_condition_type.ts +1 -1
  449. package/src/ua_data_type_impl.ts +12 -13
  450. package/src/ua_method_impl.ts +17 -12
  451. package/src/ua_object_impl.ts +38 -33
  452. package/src/ua_object_type_impl.ts +22 -22
  453. package/src/ua_reference_type_impl.ts +19 -19
  454. package/src/ua_variable_impl.ts +240 -220
  455. package/src/ua_variable_impl_ext_obj.ts +63 -50
  456. package/src/ua_variable_type_impl.ts +43 -49
  457. package/src/ua_view_impl.ts +5 -5
  458. package/src/validate_data_type_correctness.ts +17 -8
@@ -1 +1 @@
1
- {"version":3,"file":"ua_certificate_expiration_alarm_impl.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAwBH,sFAMC;AAsMD,kFAQC;AAzOD,mEAAgG;AAChG,+DAAqD;AACrD,+CAAiG;AACjG,iEAA8D;AAC9D,uDAAmD;AAEnD,2DAA8C;AAG9C,uFAAkF;AAClF,uFAA+E;AAE/E,MAAM,UAAU,GAAG,IAAA,kCAAe,EAAC,qBAAqB,CAAC,CAAC;AAE1D,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,IAAI,GAAG,CAAC,EAAE,EAAE;IACxC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACzB,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC;AAC7G,CAAC,CAAC;AACF,MAAM,CAAC,GAAG,CAAC,CAAO,EAAE,EAAE;IAClB,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;AAC3B,CAAC,CAAC;AACF,SAAgB,qCAAqC,CACjD,SAAqB,EACrB,SAA2C,EAC3C,OAAyC;IAEzC,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,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;CACJ;AAED,SAAgB,mCAAmC,CAAC,IAAc;IAC9D,IAAI,IAAI,YAAY,gCAAgC,EAAE,CAAC;QACnD,OAAO,IAAI,CAAC,CAAC,mBAAmB;IACpC,CAAC;IACD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,gCAAgC,CAAC,SAAS,CAAC,CAAC;IACxE,MAAM,KAAK,GAAG,IAAmD,CAAC;IAClE,KAAK,CAAC,gBAAgB,EAAE,CAAC;IACzB,OAAO,KAAK,CAAC;AACjB,CAAC;AACD,IAAA,6CAAoB,EAAC,oCAAa,CAAC,8BAA8B,EAAE,mCAAmC,EAAE,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"ua_certificate_expiration_alarm_impl.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAwBH,sFAMC;AAsMD,kFAQC;AAzOD,mEAAgG;AAChG,+DAAqD;AACrD,+CAAiG;AACjG,iEAA8D;AAC9D,uDAAmD;AAEnD,2DAA8C;AAG9C,uFAAkF;AAClF,uFAA+E;AAE/E,MAAM,UAAU,GAAG,IAAA,kCAAe,EAAC,qBAAqB,CAAC,CAAC;AAE1D,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,IAAI,GAAG,CAAC,EAAE,EAAE;IACxC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACzB,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC;AAC7G,CAAC,CAAC;AACF,MAAM,CA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E,CAAC;QAC1C,IAAI,CAAC,wBAAwB,CAAC,WAAW,CAAC,CAAC;QAE3C,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,GAAG,EAAE;YACxC,IAAI,CAAC,SAAS,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;CACJ;AAED,SAAgB,mCAAmC,CAAC,IAAc;IAC9D,IAAI,IAAI,YAAY,wCAAgC,EAAE,CAAC;QACnD,OAAO,IAAI,CAAC,CAAC,mBAAmB;IACpC,CAAC;IACD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,wCAAgC,CAAC,SAAS,CAAC,CAAC;IACxE,MAAM,KAAK,GAAG,IAAmD,CAAC;IAClE,KAAK,CAAC,gBAAgB,EAAE,CAAC;IACzB,OAAO,KAAK,CAAC;AACjB,CAAC;AACD,IAAA,6CAAoB,EAAC,oCAAa,CAAC,8BAA8B,EAAE,mCAAmC,EAAE,IAAI,CAAC,CAAC;AAGjG,QAAA,gCAAgC,GACzC,oCAA2C,CAAC"}
@@ -1,50 +1,21 @@
1
- import { ByteString } from "node-opcua-basic-types";
2
- import { LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
1
+ import { type INamespace, type ISessionContext, type ListenerSignature, type UAEventType, type UAObject, type UAVariable } from "node-opcua-address-space-base";
2
+ import { type ByteString } from "node-opcua-basic-types";
3
+ import { LocalizedText, type LocalizedTextLike } from "node-opcua-data-model";
3
4
  import { NodeId } from "node-opcua-nodeid";
4
5
  import { StatusCode } from "node-opcua-status-code";
5
6
  import { TimeZoneDataType } from "node-opcua-types";
6
- import { DataType, VariantLike, VariantOptions } from "node-opcua-variant";
7
- import { UAVariable, INamespace, ISessionContext, UAEventType, UAObject, UAProperty } from "node-opcua-address-space-base";
8
- import { ConditionInfoOptions } from "../../source/interfaces/alarms_and_conditions/condition_info_i";
9
- import { UAConditionEx } from "../../source/interfaces/alarms_and_conditions/ua_condition_ex";
10
- import { ConditionSnapshot } from "../../source/interfaces/alarms_and_conditions/condition_snapshot";
11
- import { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
12
- import { AddressSpacePrivate } from "../address_space_private";
13
- import { UABaseEventImpl } from "./ua_base_event_impl";
14
- export declare interface UAConditionImpl extends UAConditionEx, UABaseEventImpl {
15
- on(eventName: string, eventHandler: any): this;
16
- once(eventName: string, eventHandler: any): this;
17
- conditionClassId: UAProperty<NodeId, /*c*/ DataType.NodeId>;
18
- conditionClassName: UAProperty<LocalizedText, /*c*/ DataType.LocalizedText>;
19
- conditionSubClassId?: UAProperty<NodeId[], DataType.NodeId>;
20
- conditionSubClassName?: UAProperty<LocalizedText[], DataType.LocalizedText>;
21
- }
22
- /**
23
- *
24
- * └─ ConditionType
25
- * ├─ DialogConditionType
26
- * └─ AcknowledgeableConditionType
27
- * └─ AlarmConditionType
28
- * ├─ LimitAlarmType
29
- * │ ├─ ExclusiveLimitAlarmType
30
- * │ │ ├─ ExclusiveLevelAlarmType
31
- * │ │ ├─ ExclusiveDeviationAlarmType
32
- * │ │ └─ ExclusiveRateOfChangeAlarmType
33
- * │ └─ NonExclusiveLimitAlarmType
34
- * │ ├─ NonExclusiveLevelAlarmType
35
- * │ ├─ NonExclusiveDeviationAlarmType
36
- * │ └─ NonExclusiveRateOfChangeAlarmType
37
- * └─ DiscreteAlarmType
38
- * ├─ OffNormalAlarmType
39
- * │ ├─ SystemOffNormalAlarmType
40
- * │ │ └─ CertificateExpirationAlarmType
41
- * │ └─ TripAlarmType
42
- *
43
- */
44
- export declare class UAConditionImpl extends UABaseEventImpl implements UAConditionEx {
7
+ import { type VariantLike, type VariantOptions } from "node-opcua-variant";
8
+ import type { ConditionInfoOptions } from "../../source/interfaces/alarms_and_conditions/condition_info_i";
9
+ import type { ConditionSnapshot } from "../../source/interfaces/alarms_and_conditions/condition_snapshot";
10
+ import type { InstantiateConditionOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_condition_options";
11
+ import type { UAConditionEvents, UAConditionEx } from "../../source/interfaces/alarms_and_conditions/ua_condition_ex";
12
+ import type { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
13
+ import type { AddressSpacePrivate } from "../address_space_private";
14
+ import { UABaseEventImplBase } from "./ua_base_event_impl";
15
+ export declare class UAConditionImplBase<T extends UAConditionEvents & ListenerSignature<T> = UAConditionEvents> extends UABaseEventImplBase<T> {
45
16
  static defaultSeverity: number;
46
17
  static typeDefinition: NodeId;
47
- static instantiate(namespace: INamespace, conditionTypeId: NodeId | string | UAEventType, options: any, data?: Record<string, VariantOptions>): UAConditionImpl;
18
+ static instantiate(namespace: INamespace, conditionTypeId: NodeId | string | UAEventType, options: InstantiateConditionOptions, data?: Record<string, VariantOptions>): UAConditionImpl;
48
19
  static install_condition_refresh_handle(addressSpace: AddressSpacePrivate): void;
49
20
  /**
50
21
  *
@@ -74,6 +45,7 @@ export declare class UAConditionImpl extends UABaseEventImpl implements UACondit
74
45
  /**
75
46
  */
76
47
  deleteBranch(branch: ConditionSnapshot): void;
48
+ private get $();
77
49
  /**
78
50
  */
79
51
  getEnabledState(): boolean;
@@ -128,3 +100,5 @@ export declare class UAConditionImpl extends UABaseEventImpl implements UACondit
128
100
  findBranchForEventId(eventId: Buffer | null): ConditionSnapshot | null;
129
101
  protected evaluateConditionsAfterEnabled(): void;
130
102
  }
103
+ export type UAConditionImpl = UAConditionImplBase & UAConditionEx;
104
+ export declare const UAConditionImpl: new () => UAConditionImpl;
@@ -3,27 +3,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.UAConditionImpl = void 0;
6
+ exports.UAConditionImpl = exports.UAConditionImplBase = void 0;
7
7
  /* eslint-disable complexity */
8
8
  /**
9
9
  * @module node-opcua-address-space.AlarmsAndConditions
10
10
  */
11
11
  const chalk_1 = __importDefault(require("chalk"));
12
+ const node_opcua_address_space_base_1 = require("node-opcua-address-space-base");
12
13
  const node_opcua_assert_1 = require("node-opcua-assert");
13
14
  const node_opcua_basic_types_1 = require("node-opcua-basic-types");
14
- const node_opcua_basic_types_2 = require("node-opcua-basic-types");
15
15
  const node_opcua_data_model_1 = require("node-opcua-data-model");
16
16
  const node_opcua_debug_1 = require("node-opcua-debug");
17
- const node_opcua_basic_types_3 = require("node-opcua-basic-types");
18
17
  const node_opcua_nodeid_1 = require("node-opcua-nodeid");
19
18
  const node_opcua_status_code_1 = require("node-opcua-status-code");
20
19
  const node_opcua_types_1 = require("node-opcua-types");
21
20
  const node_opcua_variant_1 = require("node-opcua-variant");
22
- const node_opcua_address_space_base_1 = require("node-opcua-address-space-base");
23
21
  const ua_two_state_variable_1 = require("../state_machine/ua_two_state_variable");
24
22
  const ua_object_impl_1 = require("../ua_object_impl");
25
- const ua_base_event_impl_1 = require("./ua_base_event_impl");
26
23
  const condition_snapshot_impl_1 = require("./condition_snapshot_impl");
24
+ const ua_base_event_impl_1 = require("./ua_base_event_impl");
27
25
  const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
28
26
  const errorLog = (0, node_opcua_debug_1.make_errorLog)(__filename);
29
27
  const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
@@ -50,7 +48,8 @@ const warningLog = (0, node_opcua_debug_1.make_warningLog)(__filename);
50
48
  * │ └─ TripAlarmType
51
49
  *
52
50
  */
53
- class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
51
+ const $ = (a) => a;
52
+ class UAConditionImplBase extends ua_base_event_impl_1.UABaseEventImplBase {
54
53
  static defaultSeverity = 250;
55
54
  static typeDefinition = (0, node_opcua_nodeid_1.resolveNodeId)("ConditionType");
56
55
  static instantiate(namespace, conditionTypeId, options, data) {
@@ -87,7 +86,7 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
87
86
  */
88
87
  static with_condition_method(inputArguments, context, callback, inner_func) {
89
88
  const conditionNode = context.object;
90
- if (!(conditionNode instanceof UAConditionImpl)) {
89
+ if (!(conditionNode instanceof exports.UAConditionImpl)) {
91
90
  callback(null, {
92
91
  statusCode: node_opcua_status_code_1.StatusCodes.BadNodeIdInvalid
93
92
  });
@@ -175,27 +174,30 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
175
174
  this._branches.delete(key);
176
175
  this.emit("branch_deleted", key);
177
176
  }
177
+ get $() {
178
+ return this;
179
+ }
178
180
  /**
179
181
  */
180
182
  getEnabledState() {
181
- if (!this.enabledState) {
183
+ if (!this.$.enabledState) {
182
184
  // ua variable is missing
183
185
  return false;
184
186
  }
185
- if (typeof this.enabledState.getValue !== "function") {
187
+ if (typeof this.$.enabledState.getValue !== "function") {
186
188
  // the enabledState is not initialized yet, probably because the addressSpace is not fully initialized
187
189
  // try the id that contains the flag status as a boolean DataValue
188
- if (!this.enabledState.id) {
190
+ if (!this.$.enabledState.id) {
189
191
  return false;
190
192
  }
191
- return this.enabledState.id.readValue().value.value;
193
+ return this.$.enabledState.id.readValue().value.value;
192
194
  }
193
- return this.enabledState.getValue();
195
+ return this.$.enabledState.getValue();
194
196
  }
195
197
  /**
196
198
  */
197
199
  getEnabledStateAsString() {
198
- return this.enabledState.getValueAsString();
200
+ return this.$.enabledState.getValueAsString();
199
201
  }
200
202
  /**
201
203
  * returns {StatusCode} StatusCodes.Good if successful or BadConditionAlreadyEnabled/BadConditionAlreadyDisabled
@@ -210,6 +212,11 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
210
212
  if (!enabledState && !requestedEnabledState) {
211
213
  return node_opcua_status_code_1.StatusCodes.BadConditionAlreadyDisabled;
212
214
  }
215
+ let _previousRetainFlag = false;
216
+ if (enabledState) {
217
+ // record previousRetain flag before disabling the condition (so it can be restored on re-enable)
218
+ _previousRetainFlag = this.currentBranch().getRetain();
219
+ }
213
220
  this._branch0.setEnabledState(requestedEnabledState, options);
214
221
  // conditionNode.enabledState.setValue(requestedEnabledState);
215
222
  // xx assert(conditionNode.enabledState.id.readValue().value.value === requestedEnabledState,"sanity check 1");
@@ -221,11 +228,11 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
221
228
  // Condition instance is currently not of interest to Clients.
222
229
  // TODO : shall we really set retain to false or artificially expose the retain false as false
223
230
  // whist enabled state is false ?
224
- this._previousRetainFlag = this.currentBranch().getRetain();
231
+ this._previousRetainFlag = _previousRetainFlag;
225
232
  this.currentBranch().setRetain(false);
226
233
  // todo: install the mechanism by which all condition values will be return
227
234
  // as Null | BadConditionDisabled;
228
- const statusCode = node_opcua_status_code_1.StatusCodes.BadConditionDisabled;
235
+ const _statusCode = node_opcua_status_code_1.StatusCodes.BadConditionDisabled;
229
236
  // a notification must be send
230
237
  this.raiseConditionEvent(this.currentBranch(), true);
231
238
  }
@@ -238,7 +245,7 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
238
245
  // todo evaluate branches
239
246
  // conditionNode.evaluateBranches();
240
247
  // restore retain flag
241
- if (Object.prototype.hasOwnProperty.call(this, "_previousRetainFlag")) {
248
+ if (Object.hasOwn(this, "_previousRetainFlag")) {
242
249
  this.currentBranch().setRetain(this._previousRetainFlag);
243
250
  }
244
251
  // todo send notification for branches with retain = true
@@ -263,30 +270,30 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
263
270
  /**
264
271
  */
265
272
  setReceiveTime(time) {
266
- return this._branch0.setReceiveTime(time);
273
+ this._branch0.setReceiveTime(time);
267
274
  }
268
275
  /**
269
276
  */
270
277
  setLocalTime(time) {
271
- return this._branch0.setLocalTime(time);
278
+ this._branch0.setLocalTime(time);
272
279
  }
273
280
  /**
274
281
  */
275
282
  setTime(time) {
276
- return this._branch0.setTime(time);
283
+ this._branch0.setTime(time);
277
284
  }
278
285
  _assert_valid() {
279
- (0, node_opcua_assert_1.assert)(this.receiveTime.readValue().value.dataType === node_opcua_variant_1.DataType.DateTime);
280
- (0, node_opcua_assert_1.assert)(this.receiveTime.readValue().value.value instanceof Date);
281
- (0, node_opcua_assert_1.assert)(this.message.readValue().value.dataType === node_opcua_variant_1.DataType.LocalizedText);
282
- (0, node_opcua_assert_1.assert)(this.severity.readValue().value.dataType === node_opcua_variant_1.DataType.UInt16);
283
- (0, node_opcua_assert_1.assert)(this.time.readValue().value.dataType === node_opcua_variant_1.DataType.DateTime);
284
- (0, node_opcua_assert_1.assert)(this.time.readValue().value.value instanceof Date);
285
- (0, node_opcua_assert_1.assert)(this.quality.readValue().value.dataType === node_opcua_variant_1.DataType.StatusCode);
286
- (0, node_opcua_assert_1.assert)(this.enabledState.readValue().value.dataType === node_opcua_variant_1.DataType.LocalizedText);
287
- (0, node_opcua_assert_1.assert)(this.branchId.readValue().value.dataType === node_opcua_variant_1.DataType.NodeId);
286
+ (0, node_opcua_assert_1.assert)($(this).receiveTime.readValue().value.dataType === node_opcua_variant_1.DataType.DateTime);
287
+ (0, node_opcua_assert_1.assert)($(this).receiveTime.readValue().value.value instanceof Date);
288
+ (0, node_opcua_assert_1.assert)($(this).message.readValue().value.dataType === node_opcua_variant_1.DataType.LocalizedText);
289
+ (0, node_opcua_assert_1.assert)($(this).severity.readValue().value.dataType === node_opcua_variant_1.DataType.UInt16);
290
+ (0, node_opcua_assert_1.assert)($(this).time.readValue().value.dataType === node_opcua_variant_1.DataType.DateTime);
291
+ (0, node_opcua_assert_1.assert)($(this).time.readValue().value.value instanceof Date);
292
+ (0, node_opcua_assert_1.assert)($(this).quality.readValue().value.dataType === node_opcua_variant_1.DataType.StatusCode);
293
+ (0, node_opcua_assert_1.assert)($(this).enabledState.readValue().value.dataType === node_opcua_variant_1.DataType.LocalizedText);
294
+ (0, node_opcua_assert_1.assert)($(this).branchId.readValue().value.dataType === node_opcua_variant_1.DataType.NodeId);
288
295
  // note localTime has been made optional in 1.04
289
- (0, node_opcua_assert_1.assert)(!this.localTime || this.localTime.readValue().value.dataType === node_opcua_variant_1.DataType.ExtensionObject);
296
+ (0, node_opcua_assert_1.assert)(!$(this).localTime || $(this).localTime?.readValue().value.dataType === node_opcua_variant_1.DataType.ExtensionObject);
290
297
  }
291
298
  /**
292
299
  */
@@ -308,7 +315,6 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
308
315
  * @param renewEventId true if event Id of the condition branch should be renewed
309
316
  */
310
317
  raiseConditionEvent(branch, renewEventId) {
311
- (0, node_opcua_assert_1.assert)(arguments.length === 2, "expecting 2 arguments");
312
318
  if (renewEventId) {
313
319
  branch.renewEventId();
314
320
  }
@@ -349,16 +355,18 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
349
355
  if (!this.getEnabledState()) {
350
356
  throw new Error("UACondition#raiseNewCondition Condition is not enabled");
351
357
  }
352
- conditionInfo = conditionInfo || { severity: UAConditionImpl.defaultSeverity };
353
- conditionInfo.severity = Object.prototype.hasOwnProperty.call(conditionInfo, "severity")
358
+ conditionInfo = conditionInfo || { severity: UAConditionImplBase.defaultSeverity };
359
+ conditionInfo.severity = Object.hasOwn(conditionInfo, "severity")
354
360
  ? conditionInfo.severity
355
- : UAConditionImpl.defaultSeverity;
361
+ : UAConditionImplBase.defaultSeverity;
356
362
  // only valid for ConditionObjects
357
363
  // todo check that object is of type ConditionType
358
364
  const addressSpace = this.addressSpace;
359
365
  const selfConditionType = this.typeDefinitionObj;
360
366
  const conditionType = addressSpace.findObjectType("ConditionType");
361
- (0, node_opcua_assert_1.assert)(selfConditionType.isSubtypeOf(conditionType));
367
+ if (!conditionType || !selfConditionType.isSubtypeOf(conditionType)) {
368
+ throw new Error("UACondition#raiseNewCondition ConditionType not found or invalid");
369
+ }
362
370
  const branch = this.currentBranch();
363
371
  if (!branch) {
364
372
  warningLog("UACondition#raiseNewCondition currentBranch is not defined for node ", (0, node_opcua_address_space_base_1.fullPath2)(this));
@@ -372,28 +380,28 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
372
380
  branch.setTime(time || node_opcua_basic_types_1.minDate);
373
381
  branch.setReceiveTime(receiveTime);
374
382
  // note : in 1.04 LocalTime property is optional
375
- if (Object.prototype.hasOwnProperty.call(this, "localTime")) {
383
+ if (Object.hasOwn(this, "localTime")) {
376
384
  branch.setLocalTime(new node_opcua_types_1.TimeZoneDataType({
377
385
  daylightSavingInOffset: false,
378
386
  offset: 0
379
387
  }));
380
388
  }
381
- if (Object.prototype.hasOwnProperty.call(conditionInfo, "message") && conditionInfo.message) {
389
+ if (Object.hasOwn(conditionInfo, "message") && conditionInfo.message) {
382
390
  branch.setMessage(conditionInfo.message);
383
391
  }
384
392
  // todo receive time : when the server received the event from the underlying system.
385
393
  // self.receiveTime.setValueFromSource();
386
- if (Object.prototype.hasOwnProperty.call(conditionInfo, "severity") && conditionInfo.severity !== null) {
387
- (0, node_opcua_assert_1.assert)(isFinite(conditionInfo.severity));
388
- branch.setSeverity(conditionInfo.severity, { sourceTimestamp: time });
394
+ if (Object.hasOwn(conditionInfo, "severity") && conditionInfo.severity !== null) {
395
+ (0, node_opcua_assert_1.assert)(Number.isFinite(conditionInfo.severity));
396
+ branch.setSeverity(conditionInfo.severity || 0, { sourceTimestamp: time });
389
397
  }
390
- if (Object.prototype.hasOwnProperty.call(conditionInfo, "quality") && conditionInfo.quality !== null) {
398
+ if (Object.hasOwn(conditionInfo, "quality") && conditionInfo.quality !== null) {
391
399
  (0, node_opcua_assert_1.assert)(conditionInfo.quality instanceof node_opcua_status_code_1.StatusCode);
392
- branch.setQuality(conditionInfo.quality, { sourceTimestamp: time });
400
+ branch.setQuality(conditionInfo.quality || node_opcua_status_code_1.StatusCodes.Good, { sourceTimestamp: time });
393
401
  }
394
- if (Object.prototype.hasOwnProperty.call(conditionInfo, "retain") && conditionInfo.retain !== null) {
402
+ if (Object.hasOwn(conditionInfo, "retain") && conditionInfo.retain !== null) {
395
403
  (0, node_opcua_assert_1.assert)(typeof conditionInfo.retain === "boolean");
396
- branch.setRetain(!!conditionInfo.retain);
404
+ branch.setRetain(!!conditionInfo.retain || false);
397
405
  }
398
406
  this.raiseConditionEvent(branch, true);
399
407
  }
@@ -413,7 +421,7 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
413
421
  // for the time being , only current branch
414
422
  const currentBranch = this.currentBranch();
415
423
  if (currentBranch.getRetain()) {
416
- debugLog(" resending condition event for " + this.browseName.toString());
424
+ debugLog(` resending condition event for ${this.browseName.toString()}`);
417
425
  this.raiseConditionEvent(currentBranch, false);
418
426
  return 1;
419
427
  }
@@ -482,11 +490,10 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
482
490
  // xx }
483
491
  }
484
492
  findBranchForEventId(eventId) {
485
- if (sameBuffer(this.eventId.readValue().value.value, eventId)) {
493
+ if (sameBuffer($(this).eventId?.readValue().value.value, eventId)) {
486
494
  return this.currentBranch();
487
495
  }
488
- const e = [...this._branches.values()]
489
- .filter((branch) => sameBuffer(branch.getEventId(), eventId));
496
+ const e = [...this._branches.values()].filter((branch) => sameBuffer(branch.getEventId(), eventId));
490
497
  if (e.length === 1) {
491
498
  return e[0];
492
499
  }
@@ -498,8 +505,9 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
498
505
  throw new Error("Unimplemented , please override");
499
506
  }
500
507
  }
501
- exports.UAConditionImpl = UAConditionImpl;
502
- /**
508
+ exports.UAConditionImplBase = UAConditionImplBase;
509
+ exports.UAConditionImpl = UAConditionImplBase;
510
+ /**²
503
511
  * instantiate a Condition.
504
512
  * this will create the unique EventId and will set eventType
505
513
  * @param namespace {INamespace}
@@ -530,7 +538,7 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
530
538
  const conditionType = addressSpace.findEventType(conditionTypeId);
531
539
  /* c8 ignore next */
532
540
  if (!conditionType) {
533
- throw new Error(" cannot find Condition Type for " + conditionTypeId);
541
+ throw new Error(` cannot find Condition Type for ${conditionTypeId}`);
534
542
  }
535
543
  // reminder : abstract event type cannot be instantiated directly !
536
544
  (0, node_opcua_assert_1.assert)(!conditionType.isAbstract, "Cannot instantiate abstract conditionType");
@@ -555,24 +563,27 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
555
563
  options.optionals.push("EnabledState.TransitionTime");
556
564
  options.optionals.push("EnabledState.EffectiveTransitionTime");
557
565
  options.optionals.push("EnabledState.EffectiveDisplayName");
558
- const conditionNode = conditionType.instantiate(options);
559
- Object.setPrototypeOf(conditionNode, UAConditionImpl.prototype);
566
+ const options2 = {
567
+ ...options,
568
+ namespace: options.namespace || namespace
569
+ };
570
+ const conditionNode = conditionType.instantiate(options2);
571
+ Object.setPrototypeOf(conditionNode, exports.UAConditionImpl.prototype);
560
572
  conditionNode.initialize();
561
- (0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(options, "conditionSource"), "must specify a condition source either as null or as a UAObject");
573
+ (0, node_opcua_assert_1.assert)(Object.hasOwn(options, "conditionSource"), "must specify a condition source either as null or as a UAObject");
562
574
  if (!options.conditionOf) {
563
575
  options.conditionOf = options.conditionSource;
564
576
  }
565
577
  if (options.conditionOf) {
566
- (0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(options, "conditionOf")); // must provide a conditionOf
578
+ (0, node_opcua_assert_1.assert)(Object.hasOwn(options, "conditionOf")); // must provide a conditionOf
567
579
  options.conditionOf = addressSpace._coerceNode(options.conditionOf);
568
580
  // HasCondition References can be used in the Type definition of an Object or a Variable.
569
- (0, node_opcua_assert_1.assert)(options.conditionOf.nodeClass === node_opcua_data_model_1.NodeClass.Object || options.conditionOf.nodeClass === node_opcua_data_model_1.NodeClass.Variable);
581
+ (0, node_opcua_assert_1.assert)(options.conditionOf?.nodeClass === node_opcua_data_model_1.NodeClass.Object || options.conditionOf?.nodeClass === node_opcua_data_model_1.NodeClass.Variable);
570
582
  conditionNode.addReference({
571
583
  isForward: false,
572
- nodeId: options.conditionOf,
584
+ nodeId: options.conditionOf || node_opcua_nodeid_1.NodeId.nullNodeId,
573
585
  referenceType: "HasCondition"
574
586
  });
575
- (0, node_opcua_assert_1.assert)(conditionNode.conditionOfNode().nodeId === options.conditionOf.nodeId);
576
587
  }
577
588
  // the constant property of this condition
578
589
  conditionNode.eventType.setValueFromSource({
@@ -614,7 +625,7 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
614
625
  // installing sourceName and sourceNode
615
626
  conditionNode.enabledState.setValue(true);
616
627
  // set properties to in initial values
617
- Object.entries(data).forEach(([key, value]) => {
628
+ Object.entries(data || {}).forEach(([key, value]) => {
618
629
  const varNode = _getCompositeKey(conditionNode, key);
619
630
  (0, node_opcua_assert_1.assert)(varNode.nodeClass === node_opcua_data_model_1.NodeClass.Variable);
620
631
  const variant = new node_opcua_variant_1.Variant(value);
@@ -622,7 +633,7 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
622
633
  // xx var nodeDataType = addressSpace.findNode(varNode.dataType).browseName;
623
634
  /* c8 ignore next */
624
635
  if (!varNode._validate_DataType(variant.dataType)) {
625
- throw new Error(" Invalid variant dataType " + variant + " " + varNode.browseName.toString());
636
+ throw new Error(` Invalid variant dataType ${variant} ${varNode.browseName.toString()}`);
626
637
  }
627
638
  varNode.setValueFromSource(variant);
628
639
  });
@@ -643,7 +654,7 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
643
654
  * @type {UAMethod}
644
655
  */
645
656
  conditionNode.addComment.bindMethod(_add_comment_method);
646
- (0, node_opcua_assert_1.assert)(conditionNode instanceof UAConditionImpl);
657
+ (0, node_opcua_assert_1.assert)(conditionNode instanceof exports.UAConditionImpl);
647
658
  // ConditionSource => cf SourceNode
648
659
  // As per spec OPCUA 1.03 part 9 page 54:
649
660
  // The ConditionType inherits all Properties of the BaseEventType. Their semantic is defined in
@@ -657,7 +668,8 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
657
668
  // with the motor.
658
669
  if (options.conditionSource) {
659
670
  options.conditionSource = addressSpace._coerceNode(options.conditionSource);
660
- if (options.conditionSource.nodeClass !== node_opcua_data_model_1.NodeClass.Object && options.conditionSource.nodeClass !== node_opcua_data_model_1.NodeClass.Variable) {
671
+ if (!options.conditionSource ||
672
+ (options.conditionSource.nodeClass !== node_opcua_data_model_1.NodeClass.Object && options.conditionSource.nodeClass !== node_opcua_data_model_1.NodeClass.Variable)) {
661
673
  debugLog(options.conditionSource);
662
674
  throw new Error("Expecting condition source to be NodeClass.Object or Variable");
663
675
  }
@@ -728,12 +740,12 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
728
740
  if (typeof options.conditionClass === "string") {
729
741
  options.conditionClass = addressSpace.findObjectType(options.conditionClass);
730
742
  if (!options.conditionClass) {
731
- throw new Error("cannot find condition class " + options.conditionClass);
743
+ throw new Error(`cannot find condition class ${options.conditionClass}`);
732
744
  }
733
745
  }
734
746
  const conditionClassNode = addressSpace._coerceNode(options.conditionClass);
735
747
  if (!conditionClassNode) {
736
- throw new Error("cannot find condition class " + options.conditionClass.toString());
748
+ throw new Error(`cannot find condition class ${options.conditionClass.toString()}`);
737
749
  }
738
750
  conditionClassId = conditionClassNode.nodeId;
739
751
  conditionClassName = conditionClassNode.displayName[0];
@@ -785,8 +797,8 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
785
797
  offset: 0
786
798
  }));
787
799
  branch0.setMessage("");
788
- branch0.setReceiveTime((0, node_opcua_basic_types_3.getMinOPCUADate)());
789
- branch0.setTime((0, node_opcua_basic_types_3.getMinOPCUADate)());
800
+ branch0.setReceiveTime((0, node_opcua_basic_types_1.getMinOPCUADate)());
801
+ branch0.setTime((0, node_opcua_basic_types_1.getMinOPCUADate)());
790
802
  return conditionNode;
791
803
  }
792
804
  function _disable_method(inputArguments, context, callback) {
@@ -794,7 +806,7 @@ function _disable_method(inputArguments, context, callback) {
794
806
  const conditionNode = context.object;
795
807
  (0, node_opcua_assert_1.assert)(conditionNode);
796
808
  // c8 ignore next
797
- if (!(conditionNode instanceof UAConditionImpl)) {
809
+ if (!(conditionNode instanceof exports.UAConditionImpl)) {
798
810
  debugLog("conditionNode is not a UACondition ", conditionNode?.toString());
799
811
  return callback(null, {
800
812
  statusCode: node_opcua_status_code_1.StatusCodes.BadNodeIdInvalid
@@ -809,7 +821,7 @@ function _enable_method(inputArguments, context, callback) {
809
821
  (0, node_opcua_assert_1.assert)(inputArguments.length === 0);
810
822
  const conditionNode = context.object;
811
823
  (0, node_opcua_assert_1.assert)(conditionNode);
812
- if (!(conditionNode instanceof UAConditionImpl)) {
824
+ if (!(conditionNode instanceof exports.UAConditionImpl)) {
813
825
  return callback(null, {
814
826
  statusCode: node_opcua_status_code_1.StatusCodes.BadNodeIdInvalid
815
827
  });
@@ -822,7 +834,7 @@ function _enable_method(inputArguments, context, callback) {
822
834
  function _condition_refresh_method(inputArguments, context, callback) {
823
835
  // arguments : IntegerId SubscriptionId
824
836
  (0, node_opcua_assert_1.assert)(inputArguments.length === 1);
825
- const addressSpace = context.object.addressSpace;
837
+ const addressSpace = context.object?.addressSpace;
826
838
  // c8 ignore next
827
839
  if (doDebug) {
828
840
  debugLog(chalk_1.default.red(" ConditionType.ConditionRefresh ! subscriptionId ="), inputArguments[0].toString());
@@ -837,7 +849,7 @@ function _condition_refresh_method(inputArguments, context, callback) {
837
849
  statusCode
838
850
  });
839
851
  }
840
- function _perform_condition_refresh(addressSpace, inputArguments, context) {
852
+ function _perform_condition_refresh(addressSpace, _inputArguments, context) {
841
853
  // --- possible StatusCodes:
842
854
  //
843
855
  // Bad_SubscriptionIdInvalid See Part 4 for the description of this result code
@@ -851,16 +863,22 @@ function _perform_condition_refresh(addressSpace, inputArguments, context) {
851
863
  return node_opcua_status_code_1.StatusCodes.BadRefreshInProgress;
852
864
  }
853
865
  addressSpace._condition_refresh_in_progress = true;
854
- const server = context.object.addressSpace.rootFolder.objects.server;
866
+ const server = context.object?.addressSpace.rootFolder.objects.server;
855
867
  const refreshStartEventType = addressSpace.findEventType("RefreshStartEventType");
868
+ if (!refreshStartEventType) {
869
+ throw new Error("cannot find RefreshStartEventType");
870
+ }
856
871
  const refreshEndEventType = addressSpace.findEventType("RefreshEndEventType");
857
- server.raiseEvent(refreshStartEventType, {});
872
+ if (!refreshEndEventType) {
873
+ throw new Error("cannot find RefreshEndEventType");
874
+ }
875
+ server?.raiseEvent(refreshStartEventType, {});
858
876
  // todo : resend retained conditions
859
877
  const _server = server;
860
878
  // starting from server object ..
861
879
  // evaluated all --> hasNotifier/hasEventSource -> node
862
880
  _server._conditionRefresh();
863
- server.raiseEvent(refreshEndEventType, {});
881
+ server?.raiseEvent(refreshEndEventType, {});
864
882
  addressSpace._condition_refresh_in_progress = false;
865
883
  return node_opcua_status_code_1.StatusCodes.Good;
866
884
  }
@@ -898,9 +916,9 @@ function _add_comment_method(inputArguments, context, callback) {
898
916
  //
899
917
  // AlwaysGeneratesEvent AuditConditionCommentEventType
900
918
  //
901
- UAConditionImpl.with_condition_method(inputArguments, context, callback, (conditionEventId, comment, branch, conditionNode) => {
902
- (0, node_opcua_assert_1.assert)(inputArguments instanceof Array);
903
- (0, node_opcua_assert_1.assert)(conditionEventId instanceof Buffer || conditionEventId === null);
919
+ UAConditionImplBase.with_condition_method(inputArguments, context, callback, (conditionEventId, comment, branch, conditionNode) => {
920
+ (0, node_opcua_assert_1.assert)(Array.isArray(inputArguments));
921
+ (0, node_opcua_assert_1.assert)(Buffer.isBuffer(conditionEventId) || conditionEventId === null);
904
922
  (0, node_opcua_assert_1.assert)(branch instanceof condition_snapshot_impl_1.ConditionSnapshotImpl);
905
923
  branch.setComment(comment);
906
924
  const sourceName = "Method/AddComment";
@@ -930,7 +948,7 @@ function sameBuffer(b1, b2) {
930
948
  }
931
949
  (0, node_opcua_assert_1.assert)(b1 instanceof Buffer);
932
950
  (0, node_opcua_assert_1.assert)(b2 instanceof Buffer);
933
- if (b1.length !== b2.length) {
951
+ if (b1?.length !== b2?.length) {
934
952
  return false;
935
953
  }
936
954
  /*
@@ -938,16 +956,16 @@ function sameBuffer(b1, b2) {
938
956
  var bb2 = (Buffer.from(b2)).toString("hex");
939
957
  return bb1 === bb2;
940
958
  */
941
- const n = b1.length;
959
+ const n = b1?.length || 0;
942
960
  for (let i = 0; i < n; i++) {
943
- if (b1[i] !== b2[i]) {
961
+ if (b1?.[i] !== b2?.[i]) {
944
962
  return false;
945
963
  }
946
964
  }
947
965
  return true;
948
966
  }
949
967
  function _create_new_branch_id() {
950
- return (0, node_opcua_nodeid_1.makeNodeId)((0, node_opcua_basic_types_2.randomGuid)(), 1);
968
+ return (0, node_opcua_nodeid_1.makeNodeId)((0, node_opcua_basic_types_1.randomGuid)(), 1);
951
969
  }
952
970
  // tslint:disable:no-console
953
971
  function _install_condition_variable_type(node) {
@@ -978,8 +996,8 @@ function _getCompositeKey(node, key) {
978
996
  const elements = key.split(".");
979
997
  for (const e of elements) {
980
998
  // c8 ignore next
981
- if (!Object.prototype.hasOwnProperty.call(cur, e)) {
982
- throw new Error(" cannot extract '" + key + "' from " + node.browseName.toString());
999
+ if (!Object.hasOwn(cur, e)) {
1000
+ throw new Error(` cannot extract '${key}' from ${node.browseName.toString()}`);
983
1001
  }
984
1002
  cur = cur[e];
985
1003
  }
@@ -991,7 +1009,7 @@ function _getCompositeKey(node, key) {
991
1009
  * @param context {Object}
992
1010
  * @private
993
1011
  */
994
- function _check_subscription_id_is_valid(subscriptionId, context) {
1012
+ function _check_subscription_id_is_valid(_subscriptionId, _context) {
995
1013
  /// todo: return StatusCodes.BadSubscriptionIdInvalid; if subscriptionId doesn't belong to session...
996
1014
  return node_opcua_status_code_1.StatusCodes.Good;
997
1015
  }