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
@@ -1,4 +1,4 @@
1
- import { IAddressSpace, INamespace, UADataType } from "node-opcua-address-space-base";
1
+ import type { IAddressSpace, INamespace, UADataType } from "node-opcua-address-space-base";
2
2
  import {
3
3
  convertStructureTypeSchemaToStructureDefinition,
4
4
  DataTypeExtractStrategy,
@@ -7,11 +7,14 @@ import {
7
7
  } from "node-opcua-client-dynamic-extension-object";
8
8
  import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
9
9
  import { DataTypeFactory, getStandardDataTypeFactory } from "node-opcua-factory";
10
- import { CallbackT } from "node-opcua-status-code";
11
- import { StructureField } from "node-opcua-types";
12
- import { AddressSpacePrivate } from "../../src/address_space_private";
10
+ import type { CallbackT } from "node-opcua-status-code";
11
+ import type { StructureField } from "node-opcua-types";
12
+ import type { AddressSpacePrivate } from "../../src/address_space_private";
13
+ import {
14
+ constructNamespaceDependency,
15
+ constructNamespacePriorityTable
16
+ } from "../../src/nodeset_tools/construct_namespace_dependency";
13
17
  import { PseudoSession } from "../pseudo_session";
14
- import { constructNamespaceDependency, constructNamespacePriorityTable } from "../../src/nodeset_tools/construct_namespace_dependency";
15
18
 
16
19
  const debugLog = make_debugLog(__filename);
17
20
  const doDebug = checkDebugFlag(__filename);
@@ -20,11 +23,7 @@ interface UADataTypePriv extends UADataType {
20
23
  $partialDefinition?: StructureField[];
21
24
  }
22
25
 
23
- function fixDefinition103(
24
- addressSpace: IAddressSpace,
25
- namespaceArray: string[],
26
- dataTypeManager: ExtraDataTypeManager
27
- ): void {
26
+ function fixDefinition103(addressSpace: IAddressSpace, namespaceArray: string[], dataTypeManager: ExtraDataTypeManager): void {
28
27
  // fix datatype _getDefinition();
29
28
  for (let namespaceIndex = 1; namespaceIndex < namespaceArray.length; namespaceIndex++) {
30
29
  const df = dataTypeManager.getDataTypeFactory(namespaceIndex);
@@ -36,11 +35,11 @@ function fixDefinition103(
36
35
  if (!dataType) {
37
36
  continue;
38
37
  }
39
- if (dataType.$partialDefinition && dataType.$partialDefinition.length) {
38
+ if (dataType.$partialDefinition?.length) {
40
39
  continue;
41
40
  }
42
41
  // debugLog(" Exploration", dataType.browseName.toString());
43
- if (!dataType.$partialDefinition || (dataType.$partialDefinition.length === 0 && s.schema.fields!.length > 0)) {
42
+ if (!dataType.$partialDefinition || (dataType.$partialDefinition.length === 0 && s.schema.fields?.length > 0)) {
44
43
  const sd = convertStructureTypeSchemaToStructureDefinition(s.schema);
45
44
  dataType.$partialDefinition = sd.fields || undefined;
46
45
  }
@@ -48,10 +47,7 @@ function fixDefinition103(
48
47
  }
49
48
  }
50
49
 
51
- export async function ensureDatatypeExtracted(
52
- addressSpace: IAddressSpace
53
- ): Promise<ExtraDataTypeManager> {
54
-
50
+ export async function ensureDatatypeExtracted(addressSpace: IAddressSpace): Promise<ExtraDataTypeManager> {
55
51
  const addressSpacePriv: any = addressSpace as AddressSpacePrivate;
56
52
 
57
53
  if (!addressSpacePriv.$$extraDataTypeManager) {
@@ -70,7 +66,6 @@ export async function ensureDatatypeExtracted(
70
66
  const priorityTable = constructNamespacePriorityTable(addressSpace).priorityTable;
71
67
 
72
68
  for (let namespaceIndex = 1; namespaceIndex < namespaceArray.length; namespaceIndex++) {
73
-
74
69
  const namespace = addressSpace.getNamespace(namespaceIndex);
75
70
 
76
71
  if (doDebug) {
@@ -88,13 +83,13 @@ export async function ensureDatatypeExtracted(
88
83
  debugLog("namespace = ", namespace.namespaceUri);
89
84
  debugLog("priorityTable", priorityTable);
90
85
  debugLog(dependency.map((ns) => `${ns.index} ${ns.namespaceUri}`).join("\n"));
91
- throw new Error("Cannot find factory for namespace " + ns.namespaceUri);
86
+ throw new Error(`Cannot find factory for namespace ${ns.namespaceUri}`);
92
87
  }
93
88
  return df;
94
89
  });
95
90
  // getStandardDataTypeFactory()
96
91
 
97
- const dataTypeFactory1 = new DataTypeFactory(dependFactories);
92
+ const _dataTypeFactory1 = new DataTypeFactory(dependFactories);
98
93
  }
99
94
  const dataTypeFactory1 = new DataTypeFactory([...factories]);
100
95
  dataTypeFactory1.targetNamespace = namespace.namespaceUri;
@@ -1,11 +1,11 @@
1
- import { checkDebugFlag, make_debugLog, make_errorLog } from "node-opcua-debug";
2
- import { CallbackT } from "node-opcua-status-code";
3
- import { IAddressSpace, RequiredModel } from "node-opcua-address-space-base";
4
- import { ReaderStateParser, ReaderStateParserLike, Xml2Json } from "node-opcua-xml2json";
1
+ import type { IAddressSpace, RequiredModel } from "node-opcua-address-space-base";
5
2
  import { getMinOPCUADate } from "node-opcua-date-time";
3
+ import { checkDebugFlag, make_debugLog, make_errorLog } from "node-opcua-debug";
4
+ import type { CallbackT } from "node-opcua-status-code";
5
+ import { type ReaderStateParser, type ReaderStateParserLike, Xml2Json } from "node-opcua-xml2json";
6
+ import type { NamespacePrivate } from "../../src/namespace_private";
6
7
  import { adjustNamespaceArray } from "../../src/nodeset_tools/adjust_namespace_array";
7
- import { NodeSetLoaderOptions } from "../interfaces/nodeset_loader_options";
8
- import { NamespacePrivate } from "../../src/namespace_private";
8
+ import type { NodeSetLoaderOptions } from "../interfaces/nodeset_loader_options";
9
9
  import { NodeSetLoader } from "./load_nodeset2";
10
10
 
11
11
  const doDebug = checkDebugFlag(__filename);
@@ -24,7 +24,7 @@ async function parseDependencies(xmlData: string): Promise<NodesetInfo> {
24
24
  const namespaceUris: string[] = [];
25
25
 
26
26
  const models: Model[] = [];
27
- let currentModel: Model | undefined = undefined;
27
+ let currentModel: Model | undefined;
28
28
  const state0: ReaderStateParser = {
29
29
  parser: {
30
30
  UANodeSet: {
@@ -32,7 +32,7 @@ async function parseDependencies(xmlData: string): Promise<NodesetInfo> {
32
32
  NamespaceUris: {
33
33
  parser: {
34
34
  Uri: <ReaderStateParserLike & { text: string }>{
35
- finish(this: ReaderStateParserLike & {text: string}) {
35
+ finish(this: ReaderStateParserLike & { text: string }) {
36
36
  namespaceUris.push(this.text);
37
37
  }
38
38
  }
@@ -41,7 +41,7 @@ async function parseDependencies(xmlData: string): Promise<NodesetInfo> {
41
41
  Models: {
42
42
  parser: {
43
43
  Model: {
44
- init(elementName: string, attrs: any) {
44
+ init(_elementName: string, attrs: any) {
45
45
  const modelUri = attrs.ModelUri;
46
46
  const version = attrs.Version;
47
47
  const publicationDate = new Date(Date.parse(attrs.PublicationDate));
@@ -56,7 +56,7 @@ async function parseDependencies(xmlData: string): Promise<NodesetInfo> {
56
56
  },
57
57
  parser: {
58
58
  RequiredModel: {
59
- init(elementName: string, attrs: any) {
59
+ init(_elementName: string, attrs: any) {
60
60
  const modelUri = attrs.ModelUri;
61
61
  const version = attrs.Version;
62
62
  const publicationDate = new Date(Date.parse(attrs.PublicationDate));
@@ -146,7 +146,7 @@ export function findOrder(nodesetDescs: NodesetDesc[]): number[] {
146
146
  for (const requiredModel of model.requiredModel) {
147
147
  const requiredModelIndex = findNodesetIndex(requiredModel.modelUri);
148
148
  if (requiredModelIndex === -1) {
149
- throw new Error("Cannot find namespace for " + requiredModel.modelUri);
149
+ throw new Error(`Cannot find namespace for ${requiredModel.modelUri}`);
150
150
  }
151
151
  const nd = nodesetDescs[requiredModelIndex];
152
152
  for (const n of nd.namespaceModel.models) {
@@ -154,7 +154,7 @@ export function findOrder(nodesetDescs: NodesetDesc[]): number[] {
154
154
  }
155
155
  }
156
156
  const nodesetIndex = findNodesetIndex(model.modelUri);
157
- const alreadyIn = order.findIndex((x) => x === nodesetIndex) !== -1;
157
+ const alreadyIn = order.indexOf(nodesetIndex) !== -1;
158
158
  if (!alreadyIn) order.push(nodesetIndex);
159
159
  };
160
160
  const visit2 = (nodesetDesc: NodesetDesc) => {
@@ -197,7 +197,6 @@ export async function generateAddressSpaceRaw(
197
197
  }
198
198
  }
199
199
 
200
-
201
200
  for (let index = 0; index < order.length; index++) {
202
201
  const nodesetIndex = order[index];
203
202
  const nodeset = nodesetDesc[nodesetIndex];
@@ -221,8 +221,8 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
221
221
  if (!namespace) {
222
222
  throw new Error(
223
223
  "cannot find namespace for " +
224
- namespaceUri +
225
- "\nplease make sure to initialize your address space with the corresponding nodeset files"
224
+ namespaceUri +
225
+ "\nplease make sure to initialize your address space with the corresponding nodeset files"
226
226
  );
227
227
  }
228
228
  foundNamespaceMap.set(namespaceUri, namespace);
@@ -1038,7 +1038,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
1038
1038
  doDebug &&
1039
1039
  debugLog(
1040
1040
  chalk.bgGreenBright("Performing post loading tasks -------------------------------------------") +
1041
- chalk.green("DONE")
1041
+ chalk.green("DONE")
1042
1042
  );
1043
1043
 
1044
1044
  async function performPostLoadingTasks(tasks: Task[]): Promise<void> {
@@ -1,11 +1,29 @@
1
- import { IAddressSpace } from "node-opcua-address-space-base";
2
- import { Byte, coerceInt64, coerceUInt64, Int16, Int32, Int64, SByte, UAString, UInt16, UInt32, UInt64 } from "node-opcua-basic-types";
1
+ import type { IAddressSpace } from "node-opcua-address-space-base";
2
+ import {
3
+ type Byte,
4
+ coerceInt64,
5
+ coerceUInt64,
6
+ type Int16,
7
+ type Int32,
8
+ type Int64,
9
+ type SByte,
10
+ type UInt16,
11
+ type UInt32,
12
+ type UInt64
13
+ } from "node-opcua-basic-types";
3
14
  import { make_debugLog, make_warningLog } from "node-opcua-debug";
4
- import { coerceNodeId, INodeId, NodeId, NodeIdType } from "node-opcua-nodeid";
15
+ import { coerceNodeId, type INodeId, type NodeId, NodeIdType } from "node-opcua-nodeid";
5
16
  import { EnumDefinition, StructureDefinition } from "node-opcua-types";
6
17
  import { lowerFirstLetter } from "node-opcua-utils";
7
- import { DataType, VariantOptions, Variant } from "node-opcua-variant";
8
- import { ReaderState, ReaderStateParserLike, ParserLike, XmlAttributes, IReaderState, Xml2Json, ReaderStateParser } from "node-opcua-xml2json";
18
+ import { DataType, Variant, type VariantOptions } from "node-opcua-variant";
19
+ import {
20
+ type IReaderState,
21
+ ReaderState,
22
+ type ReaderStateParser,
23
+ type ReaderStateParserLike,
24
+ type Xml2Json,
25
+ type XmlAttributes
26
+ } from "node-opcua-xml2json";
9
27
  import { localizedText_parser } from "./parsers/localized_text_parser";
10
28
  import { makeQualifiedNameParser } from "./parsers/qualified_name_parser";
11
29
  import { makeVariantReader } from "./parsers/variant_parser";
@@ -50,12 +68,12 @@ const partials = {
50
68
 
51
69
  Boolean: <Parser<boolean>>{
52
70
  finish(this: Parser<boolean>) {
53
- this.value = this.text.toLowerCase() === "true" ? true : false;
71
+ this.value = this.text.toLowerCase() === "true";
54
72
  }
55
73
  },
56
74
 
57
75
  ByteString: <Parser<Buffer>>{
58
- init(this: Parser<Buffer>, name: string, attrs: XmlAttributes, parent: IReaderState, engine: Xml2Json) {
76
+ init(this: Parser<Buffer>, _name: string, _attrs: XmlAttributes, _parent: IReaderState, _engine: Xml2Json) {
59
77
  this.value = null;
60
78
  },
61
79
  finish(this: Parser<Buffer>) {
@@ -65,56 +83,56 @@ const partials = {
65
83
  }
66
84
  },
67
85
 
68
- Float: <Parser<number>> {
86
+ Float: <Parser<number>>{
69
87
  finish(this: Parser<number>) {
70
88
  this.value = parseFloat(this.text);
71
89
  }
72
90
  },
73
91
 
74
- Double: <Parser<number>> {
92
+ Double: <Parser<number>>{
75
93
  finish(this: Parser<number>) {
76
94
  this.value = parseFloat(this.text);
77
95
  }
78
96
  },
79
- Byte: <Parser<Byte>> {
97
+ Byte: <Parser<Byte>>{
80
98
  finish(this: Parser<Byte>) {
81
99
  this.value = clamp(parseInt(this.text, 10), 0, 255);
82
100
  }
83
101
  },
84
- SByte: <Parser<SByte>> {
102
+ SByte: <Parser<SByte>>{
85
103
  finish(this: Parser<SByte>) {
86
104
  this.value = clamp(parseInt(this.text, 10), -128, 127);
87
105
  }
88
106
  },
89
- Int8: <Parser<SByte>> {
107
+ Int8: <Parser<SByte>>{
90
108
  finish(this: Parser<SByte>) {
91
109
  this.value = clamp(parseInt(this.text, 10), -128, 127);
92
110
  }
93
111
  },
94
112
 
95
- Int16: <Parser<Int16>> {
113
+ Int16: <Parser<Int16>>{
96
114
  finish(this: Parser<Int16>) {
97
115
  this.value = clamp(parseInt(this.text, 10), -32768, 32767);
98
116
  }
99
117
  },
100
- Int32: <Parser<Int32>> {
118
+ Int32: <Parser<Int32>>{
101
119
  finish(this: Parser<Int32>) {
102
120
  this.value = clamp(parseInt(this.text, 10), -2147483648, 2147483647);
103
121
  }
104
122
  },
105
- Int64: <Parser<Int64>> {
123
+ Int64: <Parser<Int64>>{
106
124
  finish(this: Parser<Int64>) {
107
125
  this.value = coerceInt64(parseInt(this.text, 10));
108
126
  }
109
127
  },
110
128
 
111
- UInt8: <Parser<Byte>> {
129
+ UInt8: <Parser<Byte>>{
112
130
  finish(this: Parser<Byte>) {
113
131
  this.value = clamp(parseInt(this.text, 10), 0, 255);
114
132
  }
115
133
  },
116
134
 
117
- UInt16: <Parser<UInt16>> {
135
+ UInt16: <Parser<UInt16>>{
118
136
  finish(this: Parser<UInt16>) {
119
137
  this.value = clamp(parseInt(this.text, 10), 0, 65535);
120
138
  }
@@ -146,7 +164,7 @@ const partials = {
146
164
  }
147
165
  },
148
166
 
149
- NodeId: <Parser<NodeId>> {
167
+ NodeId: <Parser<NodeId>>{
150
168
  finish(this: Parser<NodeId>) {
151
169
  // to do check Local or GMT
152
170
  this.value = coerceNodeId(this.text);
@@ -176,13 +194,13 @@ function _clone(a: any): any {
176
194
  if (typeof a === "string" || typeof a === "number" || typeof a === "boolean") {
177
195
  return a;
178
196
  }
179
- if (a instanceof Buffer) {
197
+ if (Buffer.isBuffer(a)) {
180
198
  return Buffer.from(a);
181
199
  }
182
200
  if (a instanceof Date) {
183
201
  return new Date(a);
184
202
  }
185
- if (a instanceof Array) {
203
+ if (Array.isArray(a)) {
186
204
  return a.map((x) => _clone(x));
187
205
  }
188
206
  return { ...a };
@@ -197,14 +215,10 @@ function _makeTypeReader(
197
215
  const n = dataTypeNodeId1 as INodeId;
198
216
  if (n.identifierType === NodeIdType.NUMERIC && n.namespace === 0 && n.value === 0) {
199
217
  // a generic Extension Object
200
- return { name: "Variant", reader: partials["Variant"] };
218
+ return { name: "Variant", reader: partials.Variant };
201
219
  }
202
220
 
203
- if (
204
- n.namespace === 0 &&
205
- n.identifierType === NodeIdType.NUMERIC &&
206
- n.value < DataType.ExtensionObject
207
- ) {
221
+ if (n.namespace === 0 && n.identifierType === NodeIdType.NUMERIC && n.value < DataType.ExtensionObject) {
208
222
  const name = DataType[n.value as number] as string;
209
223
  const reader = partials[name as keyof typeof partials] as ReaderStateParser;
210
224
  return { name, reader };
@@ -236,14 +250,14 @@ function _makeTypeReader(
236
250
  const fieldTypename = typeReader.name;
237
251
  // c8 ignore next
238
252
  if (!fieldParser) {
239
- throw new Error(" Cannot find reader for dataType " + field.dataType + " fieldTypename=" + fieldTypename);
253
+ throw new Error(` Cannot find reader for dataType ${field.dataType} fieldTypename=${fieldTypename}`);
240
254
  }
241
255
 
242
256
  if (field.valueRank === undefined || field.valueRank === -1) {
243
257
  // scalar
244
258
  const parser = fieldParser;
245
259
  if (!parser) {
246
- throw new Error("??? " + field.dataType + " " + field.name);
260
+ throw new Error(`??? ${field.dataType} ${field.name}`);
247
261
  }
248
262
 
249
263
  reader.parser![field.name!] = {
@@ -254,7 +268,7 @@ function _makeTypeReader(
254
268
  if (fieldParser.finish) {
255
269
  fieldParser.finish.call(this);
256
270
  } else {
257
- debugLog("xxx check " + fieldTypename);
271
+ debugLog(`xxx check ${fieldTypename}`);
258
272
  }
259
273
  this.parent.value = this.parent.value || Object.create(null);
260
274
  this.parent.value[elName] = _clone(this.value);
@@ -265,14 +279,16 @@ function _makeTypeReader(
265
279
  init(this: any) {
266
280
  this.value = [];
267
281
  },
268
- parser: { /** empty */},
282
+ parser: {
283
+ /** empty */
284
+ },
269
285
  finish(this: any) {
270
286
  const elName = lowerFirstLetter(this.name);
271
287
  this.parent.value = this.parent.value || Object.create(null);
272
288
  this.parent.value[elName] = this.value;
273
289
  this.value = undefined;
274
290
  },
275
- startElement(name: string, attrs: XmlAttributes) {
291
+ startElement(_name: string, _attrs: XmlAttributes) {
276
292
  // empty
277
293
  },
278
294
  endElement(element: string) {
@@ -285,7 +301,7 @@ function _makeTypeReader(
285
301
  throw new Error("Unsupported ValueRank !");
286
302
  }
287
303
  }
288
- readerMap.set(dataTypeName,reader);
304
+ readerMap.set(dataTypeName, reader);
289
305
  return { name, reader };
290
306
  } else if (definition instanceof EnumDefinition) {
291
307
  const turnToInt = (value: any) => {
@@ -300,26 +316,26 @@ function _makeTypeReader(
300
316
  }
301
317
  }
302
318
  };
303
- } else if (definition?.dataType == DataType.Variant) {
319
+ } else if (definition?.dataType === DataType.Variant) {
304
320
  // <Value><String>Foo</String></Value>
305
321
  type Task = (addressSpace: any) => Promise<void>;
306
322
 
307
323
  let variantOptions: VariantOptions = Object.create(null);
308
324
 
309
325
  const variantReader = makeVariantReader(
310
- (self, data: VariantOptions) => variantOptions = data,
311
- /*setDeferredValue: */(self,data, deferedTask) => {
326
+ (_self, data: VariantOptions) => (variantOptions = data),
327
+ /*setDeferredValue: */ (_self, _data, _deferedTask) => {
312
328
  // to do
313
329
  },
314
- /* postExtensionObjectDecoding:*/(task: (addressSpace: IAddressSpace) => Promise<void>) => {
330
+ /* postExtensionObjectDecoding:*/ (_task: (addressSpace: IAddressSpace) => Promise<void>) => {
315
331
  // to do
316
332
  },
317
- translateNodeId,
333
+ translateNodeId
318
334
  );
319
335
  return {
320
336
  name,
321
337
  reader: {
322
- init(this: any , name: string, attrs: XmlAttributes, parent: IReaderState, engine: Xml2Json) {
338
+ init(this: any, _name: string, _attrs: XmlAttributes, _parent: IReaderState, _engine: Xml2Json) {
323
339
  this.obj = {};
324
340
  },
325
341
  ...variantReader,
@@ -334,7 +350,7 @@ function _makeTypeReader(
334
350
  const reader = partials[typeName as keyof typeof partials] as ReaderStateParser;
335
351
  // c8 ignore next
336
352
  if (!reader) {
337
- throw new Error("missing parse for " + typeName);
353
+ throw new Error(`missing parse for ${typeName}`);
338
354
  }
339
355
  return { name, reader };
340
356
  }
@@ -1,8 +1,7 @@
1
+ import type { IAddressSpace, INamespace, UAObject, UAVariable } from "node-opcua-address-space-base";
1
2
  import { NodeClass } from "node-opcua-data-model";
2
- import { make_debugLog, checkDebugFlag } from "node-opcua-debug";
3
-
4
- import { UAObject, UAVariable, IAddressSpace, INamespace, UAVariableType } from "node-opcua-address-space-base";
5
- import { NamespacePrivate } from "../../src/namespace_private";
3
+ import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
4
+ import type { NamespacePrivate } from "../../src/namespace_private";
6
5
 
7
6
  const debugLog = make_debugLog(__filename);
8
7
  const doDebug = checkDebugFlag(__filename);