node-opcua-address-space 2.169.0 → 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 (467) 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.d.ts +2 -3
  120. package/dist/source/ua_interface.js +13 -33
  121. package/dist/source/ua_interface.js.map +1 -1
  122. package/dist/source/ua_root_folder.d.ts +1 -1
  123. package/dist/source/ua_two_state_variable_ex.d.ts +5 -5
  124. package/dist/src/_instantiate_helpers.d.ts +1 -1
  125. package/dist/src/_instantiate_helpers.js +32 -9
  126. package/dist/src/_instantiate_helpers.js.map +1 -1
  127. package/dist/src/_mandatory_child_or_requested_optional_filter.d.ts +2 -2
  128. package/dist/src/_mandatory_child_or_requested_optional_filter.js +9 -10
  129. package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +1 -1
  130. package/dist/src/address_space.d.ts +2 -2
  131. package/dist/src/address_space.js +13 -15
  132. package/dist/src/address_space.js.map +1 -1
  133. package/dist/src/address_space_change_event_tools.d.ts +3 -3
  134. package/dist/src/address_space_change_event_tools.js +8 -10
  135. package/dist/src/address_space_change_event_tools.js.map +1 -1
  136. package/dist/src/address_space_private.d.ts +11 -11
  137. package/dist/src/address_space_private.js +3 -0
  138. package/dist/src/address_space_private.js.map +1 -1
  139. package/dist/src/alarms_and_conditions/condition.js.map +1 -1
  140. package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +6 -6
  141. package/dist/src/alarms_and_conditions/condition_info_impl.js +6 -15
  142. package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -1
  143. package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +10 -10
  144. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +77 -48
  145. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
  146. package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +8 -5
  147. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +15 -9
  148. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
  149. package/dist/src/alarms_and_conditions/index.d.ts +3 -3
  150. package/dist/src/alarms_and_conditions/index.js +3 -3
  151. package/dist/src/alarms_and_conditions/index.js.map +1 -1
  152. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +21 -14
  153. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +26 -21
  154. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
  155. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +6 -7
  156. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +30 -28
  157. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
  158. package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +9 -11
  159. package/dist/src/alarms_and_conditions/ua_base_event_impl.js +10 -10
  160. package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
  161. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +3 -1
  162. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +6 -5
  163. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
  164. package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +16 -42
  165. package/dist/src/alarms_and_conditions/ua_condition_impl.js +100 -82
  166. package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
  167. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +12 -7
  168. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +9 -8
  169. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
  170. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +18 -18
  171. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +16 -18
  172. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
  173. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +4 -4
  174. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +2 -2
  175. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
  176. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +10 -9
  177. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +20 -19
  178. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
  179. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +2 -4
  180. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -1
  181. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +12 -38
  182. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +50 -65
  183. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
  184. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +15 -17
  185. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +15 -11
  186. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
  187. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +22 -15
  188. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +35 -24
  189. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
  190. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +15 -16
  191. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +19 -14
  192. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
  193. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +4 -4
  194. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +1 -1
  195. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
  196. package/dist/src/apply_condition_refresh.d.ts +4 -4
  197. package/dist/src/apply_condition_refresh.js +1 -1
  198. package/dist/src/apply_condition_refresh.js.map +1 -1
  199. package/dist/src/base_node_impl.d.ts +5 -7
  200. package/dist/src/base_node_impl.js +3 -3
  201. package/dist/src/base_node_impl.js.map +1 -1
  202. package/dist/src/base_node_private.d.ts +10 -7
  203. package/dist/src/base_node_private.js +73 -50
  204. package/dist/src/base_node_private.js.map +1 -1
  205. package/dist/src/check_value_rank_compatibility.js +11 -7
  206. package/dist/src/check_value_rank_compatibility.js.map +1 -1
  207. package/dist/src/data_access/add_dataItem_stuff.d.ts +1 -1
  208. package/dist/src/data_access/add_dataItem_stuff.js +2 -22
  209. package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
  210. package/dist/src/data_access/adjust_datavalue_status_code.d.ts +6 -3
  211. package/dist/src/data_access/adjust_datavalue_status_code.js +3 -3
  212. package/dist/src/data_access/adjust_datavalue_status_code.js.map +1 -1
  213. package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +13 -11
  214. package/dist/src/data_access/ua_multistate_discrete_impl.js +28 -23
  215. package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
  216. package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +19 -23
  217. package/dist/src/data_access/ua_multistate_value_discrete_impl.js +31 -31
  218. package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
  219. package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +10 -16
  220. package/dist/src/data_access/ua_two_state_discrete_impl.js +18 -14
  221. package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
  222. package/dist/src/event_data.d.ts +8 -21
  223. package/dist/src/event_data.js +24 -19
  224. package/dist/src/event_data.js.map +1 -1
  225. package/dist/src/extension_object_array_node.d.ts +5 -2
  226. package/dist/src/extension_object_array_node.js +21 -24
  227. package/dist/src/extension_object_array_node.js.map +1 -1
  228. package/dist/src/get_basic_datatype.d.ts +2 -2
  229. package/dist/src/get_basic_datatype.js.map +1 -1
  230. package/dist/src/historical_access/address_space_historical_data_node.d.ts +3 -3
  231. package/dist/src/historical_access/address_space_historical_data_node.js +24 -17
  232. package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
  233. package/dist/src/idx_iterator.js +1 -1
  234. package/dist/src/idx_iterator.js.map +1 -1
  235. package/dist/src/index_current.d.ts +31 -31
  236. package/dist/src/index_current.js +45 -45
  237. package/dist/src/index_current.js.map +1 -1
  238. package/dist/src/namespace_impl.d.ts +4 -3
  239. package/dist/src/namespace_impl.js +17 -14
  240. package/dist/src/namespace_impl.js.map +1 -1
  241. package/dist/src/namespace_private.js.map +1 -1
  242. package/dist/src/nodeid_manager.d.ts +3 -3
  243. package/dist/src/nodeid_manager.js +19 -16
  244. package/dist/src/nodeid_manager.js.map +1 -1
  245. package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +1 -1
  246. package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -2
  247. package/dist/src/nodeset_tools/construct_namespace_dependency.js +7 -7
  248. package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -1
  249. package/dist/src/nodeset_tools/dump_to_bsd.d.ts +1 -1
  250. package/dist/src/nodeset_tools/dump_to_bsd.js +15 -11
  251. package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -1
  252. package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +5 -3
  253. package/dist/src/nodeset_tools/nodeset_to_xml.js +64 -67
  254. package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
  255. package/dist/src/private_namespace.d.ts +2 -2
  256. package/dist/src/private_namespace.js.map +1 -1
  257. package/dist/src/reference_impl.d.ts +2 -2
  258. package/dist/src/reference_impl.js +9 -11
  259. package/dist/src/reference_impl.js.map +1 -1
  260. package/dist/src/role_permissions.d.ts +1 -1
  261. package/dist/src/role_permissions.js.map +1 -1
  262. package/dist/src/state_machine/finite_state_machine.d.ts +11 -14
  263. package/dist/src/state_machine/finite_state_machine.js +36 -30
  264. package/dist/src/state_machine/finite_state_machine.js.map +1 -1
  265. package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +8 -6
  266. package/dist/src/state_machine/ua_shelving_state_machine_ex.js +16 -18
  267. package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
  268. package/dist/src/state_machine/ua_two_state_variable.d.ts +12 -11
  269. package/dist/src/state_machine/ua_two_state_variable.js +24 -29
  270. package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
  271. package/dist/src/tool_isSubtypeOf.d.ts +5 -5
  272. package/dist/src/tool_isSubtypeOf.js +21 -18
  273. package/dist/src/tool_isSubtypeOf.js.map +1 -1
  274. package/dist/src/ua_condition_type.d.ts +1 -1
  275. package/dist/src/ua_data_type_impl.js.map +1 -1
  276. package/dist/src/ua_method_impl.d.ts +9 -5
  277. package/dist/src/ua_method_impl.js +1 -1
  278. package/dist/src/ua_method_impl.js.map +1 -1
  279. package/dist/src/ua_object_impl.d.ts +10 -7
  280. package/dist/src/ua_object_impl.js +43 -15
  281. package/dist/src/ua_object_impl.js.map +1 -1
  282. package/dist/src/ua_object_type_impl.d.ts +7 -5
  283. package/dist/src/ua_object_type_impl.js +6 -7
  284. package/dist/src/ua_object_type_impl.js.map +1 -1
  285. package/dist/src/ua_reference_type_impl.d.ts +6 -8
  286. package/dist/src/ua_reference_type_impl.js +16 -14
  287. package/dist/src/ua_reference_type_impl.js.map +1 -1
  288. package/dist/src/ua_variable_impl.d.ts +44 -45
  289. package/dist/src/ua_variable_impl.js +177 -83
  290. package/dist/src/ua_variable_impl.js.map +1 -1
  291. package/dist/src/ua_variable_impl_ext_obj.d.ts +3 -3
  292. package/dist/src/ua_variable_impl_ext_obj.js +37 -29
  293. package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
  294. package/dist/src/ua_variable_type_impl.d.ts +11 -11
  295. package/dist/src/ua_variable_type_impl.js +13 -21
  296. package/dist/src/ua_variable_type_impl.js.map +1 -1
  297. package/dist/src/ua_view_impl.d.ts +3 -4
  298. package/dist/src/ua_view_impl.js +5 -6
  299. package/dist/src/ua_view_impl.js.map +1 -1
  300. package/dist/src/validate_data_type_correctness.d.ts +2 -2
  301. package/dist/src/validate_data_type_correctness.js +12 -3
  302. package/dist/src/validate_data_type_correctness.js.map +1 -1
  303. package/dist/tsconfig_base.tsbuildinfo +1 -1
  304. package/distHelpers/add_event_generator_object.d.ts +5 -2
  305. package/distHelpers/add_event_generator_object.js +2 -2
  306. package/distHelpers/add_event_generator_object.js.map +1 -1
  307. package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
  308. package/distHelpers/alarms_and_conditions_demo.js +4 -6
  309. package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
  310. package/distHelpers/assertHasMatchingReference.d.ts +1 -1
  311. package/distHelpers/assertHasMatchingReference.js +2 -2
  312. package/distHelpers/assertHasMatchingReference.js.map +1 -1
  313. package/distHelpers/boiler_system.d.ts +6 -3
  314. package/distHelpers/boiler_system.js +44 -42
  315. package/distHelpers/boiler_system.js.map +1 -1
  316. package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
  317. package/distHelpers/create_minimalist_address_space_nodeset.js +25 -27
  318. package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
  319. package/distHelpers/get_address_space_fixture.js +15 -15
  320. package/distHelpers/get_address_space_fixture.js.map +1 -1
  321. package/distHelpers/index.d.ts +2 -2
  322. package/distHelpers/index.js +2 -2
  323. package/distHelpers/index.js.map +1 -1
  324. package/distHelpers/mock_session.d.ts +7 -7
  325. package/distHelpers/mock_session.js +4 -4
  326. package/distHelpers/mock_session.js.map +1 -1
  327. package/distNodeJS/generate_address_space.d.ts +2 -2
  328. package/distNodeJS/generate_address_space.js +2 -2
  329. package/distNodeJS/generate_address_space.js.map +1 -1
  330. package/package.json +36 -36
  331. package/source/address_space_ts.ts +29 -30
  332. package/source/continuation_points/continuation_point_manager.ts +8 -7
  333. package/source/helpers/adjust_browse_direction.ts +1 -1
  334. package/source/helpers/argument_list.ts +37 -25
  335. package/source/helpers/call_helpers.ts +10 -15
  336. package/source/helpers/coerce_enum_value.ts +4 -4
  337. package/source/helpers/dump_tools.ts +6 -11
  338. package/source/helpers/ensure_secure_access.ts +2 -2
  339. package/source/helpers/make_optionals_map.ts +3 -10
  340. package/source/helpers/multiform_func.ts +1 -1
  341. package/source/helpers/resolve_opaque_on_address_space.ts +2 -2
  342. package/source/index.ts +44 -54
  343. package/source/interfaces/alarms_and_conditions/condition_info_i.ts +3 -4
  344. package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +13 -13
  345. package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +8 -10
  346. package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +4 -5
  347. package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +4 -6
  348. package/source/interfaces/alarms_and_conditions/instantiate_condition_options.ts +3 -3
  349. package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +2 -2
  350. package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +2 -2
  351. package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +6 -3
  352. package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +2 -2
  353. package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +2 -2
  354. package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +11 -11
  355. package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +11 -25
  356. package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +16 -13
  357. package/source/interfaces/alarms_and_conditions/ua_base_event_ex.ts +12 -0
  358. package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +5 -5
  359. package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +30 -54
  360. package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +3 -34
  361. package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +18 -22
  362. package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +8 -15
  363. package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +4 -7
  364. package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +5 -6
  365. package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +3 -3
  366. package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +9 -16
  367. package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +5 -8
  368. package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +5 -5
  369. package/source/interfaces/data_access/ua_y_array_item_ex.ts +3 -3
  370. package/source/interfaces/extension_object_constructor.ts +3 -4
  371. package/source/interfaces/i_condition_variable_type_setter_options.ts +1 -3
  372. package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +3 -3
  373. package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +2 -2
  374. package/source/interfaces/state_machine/ua_program_state_machine_type.ts +3 -3
  375. package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +10 -7
  376. package/source/interfaces/state_machine/ua_state_machine_type.ts +11 -8
  377. package/source/interfaces/state_machine/ua_transition_ex.ts +2 -2
  378. package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +3 -2
  379. package/source/loader/decode_xml_extension_object.ts +7 -7
  380. package/source/loader/ensure_datatype_extracted.ts +14 -19
  381. package/source/loader/generateAddressSpaceRaw.ts +12 -13
  382. package/source/loader/load_nodeset2.ts +3 -3
  383. package/source/loader/make_xml_extension_object_parser.ts +55 -39
  384. package/source/loader/namespace_post_step.ts +3 -4
  385. package/source/loader/parsers/extension_object_parser.ts +63 -62
  386. package/source/loader/parsers/localized_text_parser.ts +3 -3
  387. package/source/loader/parsers/nodeid_parser.ts +2 -3
  388. package/source/loader/parsers/qualified_name_parser.ts +6 -7
  389. package/source/loader/parsers/variant_parser.ts +48 -55
  390. package/source/loader/register_node_promoter.ts +2 -2
  391. package/source/namespace.ts +4 -4
  392. package/source/namespace_alarm_and_condition.ts +22 -22
  393. package/source/namespace_data_access.ts +12 -13
  394. package/source/namespace_machine_state.ts +10 -5
  395. package/source/pseudo_session.ts +53 -50
  396. package/source/session_context.ts +1 -1
  397. package/source/set_namespace_meta_data.ts +3 -3
  398. package/source/ua_addin.ts +10 -11
  399. package/source/ua_interface.ts +27 -38
  400. package/source/ua_root_folder.ts +1 -1
  401. package/source/ua_two_state_variable_ex.ts +5 -5
  402. package/source_nodejs/generate_address_space.ts +5 -9
  403. package/src/_instantiate_helpers.ts +78 -25
  404. package/src/_mandatory_child_or_requested_optional_filter.ts +20 -19
  405. package/src/address_space.ts +36 -45
  406. package/src/address_space_change_event_tools.ts +25 -30
  407. package/src/address_space_private.ts +20 -21
  408. package/src/alarms_and_conditions/condition.ts +0 -2
  409. package/src/alarms_and_conditions/condition_info_impl.ts +11 -19
  410. package/src/alarms_and_conditions/condition_snapshot_impl.ts +109 -85
  411. package/src/alarms_and_conditions/deviation_alarm_helper.ts +20 -15
  412. package/src/alarms_and_conditions/index.ts +3 -3
  413. package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +44 -32
  414. package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +35 -34
  415. package/src/alarms_and_conditions/ua_base_event_impl.ts +15 -19
  416. package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +6 -2
  417. package/src/alarms_and_conditions/ua_condition_impl.ts +140 -130
  418. package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +20 -12
  419. package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +40 -43
  420. package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +7 -7
  421. package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +28 -30
  422. package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +3 -6
  423. package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +59 -90
  424. package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +31 -27
  425. package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +57 -36
  426. package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +31 -27
  427. package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +6 -6
  428. package/src/apply_condition_refresh.ts +7 -8
  429. package/src/base_node_impl.ts +64 -45
  430. package/src/base_node_private.ts +171 -139
  431. package/src/check_value_rank_compatibility.ts +19 -15
  432. package/src/data_access/add_dataItem_stuff.ts +3 -4
  433. package/src/data_access/adjust_datavalue_status_code.ts +7 -7
  434. package/src/data_access/ua_multistate_discrete_impl.ts +44 -28
  435. package/src/data_access/ua_multistate_value_discrete_impl.ts +77 -66
  436. package/src/data_access/ua_two_state_discrete_impl.ts +29 -36
  437. package/src/event_data.ts +29 -26
  438. package/src/extension_object_array_node.ts +27 -28
  439. package/src/get_basic_datatype.ts +4 -5
  440. package/src/historical_access/address_space_historical_data_node.ts +65 -50
  441. package/src/idx_iterator.ts +4 -12
  442. package/src/index_current.ts +33 -45
  443. package/src/namespace_impl.ts +75 -62
  444. package/src/namespace_private.ts +2 -8
  445. package/src/nodeid_manager.ts +30 -27
  446. package/src/nodeset_tools/adjust_namespace_array.ts +1 -1
  447. package/src/nodeset_tools/construct_namespace_dependency.ts +15 -16
  448. package/src/nodeset_tools/dump_to_bsd.ts +27 -22
  449. package/src/nodeset_tools/nodeset_to_xml.ts +95 -114
  450. package/src/private_namespace.ts +3 -6
  451. package/src/reference_impl.ts +11 -14
  452. package/src/role_permissions.ts +1 -1
  453. package/src/state_machine/finite_state_machine.ts +60 -61
  454. package/src/state_machine/ua_shelving_state_machine_ex.ts +23 -23
  455. package/src/state_machine/ua_two_state_variable.ts +34 -31
  456. package/src/tool_isSubtypeOf.ts +48 -33
  457. package/src/ua_condition_type.ts +1 -1
  458. package/src/ua_data_type_impl.ts +12 -13
  459. package/src/ua_method_impl.ts +17 -12
  460. package/src/ua_object_impl.ts +73 -39
  461. package/src/ua_object_type_impl.ts +25 -25
  462. package/src/ua_reference_type_impl.ts +19 -19
  463. package/src/ua_variable_impl.ts +316 -219
  464. package/src/ua_variable_impl_ext_obj.ts +63 -50
  465. package/src/ua_variable_type_impl.ts +43 -49
  466. package/src/ua_view_impl.ts +5 -5
  467. package/src/validate_data_type_correctness.ts +17 -8
@@ -3,26 +3,11 @@
3
3
  * @module node-opcua-address-space
4
4
  */
5
5
  // produce nodeset xml files
6
- import { types } from "util";
7
- import { assert } from "node-opcua-assert";
8
- import { ObjectIds, VariableIds } from "node-opcua-constants";
9
- import { make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
10
- import { ExtensionObject } from "node-opcua-extension-object";
11
- import {
12
- BrowseDirection,
13
- LocalizedText,
14
- makeNodeClassMask,
15
- makeResultMask,
16
- NodeClass,
17
- makeAccessLevelFlag,
18
- QualifiedName
19
- } from "node-opcua-data-model";
20
- import { NodeId, NodeIdType, resolveNodeId } from "node-opcua-nodeid";
21
- import { lowerFirstLetter, isNullOrUndefined } from "node-opcua-utils";
22
- import { Variant, VariantArrayType, DataType } from "node-opcua-variant";
23
- import {
24
- IAddressSpace,
6
+
7
+ import { types } from "node:util";
8
+ import type {
25
9
  BaseNode,
10
+ IAddressSpace,
26
11
  UADataType,
27
12
  UAMethod,
28
13
  UAObject,
@@ -32,31 +17,44 @@ import {
32
17
  UAVariableType,
33
18
  UAView
34
19
  } from "node-opcua-address-space-base";
35
- import { AttributeIds, Int64, isMinDate, StatusCode } from "node-opcua-basic-types";
20
+ import { assert } from "node-opcua-assert";
21
+ import { AttributeIds, type Int64, isMinDate, type StatusCode } from "node-opcua-basic-types";
22
+ import { ObjectIds, VariableIds } from "node-opcua-constants";
23
+ import {
24
+ BrowseDirection,
25
+ type LocalizedText,
26
+ makeAccessLevelFlag,
27
+ makeNodeClassMask,
28
+ makeResultMask,
29
+ NodeClass,
30
+ QualifiedName
31
+ } from "node-opcua-data-model";
32
+ import { make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
33
+ import type { ExtensionObject } from "node-opcua-extension-object";
34
+ import { NodeId, NodeIdType, resolveNodeId } from "node-opcua-nodeid";
36
35
  import { BrowseDescription, EnumDefinition, StructureDefinition, StructureType } from "node-opcua-types";
37
-
38
- import { XmlWriter } from "../../source/xml_writer";
39
- import { ReferenceImpl } from "../reference_impl";
36
+ import { isNullOrUndefined, lowerFirstLetter } from "node-opcua-utils";
37
+ import { DataType, Variant, VariantArrayType } from "node-opcua-variant";
38
+ import { makeDefinitionMap } from "../../source/loader/decode_xml_extension_object";
39
+ import type { DefinitionMap2 } from "../../source/loader/make_xml_extension_object_parser";
40
+ import type { XmlWriter } from "../../source/xml_writer";
40
41
  import { BaseNodeImpl, getReferenceType } from "../base_node_impl";
41
- import { UAReferenceTypeImpl } from "../ua_reference_type_impl";
42
- import { UAObjectTypeImpl } from "../ua_object_type_impl";
43
- import { UAVariableImpl } from "../ua_variable_impl";
44
- import { UAObjectImpl } from "../ua_object_impl";
42
+ import { SessionContext } from "../index_current";
45
43
  import { NamespaceImpl } from "../namespace_impl";
46
- import { UAMethodImpl } from "../ua_method_impl";
44
+ import { ReferenceImpl } from "../reference_impl";
47
45
  import { UADataTypeImpl } from "../ua_data_type_impl";
46
+ import { UAMethodImpl } from "../ua_method_impl";
47
+ import { UAObjectImpl } from "../ua_object_impl";
48
+ import { UAObjectTypeImpl } from "../ua_object_type_impl";
49
+ import { UAReferenceTypeImpl } from "../ua_reference_type_impl";
50
+ import { UAVariableImpl } from "../ua_variable_impl";
48
51
  import { UAVariableTypeImpl } from "../ua_variable_type_impl";
49
- import { AddressSpace, SessionContext } from "../index_current";
50
52
  import { UAViewImpl } from "../ua_view_impl";
51
-
52
- import { DefinitionMap2 } from "../../source/loader/make_xml_extension_object_parser";
53
- import { makeDefinitionMap } from "../../source/loader/decode_xml_extension_object";
54
53
  import {
55
54
  _constructNamespaceTranslationTable,
56
55
  constructNamespaceDependency,
57
56
  constructNamespacePriorityTable
58
57
  } from "./construct_namespace_dependency";
59
- import { start } from "repl";
60
58
 
61
59
  // tslint:disable:no-var-requires
62
60
  const XMLWriter = require("xml-writer");
@@ -71,12 +69,12 @@ function _hash(node: BaseNode | UAReference): string {
71
69
  }
72
70
 
73
71
  function _dumpDisplayName(xw: XmlWriter, node: BaseNode): void {
74
- if (node.displayName && node.displayName[0]) {
72
+ if (node.displayName?.[0]) {
75
73
  xw.startElement("DisplayName").text(node.displayName[0].text!).endElement();
76
74
  }
77
75
  }
78
76
  function _dumpDescription(xw: XmlWriter, node: { description?: LocalizedText }): void {
79
- if (node.description && node.description.text && node.description.text.length) {
77
+ if (node.description?.text?.length) {
80
78
  let desc = node.description.text;
81
79
  desc = desc || "";
82
80
  xw.startElement("Description").text(desc).endElement();
@@ -192,7 +190,7 @@ function _dumpReferences(xw: XmlWriter, node: BaseNode) {
192
190
  }
193
191
  function _dumpLocalizedText(xw: XmlWriter, v: LocalizedText) {
194
192
  const uax = getPrefix(xw, "http://opcfoundation.org/UA/2008/02/Types.xsd");
195
- if (v.locale && v.locale.length) {
193
+ if (v.locale?.length) {
196
194
  xw.startElement(`${uax}Locale`);
197
195
  xw.text(v.locale);
198
196
  xw.endElement();
@@ -264,14 +262,14 @@ function findXsdNamespaceUri(xw: XmlWriter, nodeId: NodeId): string {
264
262
  if (!namespace) {
265
263
  return "";
266
264
  }
267
- return namespace.replace(/\/$/, "") + "/Types.xsd";
265
+ return `${namespace.replace(/\/$/, "")}/Types.xsd`;
268
266
  }
269
267
 
270
268
  function getPrefix(xw: XmlWriter, namespace: XmlNamespaceUri): XmlNs {
271
269
  const xwe = xw as XmlWriterEx;
272
270
  if (!xwe.map) return "";
273
271
  const p = xwe.map[namespace] || "";
274
- return p ? p + ":" : "";
272
+ return p ? `${p}:` : "";
275
273
  }
276
274
 
277
275
  function restoreDefaultNamespace(xw: XmlWriter) {
@@ -293,8 +291,8 @@ function setDefaultNamespace(xw: XmlWriter, namespace: XmlNamespaceUri): void {
293
291
  xwe.map[namespace] = "";
294
292
  }
295
293
 
296
- function startElementEx(xw: XmlWriter, ns: XmlNs, name: string, defaultNamespace: XmlNamespaceUri) {
297
- const xwe = xw as XmlWriterEx;
294
+ function startElementEx(xw: XmlWriter, _ns: XmlNs, name: string, defaultNamespace: XmlNamespaceUri) {
295
+ const _xwe = xw as XmlWriterEx;
298
296
  xw.startElement(name);
299
297
  setDefaultNamespace(xw, defaultNamespace);
300
298
  }
@@ -306,13 +304,7 @@ function _dumpNodeId(xw: XmlWriter, v: NodeId) {
306
304
  xw.endElement();
307
305
  }
308
306
 
309
- function _dumpVariantValue(
310
- xw: XmlWriter,
311
- dataTypeNodeId: NodeId,
312
- dataType: DataType,
313
- addressSpace: IAddressSpace,
314
- value: any
315
- ) {
307
+ function _dumpVariantValue(xw: XmlWriter, dataTypeNodeId: NodeId, dataType: DataType, addressSpace: IAddressSpace, value: any) {
316
308
  if (value === undefined || value === null) {
317
309
  return;
318
310
  }
@@ -336,7 +328,8 @@ function _dumpVariantInnerExtensionObject(
336
328
  const namespaceUri = findXsdNamespaceUri(xw, definition.defaultEncodingId);
337
329
  const ns = getPrefix(xw, namespaceUri);
338
330
 
339
- const isUnion = definition.structureType === StructureType.Union || definition.structureType === StructureType.UnionWithSubtypedValues;
331
+ const isUnion =
332
+ definition.structureType === StructureType.Union || definition.structureType === StructureType.UnionWithSubtypedValues;
340
333
 
341
334
  for (const field of definition.fields || []) {
342
335
  const dataTypeNodeId = field.dataType;
@@ -359,20 +352,19 @@ function _dumpVariantInnerExtensionObject(
359
352
  startElementEx(xw, ns, fieldName, namespaceUri);
360
353
  // xw.startElement(fieldName);
361
354
 
362
- let fun: (value: any) => void = (value: any) => {
355
+ let fun: (value: any) => void = (_value: any) => {
363
356
  /** */
364
357
  };
365
358
  if (definition instanceof StructureDefinition) {
366
359
  fun = _dumpVariantInnerExtensionObject.bind(null, xw, definitionMap, definition, addressSpace);
367
360
  } else if (definition instanceof EnumDefinition) {
368
361
  fun = _dumpVariantInnerValueEnum.bind(null, xw, definition);
369
- } else if (definition?.dataType == DataType.Variant) {
370
- fun = (value: Variant)=> {
371
-
362
+ } else if (definition?.dataType === DataType.Variant) {
363
+ fun = (value: Variant) => {
372
364
  xw.startElement("Value");
373
365
  _dumpVariantValue(xw, field.dataType, value.dataType, addressSpace, value.value);
374
366
  xw.endElement();
375
- }
367
+ };
376
368
  } else {
377
369
  const baseType = definition.dataType;
378
370
  fun = _dumpVariantInnerValue.bind(null, xw, baseType, dataTypeNodeId, definitionMap, addressSpace);
@@ -493,7 +485,7 @@ function _dumpVariantInnerValue(
493
485
  _dumpVariantInnerValue(xw, value.dataType, dataTypeNodeId, definitionMap, addressSpace, value.value);
494
486
  break;
495
487
  default:
496
- errorLog("_dumpVariantInnerValue incomplete " + value + " " + "DataType=" + dataType + "=" + DataType[dataType]);
488
+ errorLog(`_dumpVariantInnerValue incomplete ${value} DataType=${dataType}=${DataType[dataType]}`);
497
489
  // throw new Error("_dumpVariantInnerValue incomplete " + value + " " + "DataType=" + dataType + "=" + DataType[dataType]);
498
490
  }
499
491
  }
@@ -545,23 +537,15 @@ function _dumpVariantExtensionObjectValue(
545
537
  {
546
538
  const uax = getPrefix(xw, "http://opcfoundation.org/UA/2008/02/Types.xsd");
547
539
  xw.startElement(`${uax}TypeId`);
548
- {
549
- // find HasEncoding node
550
- // xx var encodingDefaultXml = schema.encodingDefaultXml;
551
- xw.startElement(`${uax}Identifier`);
552
- xw.text(n(xw, encodingDefaultXml));
553
- xw.endElement();
554
- }
540
+ // find HasEncoding node
541
+ // xx var encodingDefaultXml = schema.encodingDefaultXml;
542
+ xw.startElement(`${uax}Identifier`);
543
+ xw.text(n(xw, encodingDefaultXml));
544
+ xw.endElement();
555
545
  xw.endElement();
556
546
  startElementEx(xw, uax, "Body", "http://opcfoundation.org/UA/2008/02/Types.xsd");
557
547
 
558
- _dumpVariantExtensionObjectValue_Body(
559
- xw,
560
- definitionMap,
561
- name,
562
- definition as StructureDefinition,
563
- addressSpace,
564
- value);
548
+ _dumpVariantExtensionObjectValue_Body(xw, definitionMap, name, definition as StructureDefinition, addressSpace, value);
565
549
 
566
550
  restoreDefaultNamespace(xw);
567
551
  xw.endElement();
@@ -578,7 +562,7 @@ function _dumpVariantExtensionObjectValue2(xw: XmlWriter, addressSpace: IAddress
578
562
  warningLog("_dumpVariantExtensionObjectValue2: Cannot find dataType for ", dataTypeNodeId.toString());
579
563
  return;
580
564
  }
581
- _dumpVariantExtensionObjectValue(xw, dataTypeNode.nodeId, definitionMap,addressSpace, value);
565
+ _dumpVariantExtensionObjectValue(xw, dataTypeNode.nodeId, definitionMap, addressSpace, value);
582
566
  }
583
567
 
584
568
  // eslint-disable-next-line complexity
@@ -665,7 +649,7 @@ function _dumpValue(xw: XmlWriter, node: UAVariable | UAVariableType, variant: V
665
649
  return;
666
650
  }
667
651
 
668
- const dataTypeName = dataTypeNode.browseName.name!.toString();
652
+ const dataTypeName = dataTypeNode.browseName.name?.toString();
669
653
  const baseDataTypeName = DataType[variant.dataType];
670
654
 
671
655
  if (baseDataTypeName === "Null") {
@@ -731,7 +715,7 @@ function _dumpArrayDimensionsAttribute(xw: XmlWriter, node: UAVariableType | UAV
731
715
  }
732
716
  }
733
717
 
734
- function visitUANode(node: BaseNode, data: DumpData, forward: boolean) {
718
+ function _visitUANode(node: BaseNode, data: DumpData, forward: boolean) {
735
719
  const addressSpace = node.addressSpace;
736
720
 
737
721
  // visit references
@@ -750,7 +734,7 @@ function visitUANode(node: BaseNode, data: DumpData, forward: boolean) {
750
734
 
751
735
  const o = addressSpace.findNode(k)! as BaseNode;
752
736
  if (o) {
753
- visitUANode(o, data, forward);
737
+ _visitUANode(o, data, forward);
754
738
  }
755
739
  }
756
740
  }
@@ -768,13 +752,13 @@ function dumpReferencedNodes(xw: XmlWriter, node: BaseNode, forward: boolean) {
768
752
  if (!forward) {
769
753
  {
770
754
  const r = node.findReferencesEx("HasTypeDefinition");
771
- if (r && r.length) {
755
+ if (r?.length) {
772
756
  assert(r.length === 1);
773
757
  const typeDefinitionObj = ReferenceImpl.resolveReferenceNode(addressSpace, r[0])! as BaseNode;
774
758
  if (!typeDefinitionObj) {
775
759
  warningLog(node.toString());
776
760
  warningLog(
777
- "dumpReferencedNodes: Warning : " + node.browseName.toString() + " unknown typeDefinition, ",
761
+ `dumpReferencedNodes: Warning : ${node.browseName.toString()} unknown typeDefinition, `,
778
762
  r[0].toString()
779
763
  );
780
764
  } else {
@@ -792,7 +776,7 @@ function dumpReferencedNodes(xw: XmlWriter, node: BaseNode, forward: boolean) {
792
776
  //
793
777
  {
794
778
  const r = node.findReferencesEx("HasSubtype", BrowseDirection.Inverse);
795
- if (r && r.length) {
779
+ if (r?.length) {
796
780
  const subTypeOf = ReferenceImpl.resolveReferenceNode(addressSpace, r[0])! as BaseNode;
797
781
  assert(r.length === 1);
798
782
  if (subTypeOf.nodeId.namespace === node.nodeId.namespace) {
@@ -841,21 +825,21 @@ function dumpCommonAttributes(xw: XmlWriter, node: BaseNode) {
841
825
  xw.writeAttribute("ParentNodeId", n(xw, parentNode.nodeId));
842
826
  }
843
827
  }
844
- if (Object.prototype.hasOwnProperty.call(node, "symbolicName")) {
828
+ if (Object.hasOwn(node, "symbolicName")) {
845
829
  xw.writeAttribute("SymbolicName", (node as any).symbolicName);
846
830
  }
847
- if (Object.prototype.hasOwnProperty.call(node, "isAbstract")) {
831
+ if (Object.hasOwn(node, "isAbstract")) {
848
832
  if ((node as any).isAbstract) {
849
833
  xw.writeAttribute("IsAbstract", (node as any).isAbstract ? "true" : "false");
850
834
  }
851
835
  }
852
- if (Object.prototype.hasOwnProperty.call(node, "accessLevel")) {
836
+ if (Object.hasOwn(node, "accessLevel")) {
853
837
  // CurrentRead is by default
854
838
  if ((node as UAVariable).accessLevel !== currentReadFlag) {
855
839
  xw.writeAttribute("AccessLevel", (node as UAVariable).accessLevel.toString());
856
840
  }
857
841
  }
858
- if (Object.prototype.hasOwnProperty.call(node, "minimumSamplingInterval")) {
842
+ if (Object.hasOwn(node, "minimumSamplingInterval")) {
859
843
  const minimumSamplingInterval = (node as UAVariable).minimumSamplingInterval;
860
844
  if (minimumSamplingInterval > 0) {
861
845
  xw.writeAttribute("MinimumSamplingInterval", minimumSamplingInterval);
@@ -972,7 +956,8 @@ function _dumpUADataTypeDefinition(xw: XmlWriter, uaDataType: UADataType) {
972
956
 
973
957
  const dataValue = uaDataType.readAttribute(SessionContext.defaultContext, AttributeIds.DataTypeDefinition);
974
958
 
975
- if (true || dataValue.statusCode.isGood()) {
959
+ const t = true;
960
+ if (t || dataValue.statusCode.isGood()) {
976
961
  const definition = uaDataType.getStructureDefinition();
977
962
  const baseDefinition = uaDataTypeBase ? uaDataTypeBase.getStructureDefinition() : null;
978
963
  xw.startElement("Definition");
@@ -1100,11 +1085,11 @@ function dumpUAVariableType(xw: XmlWriter, node: UAVariableType) {
1100
1085
  // throw new Error(" cannot find datatype " + node.dataType);
1101
1086
  debugLog(
1102
1087
  " cannot find datatype " +
1103
- node.dataType +
1104
- " for node " +
1105
- node.browseName.toString() +
1106
- " id =" +
1107
- node.nodeId.toString()
1088
+ node.dataType +
1089
+ " for node " +
1090
+ node.browseName.toString() +
1091
+ " id =" +
1092
+ node.nodeId.toString()
1108
1093
  );
1109
1094
  } else {
1110
1095
  const dataTypeName = b(xw, resolveDataTypeName(addressSpace, dataTypeNode.nodeId));
@@ -1129,9 +1114,9 @@ function dumpUAVariableType(xw: XmlWriter, node: UAVariableType) {
1129
1114
  }
1130
1115
 
1131
1116
  function dumpUAObject(xw: XmlWriter, node: UAObject) {
1132
- xw.writeComment("Object - " + b(xw, node.browseName) + " {{{{ ");
1117
+ xw.writeComment(`Object - ${b(xw, node.browseName)} {{{{ `);
1133
1118
  _dumpUAObject(xw, node);
1134
- xw.writeComment("Object - " + b(xw, node.browseName) + " }}}} ");
1119
+ xw.writeComment(`Object - ${b(xw, node.browseName)} }}}} `);
1135
1120
  }
1136
1121
 
1137
1122
  function _dumpUAObject(xw: XmlWriter, node: UAObject) {
@@ -1157,7 +1142,7 @@ function _dumpUAObject(xw: XmlWriter, node: UAObject) {
1157
1142
  function dumpElementInFolder(xw: XmlWriter, node: BaseNodeImpl) {
1158
1143
  const aggregates = node
1159
1144
  .getFolderElements()
1160
- .sort((x: BaseNode, y: BaseNode) => (x.browseName.name!.toString() > y.browseName.name!.toString() ? 1 : -1));
1145
+ .sort((x: BaseNode, y: BaseNode) => ((x?.browseName.name?.toString() || 0) > (y?.browseName.name?.toString() || 0) ? 1 : -1));
1161
1146
  for (const aggregate of aggregates.sort(sortByNodeId)) {
1162
1147
  // do not export node that do not belong to our namespace
1163
1148
  if (node.nodeId.namespace !== aggregate.nodeId.namespace) {
@@ -1195,7 +1180,7 @@ function dumpAggregates(xw: XmlWriter, node: BaseNode) {
1195
1180
  function dumpUAObjectType(xw: XmlWriter, node: UAObjectTypeImpl) {
1196
1181
  assert(node.nodeClass === NodeClass.ObjectType);
1197
1182
  assert(node instanceof UAObjectTypeImpl);
1198
- xw.writeComment("ObjectType - " + b(xw, node.browseName) + " {{{{ ");
1183
+ xw.writeComment(`ObjectType - ${b(xw, node.browseName)} {{{{ `);
1199
1184
  _markAsVisited(xw, node);
1200
1185
 
1201
1186
  // dump SubtypeOf and HasTypeDefinition node if part of the same namespace
@@ -1208,7 +1193,7 @@ function dumpUAObjectType(xw: XmlWriter, node: UAObjectTypeImpl) {
1208
1193
 
1209
1194
  dumpAggregates(xw, node);
1210
1195
 
1211
- xw.writeComment("ObjectType - " + b(xw, node.browseName) + " }}}}");
1196
+ xw.writeComment(`ObjectType - ${b(xw, node.browseName)} }}}}`);
1212
1197
  }
1213
1198
 
1214
1199
  function dumpUAMethod(xw: XmlWriter, node: UAMethod) {
@@ -1238,7 +1223,7 @@ function resolveDataTypeName(addressSpace: IAddressSpace, dataType: string | Nod
1238
1223
  dataTypeNode = o ? o : null;
1239
1224
  }
1240
1225
  if (!dataTypeNode) {
1241
- errorLog("resolveDataTypeName: warning cannot find DataType " + dataType.toString());
1226
+ errorLog(`resolveDataTypeName: warning cannot find DataType ${dataType.toString()}`);
1242
1227
  return new QualifiedName({ name: "", namespaceIndex: 0 });
1243
1228
  }
1244
1229
  return dataTypeNode.browseName;
@@ -1327,7 +1312,7 @@ function dumpReferenceType(xw: XmlWriter, referenceType: UAReferenceType) {
1327
1312
 
1328
1313
  if (!isSymmetric) {
1329
1314
  xw.startElement("InverseName");
1330
- xw.text(referenceType.inverseName!.text || "");
1315
+ xw.text(referenceType.inverseName?.text || "");
1331
1316
  xw.endElement();
1332
1317
  }
1333
1318
 
@@ -1362,9 +1347,7 @@ interface DumpData extends BuildAliasesData {
1362
1347
  index_el: Record<string, number>;
1363
1348
  }
1364
1349
 
1365
- export interface DumpXMLOptions {
1366
- /** */
1367
- }
1350
+ export type DumpXMLOptions = {};
1368
1351
 
1369
1352
  UAMethodImpl.prototype.dumpXML = function (xw) {
1370
1353
  dumpUAMethod(xw, this);
@@ -1394,7 +1377,7 @@ UAViewImpl.prototype.dumpXML = function (xw: XmlWriter) {
1394
1377
  };
1395
1378
 
1396
1379
  function makeTypeXsd(namespaceUri: string): string {
1397
- return namespaceUri.replace(/\/$/, "") + "/Type.xsd";
1380
+ return `${namespaceUri.replace(/\/$/, "")}/Type.xsd`;
1398
1381
  }
1399
1382
 
1400
1383
  // eslint-disable-next-line max-statements
@@ -1444,11 +1427,11 @@ NamespaceImpl.prototype.toNodeset2XML = function (this: NamespaceImpl) {
1444
1427
  xw.startElement("NamespaceUris");
1445
1428
 
1446
1429
  // let's sort the dependencies in the same order as the translation table
1447
- const sortedDependencies = dependency.sort(
1448
- (a, b) =>
1449
- (translationTable.get(a.index)! > translationTable.get(b.index)! ? 1 : -1));
1430
+ const sortedDependencies = dependency.sort((a, b) =>
1431
+ translationTable.get(a.index)! > translationTable.get(b.index)! ? 1 : -1
1432
+ );
1450
1433
 
1451
- doDebug && debugLog(sortedDependencies.map((a) => a.index + " + " + a.namespaceUri).join("\n"));
1434
+ doDebug && debugLog(sortedDependencies.map((a) => `${a.index} + ${a.namespaceUri}`).join("\n"));
1452
1435
  doDebug && debugLog("translation table ", translationTable.entries());
1453
1436
 
1454
1437
  for (const depend of sortedDependencies) {
@@ -1463,24 +1446,22 @@ NamespaceImpl.prototype.toNodeset2XML = function (this: NamespaceImpl) {
1463
1446
 
1464
1447
  // ------------- INamespace Uris
1465
1448
  xw.startElement("Models");
1466
- {
1467
- xw.startElement("Model");
1468
- xw.writeAttribute("ModelUri", this.namespaceUri);
1469
- xw.writeAttribute("Version", this.version);
1470
- xw.writeAttribute("PublicationDate", this.publicationDate.toISOString());
1471
- for (const depend of sortedDependencies) {
1472
- if (depend.index === this.index) {
1473
- continue; // ignore our namespace 0
1474
- }
1475
- xw.startElement("RequiredModel");
1476
- xw.writeAttribute("ModelUri", depend.namespaceUri);
1477
- xw.writeAttribute("Version", depend.version);
1478
- xw.writeAttribute("PublicationDate", depend.publicationDate.toISOString());
1479
- xw.endElement();
1449
+ xw.startElement("Model");
1450
+ xw.writeAttribute("ModelUri", this.namespaceUri);
1451
+ xw.writeAttribute("Version", this.version);
1452
+ xw.writeAttribute("PublicationDate", this.publicationDate.toISOString());
1453
+ for (const depend of sortedDependencies) {
1454
+ if (depend.index === this.index) {
1455
+ continue; // ignore our namespace 0
1480
1456
  }
1457
+ xw.startElement("RequiredModel");
1458
+ xw.writeAttribute("ModelUri", depend.namespaceUri);
1459
+ xw.writeAttribute("Version", depend.version);
1460
+ xw.writeAttribute("PublicationDate", depend.publicationDate.toISOString());
1481
1461
  xw.endElement();
1482
1462
  }
1483
1463
  xw.endElement();
1464
+ xw.endElement();
1484
1465
 
1485
1466
  const data: BuildAliasesData = { aliases: {} };
1486
1467
  for (const node of this.nodeIterator()) {
@@ -1,8 +1,5 @@
1
-
2
-
3
- import { Namespace } from "../source/namespace";
4
- import { NamespacePrivate } from "./namespace_private";
5
- import { NodeEntry1, NodeIdManager } from "./nodeid_manager";
1
+ import type { Namespace } from "../source/namespace";
2
+ import type { NodeEntry1, NodeIdManager } from "./nodeid_manager";
6
3
 
7
4
  export function getNodeIdManager(ns: Namespace): NodeIdManager {
8
5
  const nodeIdManager = (ns as any)._nodeIdManager as NodeIdManager;
@@ -16,4 +13,4 @@ export function setSymbols(ns: Namespace, symbols: NodeEntry1[]) {
16
13
  export function getSymbols(ns: Namespace): NodeEntry1[] {
17
14
  const nodeIdManager = getNodeIdManager(ns);
18
15
  return nodeIdManager?.getSymbols() || [];
19
- }
16
+ }
@@ -3,9 +3,9 @@
3
3
  */
4
4
  // tslint:disable:no-console
5
5
  import chalk from "chalk";
6
- import { AddReferenceOpts, UAReference, BaseNode, UAReferenceType } from "node-opcua-address-space-base";
6
+ import type { AddReferenceOpts, BaseNode, UAReference, UAReferenceType } from "node-opcua-address-space-base";
7
7
  import { assert } from "node-opcua-assert";
8
- import { coerceNodeId, NodeId, NodeIdLike, sameNodeId } from "node-opcua-nodeid";
8
+ import { coerceNodeId, NodeId, type NodeIdLike, sameNodeId } from "node-opcua-nodeid";
9
9
  import { isNullOrUndefined } from "node-opcua-utils";
10
10
 
11
11
  export function isNodeIdString(str: string): boolean {
@@ -15,9 +15,7 @@ export function isNodeIdString(str: string): boolean {
15
15
 
16
16
  function is_valid_reference(ref: UAReference): boolean {
17
17
  const hasRequestedProperties =
18
- Object.prototype.hasOwnProperty.call(ref, "referenceType") &&
19
- Object.prototype.hasOwnProperty.call(ref, "nodeId") &&
20
- !isNullOrUndefined(ref.isForward);
18
+ Object.hasOwn(ref, "referenceType") && Object.hasOwn(ref, "nodeId") && !isNullOrUndefined(ref.isForward);
21
19
 
22
20
  if (!hasRequestedProperties) {
23
21
  return false;
@@ -44,9 +42,9 @@ function _arrow(text: string, length: number, isForward: boolean): string {
44
42
  const extra = text.length % 2 === 1 ? "-" : "";
45
43
 
46
44
  if (isForward) {
47
- return extra + h + " " + text + " " + h + "> ";
45
+ return `${extra + h} ${text} ${h}> `;
48
46
  }
49
- return "<" + h + " " + text + " " + h + extra + " ";
47
+ return `<${h} ${text} ${h}${extra} `;
50
48
  }
51
49
 
52
50
  function _w(str: string, width: number): string {
@@ -54,7 +52,7 @@ function _w(str: string, width: number): string {
54
52
  }
55
53
 
56
54
  function _localCoerceToNodeID(nodeIdLike: string | NodeIdLike | { nodeId: NodeId }): NodeId {
57
- if (Object.prototype.hasOwnProperty.call(nodeIdLike, "nodeId")) {
55
+ if (typeof nodeIdLike === "object" && Object.hasOwn(nodeIdLike, "nodeId")) {
58
56
  return (nodeIdLike as { nodeId: NodeId }).nodeId;
59
57
  }
60
58
  return coerceNodeId(nodeIdLike);
@@ -133,13 +131,13 @@ export class ReferenceImpl implements UAReference {
133
131
  let infoNode = _w(this.nodeId.toString(), 24);
134
132
  let refType = this.referenceType.toString();
135
133
 
136
- if (options && options.addressSpace) {
134
+ if (options?.addressSpace) {
137
135
  const node = options.addressSpace.findNode(this.nodeId);
138
- infoNode = "[" + infoNode + "]" + _w(node?.browseName.toString(), 40);
136
+ infoNode = `[${infoNode}]${_w(node?.browseName.toString(), 40)}`;
139
137
 
140
138
  const ref = options.addressSpace.findReferenceType(this.referenceType);
141
139
  const refNode = options.addressSpace.findNode(ref.nodeId);
142
- refType = refNode.browseName.toString() + " (" + ref.nodeId.toString() + ")";
140
+ refType = `${refNode.browseName.toString()} (${ref.nodeId.toString()})`;
143
141
  }
144
142
  return _arrow(refType, 40, this.isForward) + infoNode;
145
143
  }
@@ -149,7 +147,7 @@ export class ReferenceImpl implements UAReference {
149
147
  */
150
148
  get hash(): string {
151
149
  if (!this.__hash) {
152
- this.__hash = (this.isForward ? "" : "!") + this.referenceType.toString() + "-" + this.nodeId.toString();
150
+ this.__hash = `${(this.isForward ? "" : "!") + this.referenceType.toString()}-${this.nodeId.toString()}`;
153
151
  }
154
152
  return this.__hash;
155
153
  }
@@ -167,7 +165,6 @@ export class ReferenceImpl implements UAReference {
167
165
  */
168
166
  }
169
167
  }
170
- function errorLog(arg0: string, reference: UAReference) {
168
+ function errorLog(_arg0: string, _reference: UAReference) {
171
169
  throw new Error("Function not implemented.");
172
170
  }
173
-
@@ -1,4 +1,4 @@
1
- import { RolePermissionType, RolePermissionTypeOptions } from "node-opcua-types";
1
+ import { RolePermissionType, type RolePermissionTypeOptions } from "node-opcua-types";
2
2
 
3
3
  export function coerceRolePermissions(rolePermissions: RolePermissionTypeOptions[] | undefined): RolePermissionType[] | undefined {
4
4
  if (!rolePermissions) return undefined;