node-opcua-address-space 2.179.0 → 2.181.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 (1085) hide show
  1. package/api/address_space_public.ts +63 -0
  2. package/api/address_space_ts.ts +129 -0
  3. package/api/continuation_points/continuation_point_manager.ts +271 -0
  4. package/api/helpers/argument_list.ts +310 -0
  5. package/api/helpers/call_helpers.ts +100 -0
  6. package/api/helpers/coerce_enum_value.ts +33 -0
  7. package/api/helpers/dump_tools.ts +90 -0
  8. package/api/helpers/ensure_secure_access.ts +78 -0
  9. package/api/helpers/multiform_func.ts +78 -0
  10. package/api/helpers/resolve_opaque_on_address_space.ts +26 -0
  11. package/api/index.ts +210 -0
  12. package/api/interfaces/alarms_and_conditions/condition_info_i.ts +60 -0
  13. package/api/interfaces/alarms_and_conditions/condition_snapshot.ts +236 -0
  14. package/api/interfaces/alarms_and_conditions/deviation_stuff.ts +16 -0
  15. package/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +8 -0
  16. package/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +6 -0
  17. package/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +6 -0
  18. package/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +13 -0
  19. package/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +6 -0
  20. package/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +6 -0
  21. package/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +21 -0
  22. package/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +28 -0
  23. package/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +72 -0
  24. package/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +36 -0
  25. package/api/interfaces/alarms_and_conditions/ua_condition_ex.ts +55 -0
  26. package/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +17 -0
  27. package/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +21 -0
  28. package/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +21 -0
  29. package/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +26 -0
  30. package/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +29 -0
  31. package/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +25 -0
  32. package/api/interfaces/data_access/ua_multistate_discrete_ex.ts +57 -0
  33. package/api/interfaces/data_access/ua_multistate_value_discrete_ex.ts +31 -0
  34. package/api/interfaces/data_access/ua_two_state_discrete_ex.ts +15 -0
  35. package/api/interfaces/nodeset_loader_options.ts +58 -0
  36. package/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +20 -0
  37. package/api/interfaces/state_machine/ua_finite_state_machine_type.ts +50 -0
  38. package/api/interfaces/state_machine/ua_program_state_machine_type.ts +14 -0
  39. package/api/interfaces/state_machine/ua_shelved_state_machine_ex.ts +35 -0
  40. package/api/interfaces/state_machine/ua_state_machine_type.ts +288 -0
  41. package/api/loader/decode_xml_extension_object.ts +80 -0
  42. package/api/loader/ensure_datatype_extracted.ts +122 -0
  43. package/api/loader/generateAddressSpaceRaw.ts +470 -0
  44. package/api/loader/load_nodeset2.ts +278 -0
  45. package/api/loader/make_xml_extension_object_parser.ts +518 -0
  46. package/api/loader/namespace_post_step.ts +68 -0
  47. package/api/loader/nodeset_image.ts +451 -0
  48. package/api/loader/nodeset_image_codec.ts +576 -0
  49. package/api/loader/nodeset_image_store.ts +78 -0
  50. package/api/loader/nodeset_record.ts +141 -0
  51. package/api/loader/nodeset_record_applier.ts +889 -0
  52. package/api/loader/nodeset_source.ts +367 -0
  53. package/api/loader/nodeset_source_helpers.ts +50 -0
  54. package/api/loader/nodeset_to_image.ts +29 -0
  55. package/api/loader/nodeset_xml_producer.ts +383 -0
  56. package/api/loader/parsers/extension_object_parser.ts +374 -0
  57. package/api/loader/parsers/variant_parser.ts +363 -0
  58. package/api/loader/register_node_promoter.ts +6 -0
  59. package/api/namespace.ts +25 -0
  60. package/api/namespace_alarm_and_condition.ts +78 -0
  61. package/api/namespace_data_access.ts +92 -0
  62. package/api/namespace_machine_state.ts +20 -0
  63. package/api/pseudo_session.ts +415 -0
  64. package/api/session_context.ts +729 -0
  65. package/api/ua_interface.ts +38 -0
  66. package/api/ua_two_state_variable_ex.ts +36 -0
  67. package/bin/opcua-nodeset-image.js +192 -0
  68. package/dist/api/address_space_public.d.ts +57 -0
  69. package/dist/api/address_space_public.js +19 -0
  70. package/dist/api/address_space_public.js.map +1 -0
  71. package/dist/api/address_space_ts.d.ts +79 -0
  72. package/dist/api/address_space_ts.js +13 -0
  73. package/dist/api/address_space_ts.js.map +1 -0
  74. package/dist/api/continuation_points/continuation_point_manager.js +230 -0
  75. package/dist/api/continuation_points/continuation_point_manager.js.map +1 -0
  76. package/dist/api/helpers/adjust_browse_direction.js.map +1 -0
  77. package/dist/api/helpers/argument_list.js +263 -0
  78. package/dist/api/helpers/argument_list.js.map +1 -0
  79. package/dist/api/helpers/call_helpers.js +80 -0
  80. package/dist/api/helpers/call_helpers.js.map +1 -0
  81. package/dist/api/helpers/coerce_enum_value.d.ts +6 -0
  82. package/dist/api/helpers/coerce_enum_value.js.map +1 -0
  83. package/dist/api/helpers/dump_tools.js +81 -0
  84. package/dist/api/helpers/dump_tools.js.map +1 -0
  85. package/dist/api/helpers/ensure_secure_access.d.ts +19 -0
  86. package/dist/api/helpers/ensure_secure_access.js +67 -0
  87. package/dist/api/helpers/ensure_secure_access.js.map +1 -0
  88. package/dist/api/helpers/make_optionals_map.js.map +1 -0
  89. package/dist/api/helpers/multiform_func.js +75 -0
  90. package/dist/api/helpers/multiform_func.js.map +1 -0
  91. package/dist/api/helpers/resolve_opaque_on_address_space.js +25 -0
  92. package/dist/api/helpers/resolve_opaque_on_address_space.js.map +1 -0
  93. package/dist/api/index.d.ts +113 -0
  94. package/dist/api/index.js +234 -0
  95. package/dist/api/index.js.map +1 -0
  96. package/dist/api/interfaces/alarms_and_conditions/condition_info_i.d.ts +54 -0
  97. package/dist/api/interfaces/alarms_and_conditions/condition_info_i.js +28 -0
  98. package/dist/api/interfaces/alarms_and_conditions/condition_info_i.js.map +1 -0
  99. package/dist/api/interfaces/alarms_and_conditions/condition_snapshot.d.ts +151 -0
  100. package/dist/api/interfaces/alarms_and_conditions/condition_snapshot.js.map +1 -0
  101. package/dist/api/interfaces/alarms_and_conditions/deviation_stuff.d.ts +12 -0
  102. package/dist/api/interfaces/alarms_and_conditions/deviation_stuff.js.map +1 -0
  103. package/dist/api/interfaces/alarms_and_conditions/install_setpoint_options.js.map +1 -0
  104. package/dist/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +7 -0
  105. package/dist/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +1 -0
  106. package/dist/api/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +1 -0
  107. package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +4 -0
  108. package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +1 -0
  109. package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +4 -0
  110. package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +1 -0
  111. package/dist/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +10 -0
  112. package/dist/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +1 -0
  113. package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +4 -0
  114. package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +1 -0
  115. package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +4 -0
  116. package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +1 -0
  117. package/dist/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +20 -0
  118. package/dist/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +1 -0
  119. package/dist/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +21 -0
  120. package/dist/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +1 -0
  121. package/dist/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +56 -0
  122. package/dist/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +1 -0
  123. package/dist/api/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +1 -0
  124. package/dist/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +19 -0
  125. package/dist/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +1 -0
  126. package/dist/api/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +44 -0
  127. package/dist/api/interfaces/alarms_and_conditions/ua_condition_ex.js.map +1 -0
  128. package/dist/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +4 -0
  129. package/dist/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -0
  130. package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +5 -0
  131. package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +1 -0
  132. package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +19 -0
  133. package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +1 -0
  134. package/dist/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +25 -0
  135. package/dist/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +1 -0
  136. package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +8 -0
  137. package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +1 -0
  138. package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +10 -0
  139. package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +1 -0
  140. package/dist/api/interfaces/data_access/ua_multistate_discrete_ex.d.ts +44 -0
  141. package/dist/api/interfaces/data_access/ua_multistate_discrete_ex.js.map +1 -0
  142. package/dist/api/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +22 -0
  143. package/dist/api/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +1 -0
  144. package/dist/api/interfaces/data_access/ua_two_state_discrete_ex.d.ts +13 -0
  145. package/dist/api/interfaces/data_access/ua_two_state_discrete_ex.js.map +1 -0
  146. package/dist/api/interfaces/data_access/ua_y_array_item_ex.js.map +1 -0
  147. package/dist/api/interfaces/extension_object_constructor.js.map +1 -0
  148. package/dist/api/interfaces/i_condition_variable_type_setter_options.js.map +1 -0
  149. package/dist/api/interfaces/i_set_state_options.js.map +1 -0
  150. package/dist/api/interfaces/nodeset_loader_options.d.ts +56 -0
  151. package/dist/api/interfaces/nodeset_loader_options.js.map +1 -0
  152. package/dist/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +12 -0
  153. package/dist/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +1 -0
  154. package/dist/api/interfaces/state_machine/ua_finite_state_machine_type.d.ts +49 -0
  155. package/dist/api/interfaces/state_machine/ua_finite_state_machine_type.js.map +1 -0
  156. package/dist/api/interfaces/state_machine/ua_program_state_machine_type.d.ts +11 -0
  157. package/dist/api/interfaces/state_machine/ua_program_state_machine_type.js.map +1 -0
  158. package/dist/api/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +29 -0
  159. package/dist/api/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +1 -0
  160. package/dist/api/interfaces/state_machine/ua_state_machine_type.d.ts +236 -0
  161. package/dist/api/interfaces/state_machine/ua_state_machine_type.js.map +1 -0
  162. package/dist/api/interfaces/state_machine/ua_transition_ex.js.map +1 -0
  163. package/dist/api/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -0
  164. package/dist/api/loader/decode_xml_extension_object.d.ts +6 -0
  165. package/dist/api/loader/decode_xml_extension_object.js +69 -0
  166. package/dist/api/loader/decode_xml_extension_object.js.map +1 -0
  167. package/dist/api/loader/ensure_datatype_extracted.js +88 -0
  168. package/dist/api/loader/ensure_datatype_extracted.js.map +1 -0
  169. package/dist/api/loader/generateAddressSpaceRaw.d.ts +64 -0
  170. package/dist/api/loader/generateAddressSpaceRaw.js +379 -0
  171. package/dist/api/loader/generateAddressSpaceRaw.js.map +1 -0
  172. package/dist/api/loader/load_nodeset2.d.ts +38 -0
  173. package/dist/api/loader/load_nodeset2.js +245 -0
  174. package/dist/api/loader/load_nodeset2.js.map +1 -0
  175. package/dist/api/loader/make_semver_compatible.js.map +1 -0
  176. package/dist/api/loader/make_xml_extension_object_parser.js +417 -0
  177. package/dist/api/loader/make_xml_extension_object_parser.js.map +1 -0
  178. package/dist/api/loader/namespace_post_step.js +57 -0
  179. package/dist/api/loader/namespace_post_step.js.map +1 -0
  180. package/dist/api/loader/nodeset_image.d.ts +94 -0
  181. package/dist/api/loader/nodeset_image.js +406 -0
  182. package/dist/api/loader/nodeset_image.js.map +1 -0
  183. package/dist/api/loader/nodeset_image_codec.d.ts +104 -0
  184. package/dist/api/loader/nodeset_image_codec.js +489 -0
  185. package/dist/api/loader/nodeset_image_codec.js.map +1 -0
  186. package/dist/api/loader/nodeset_image_store.d.ts +27 -0
  187. package/dist/api/loader/nodeset_image_store.js +72 -0
  188. package/dist/api/loader/nodeset_image_store.js.map +1 -0
  189. package/dist/api/loader/nodeset_record.d.ts +125 -0
  190. package/dist/api/loader/nodeset_record.js +26 -0
  191. package/dist/api/loader/nodeset_record.js.map +1 -0
  192. package/dist/api/loader/nodeset_record_applier.d.ts +106 -0
  193. package/dist/api/loader/nodeset_record_applier.js +731 -0
  194. package/dist/api/loader/nodeset_record_applier.js.map +1 -0
  195. package/dist/api/loader/nodeset_source.d.ts +124 -0
  196. package/dist/api/loader/nodeset_source.js +307 -0
  197. package/dist/api/loader/nodeset_source.js.map +1 -0
  198. package/dist/api/loader/nodeset_source_helpers.d.ts +27 -0
  199. package/dist/api/loader/nodeset_source_helpers.js +30 -0
  200. package/dist/api/loader/nodeset_source_helpers.js.map +1 -0
  201. package/dist/api/loader/nodeset_to_image.d.ts +13 -0
  202. package/dist/api/loader/nodeset_to_image.js +30 -0
  203. package/dist/api/loader/nodeset_to_image.js.map +1 -0
  204. package/dist/api/loader/nodeset_xml_producer.d.ts +16 -0
  205. package/dist/api/loader/nodeset_xml_producer.js +349 -0
  206. package/dist/api/loader/nodeset_xml_producer.js.map +1 -0
  207. package/dist/api/loader/parsers/extension_object_parser.js +274 -0
  208. package/dist/api/loader/parsers/extension_object_parser.js.map +1 -0
  209. package/dist/api/loader/parsers/localized_text_parser.js.map +1 -0
  210. package/dist/api/loader/parsers/nodeid_parser.js.map +1 -0
  211. package/dist/api/loader/parsers/qualified_name_parser.js.map +1 -0
  212. package/dist/api/loader/parsers/variant_parser.d.ts +42 -0
  213. package/dist/api/loader/parsers/variant_parser.js +294 -0
  214. package/dist/api/loader/parsers/variant_parser.js.map +1 -0
  215. package/dist/api/loader/register_node_promoter.d.ts +2 -0
  216. package/dist/api/loader/register_node_promoter.js +9 -0
  217. package/dist/api/loader/register_node_promoter.js.map +1 -0
  218. package/dist/api/namespace.d.ts +18 -0
  219. package/dist/api/namespace.js.map +1 -0
  220. package/dist/api/namespace_alarm_and_condition.d.ts +33 -0
  221. package/dist/api/namespace_alarm_and_condition.js.map +1 -0
  222. package/dist/api/namespace_data_access.d.ts +67 -0
  223. package/dist/api/namespace_data_access.js.map +1 -0
  224. package/dist/api/namespace_machine_state.d.ts +8 -0
  225. package/dist/api/namespace_machine_state.js.map +1 -0
  226. package/dist/api/pseudo_session.d.ts +74 -0
  227. package/dist/api/pseudo_session.js +308 -0
  228. package/dist/api/pseudo_session.js.map +1 -0
  229. package/dist/api/session_context.d.ts +242 -0
  230. package/dist/api/session_context.js +524 -0
  231. package/dist/api/session_context.js.map +1 -0
  232. package/dist/api/set_namespace_meta_data.js.map +1 -0
  233. package/dist/api/ua_addin.js.map +1 -0
  234. package/dist/api/ua_interface.js +25 -0
  235. package/dist/api/ua_interface.js.map +1 -0
  236. package/dist/api/ua_root_folder.js.map +1 -0
  237. package/dist/api/ua_two_state_variable_ex.d.ts +24 -0
  238. package/dist/api/ua_two_state_variable_ex.js.map +1 -0
  239. package/dist/api/xml_writer.js.map +1 -0
  240. package/dist/impl/_instantiate_helpers.js +99 -0
  241. package/dist/impl/_instantiate_helpers.js.map +1 -0
  242. package/dist/impl/_mandatory_child_or_requested_optional_filter.js +82 -0
  243. package/dist/impl/_mandatory_child_or_requested_optional_filter.js.map +1 -0
  244. package/dist/impl/address_space.d.ts +379 -0
  245. package/dist/impl/address_space.js +1383 -0
  246. package/dist/impl/address_space.js.map +1 -0
  247. package/dist/impl/address_space_change_event_tools.d.ts +6 -0
  248. package/dist/impl/address_space_change_event_tools.js.map +1 -0
  249. package/dist/impl/address_space_private.d.ts +48 -0
  250. package/dist/impl/address_space_private.js.map +1 -0
  251. package/dist/impl/alarms_and_conditions/condition.js.map +1 -0
  252. package/dist/impl/alarms_and_conditions/condition_info_impl.d.ts +19 -0
  253. package/dist/impl/alarms_and_conditions/condition_info_impl.js +39 -0
  254. package/dist/impl/alarms_and_conditions/condition_info_impl.js.map +1 -0
  255. package/dist/impl/alarms_and_conditions/condition_snapshot_impl.d.ts +271 -0
  256. package/dist/impl/alarms_and_conditions/condition_snapshot_impl.js +700 -0
  257. package/dist/impl/alarms_and_conditions/condition_snapshot_impl.js.map +1 -0
  258. package/dist/impl/alarms_and_conditions/deviation_alarm_helper.d.ts +12 -0
  259. package/dist/impl/alarms_and_conditions/deviation_alarm_helper.js +66 -0
  260. package/dist/impl/alarms_and_conditions/deviation_alarm_helper.js.map +1 -0
  261. package/dist/impl/alarms_and_conditions/index.d.ts +16 -0
  262. package/dist/impl/alarms_and_conditions/index.js +33 -0
  263. package/dist/impl/alarms_and_conditions/index.js.map +1 -0
  264. package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +54 -0
  265. package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +244 -0
  266. package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -0
  267. package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.d.ts +105 -0
  268. package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.js +428 -0
  269. package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -0
  270. package/dist/impl/alarms_and_conditions/ua_base_event_impl.d.ts +36 -0
  271. package/dist/impl/alarms_and_conditions/ua_base_event_impl.js +32 -0
  272. package/dist/impl/alarms_and_conditions/ua_base_event_impl.js.map +1 -0
  273. package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +47 -0
  274. package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +204 -0
  275. package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -0
  276. package/dist/impl/alarms_and_conditions/ua_condition_impl.d.ts +152 -0
  277. package/dist/impl/alarms_and_conditions/ua_condition_impl.js +1016 -0
  278. package/dist/impl/alarms_and_conditions/ua_condition_impl.js.map +1 -0
  279. package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +22 -0
  280. package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.js +41 -0
  281. package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -0
  282. package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +30 -0
  283. package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +54 -0
  284. package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -0
  285. package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +12 -0
  286. package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +13 -0
  287. package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -0
  288. package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +28 -0
  289. package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +86 -0
  290. package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -0
  291. package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +10 -0
  292. package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +8 -0
  293. package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -0
  294. package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.d.ts +49 -0
  295. package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.js +207 -0
  296. package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -0
  297. package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +28 -0
  298. package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +54 -0
  299. package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -0
  300. package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +38 -0
  301. package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +172 -0
  302. package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -0
  303. package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +44 -0
  304. package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.js +164 -0
  305. package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -0
  306. package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +18 -0
  307. package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +18 -0
  308. package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -0
  309. package/dist/impl/apply_condition_refresh.d.ts +4 -0
  310. package/dist/impl/apply_condition_refresh.js +29 -0
  311. package/dist/impl/apply_condition_refresh.js.map +1 -0
  312. package/dist/impl/base_node_impl.d.ts +347 -0
  313. package/dist/impl/base_node_impl.js +1768 -0
  314. package/dist/impl/base_node_impl.js.map +1 -0
  315. package/dist/impl/base_node_private.d.ts +138 -0
  316. package/dist/impl/base_node_private.js +1028 -0
  317. package/dist/impl/base_node_private.js.map +1 -0
  318. package/dist/impl/check_value_rank_compatibility.js.map +1 -0
  319. package/dist/impl/child_accessors.d.ts +43 -0
  320. package/dist/impl/child_accessors.js +222 -0
  321. package/dist/impl/child_accessors.js.map +1 -0
  322. package/dist/impl/data_access/add_dataItem_stuff.js.map +1 -0
  323. package/dist/impl/data_access/adjust_datavalue_status_code.d.ts +7 -0
  324. package/dist/impl/data_access/adjust_datavalue_status_code.js.map +1 -0
  325. package/dist/impl/data_access/ua_multistate_discrete_impl.d.ts +38 -0
  326. package/dist/impl/data_access/ua_multistate_discrete_impl.js +143 -0
  327. package/dist/impl/data_access/ua_multistate_discrete_impl.js.map +1 -0
  328. package/dist/impl/data_access/ua_multistate_value_discrete_impl.d.ts +61 -0
  329. package/dist/impl/data_access/ua_multistate_value_discrete_impl.js +303 -0
  330. package/dist/impl/data_access/ua_multistate_value_discrete_impl.js.map +1 -0
  331. package/dist/impl/data_access/ua_two_state_discrete_impl.d.ts +30 -0
  332. package/dist/impl/data_access/ua_two_state_discrete_impl.js +164 -0
  333. package/dist/impl/data_access/ua_two_state_discrete_impl.js.map +1 -0
  334. package/dist/impl/event_data.d.ts +27 -0
  335. package/dist/impl/event_data.js +73 -0
  336. package/dist/impl/event_data.js.map +1 -0
  337. package/dist/impl/event_layout.d.ts +40 -0
  338. package/dist/impl/event_layout.js +103 -0
  339. package/dist/impl/event_layout.js.map +1 -0
  340. package/dist/impl/extension_object_array_node.d.ts +41 -0
  341. package/dist/impl/extension_object_array_node.js +274 -0
  342. package/dist/impl/extension_object_array_node.js.map +1 -0
  343. package/dist/impl/get_basic_datatype.js.map +1 -0
  344. package/dist/impl/handle_hierarchy_parent.d.ts +33 -0
  345. package/dist/impl/handle_hierarchy_parent.js +103 -0
  346. package/dist/impl/handle_hierarchy_parent.js.map +1 -0
  347. package/dist/impl/historical_access/address_space_historical_data_node.d.ts +21 -0
  348. package/dist/impl/historical_access/address_space_historical_data_node.js +658 -0
  349. package/dist/impl/historical_access/address_space_historical_data_node.js.map +1 -0
  350. package/dist/impl/historizer_factory.d.ts +18 -0
  351. package/dist/impl/historizer_factory.js +16 -0
  352. package/dist/impl/historizer_factory.js.map +1 -0
  353. package/dist/impl/idx_iterator.js.map +1 -0
  354. package/dist/impl/namespace_impl.d.ts +469 -0
  355. package/dist/impl/namespace_impl.js +1845 -0
  356. package/dist/impl/namespace_impl.js.map +1 -0
  357. package/dist/impl/namespace_private.d.ts +25 -0
  358. package/dist/impl/namespace_private.js.map +1 -0
  359. package/dist/impl/nodeid_manager.js +249 -0
  360. package/dist/impl/nodeid_manager.js.map +1 -0
  361. package/dist/impl/nodeset_tools/adjust_namespace_array.js.map +1 -0
  362. package/dist/impl/nodeset_tools/construct_namespace_dependency.d.ts +37 -0
  363. package/dist/impl/nodeset_tools/construct_namespace_dependency.js +352 -0
  364. package/dist/impl/nodeset_tools/construct_namespace_dependency.js.map +1 -0
  365. package/dist/impl/nodeset_tools/dump_to_bsd.d.ts +10 -0
  366. package/dist/impl/nodeset_tools/dump_to_bsd.js +176 -0
  367. package/dist/impl/nodeset_tools/dump_to_bsd.js.map +1 -0
  368. package/dist/impl/nodeset_tools/nodeset_to_records.d.ts +67 -0
  369. package/dist/impl/nodeset_tools/nodeset_to_records.js +773 -0
  370. package/dist/impl/nodeset_tools/nodeset_to_records.js.map +1 -0
  371. package/dist/impl/nodeset_tools/nodeset_to_xml.d.ts +28 -0
  372. package/dist/impl/nodeset_tools/nodeset_to_xml.js +1132 -0
  373. package/dist/impl/nodeset_tools/nodeset_to_xml.js.map +1 -0
  374. package/dist/impl/private_namespace.d.ts +5 -0
  375. package/dist/impl/private_namespace.js.map +1 -0
  376. package/dist/impl/reference_impl.d.ts +82 -0
  377. package/dist/impl/reference_impl.js +207 -0
  378. package/dist/impl/reference_impl.js.map +1 -0
  379. package/dist/impl/reference_type_version.d.ts +22 -0
  380. package/dist/impl/reference_type_version.js +22 -0
  381. package/dist/impl/reference_type_version.js.map +1 -0
  382. package/dist/impl/role_permissions.js.map +1 -0
  383. package/dist/impl/state_machine/finite_state_machine.d.ts +81 -0
  384. package/dist/impl/state_machine/finite_state_machine.js +573 -0
  385. package/dist/impl/state_machine/finite_state_machine.js.map +1 -0
  386. package/dist/impl/state_machine/ua_shelving_state_machine_ex.d.ts +64 -0
  387. package/dist/impl/state_machine/ua_shelving_state_machine_ex.js +249 -0
  388. package/dist/impl/state_machine/ua_shelving_state_machine_ex.js.map +1 -0
  389. package/dist/impl/state_machine/ua_two_state_variable.d.ts +55 -0
  390. package/dist/impl/state_machine/ua_two_state_variable.js +323 -0
  391. package/dist/impl/state_machine/ua_two_state_variable.js.map +1 -0
  392. package/dist/impl/tool_isSubtypeOf.d.ts +18 -0
  393. package/dist/impl/tool_isSubtypeOf.js +138 -0
  394. package/dist/impl/tool_isSubtypeOf.js.map +1 -0
  395. package/dist/impl/ua_condition_type.js.map +1 -0
  396. package/dist/impl/ua_data_type_impl.d.ts +87 -0
  397. package/dist/impl/ua_data_type_impl.js +391 -0
  398. package/dist/impl/ua_data_type_impl.js.map +1 -0
  399. package/dist/impl/ua_method_impl.d.ts +48 -0
  400. package/dist/impl/ua_method_impl.js +281 -0
  401. package/dist/impl/ua_method_impl.js.map +1 -0
  402. package/dist/impl/ua_object_impl.d.ts +38 -0
  403. package/dist/impl/ua_object_impl.js +214 -0
  404. package/dist/impl/ua_object_impl.js.map +1 -0
  405. package/dist/impl/ua_object_type_impl.d.ts +55 -0
  406. package/dist/impl/ua_object_type_impl.js +131 -0
  407. package/dist/impl/ua_object_type_impl.js.map +1 -0
  408. package/dist/impl/ua_reference_type_impl.d.ts +42 -0
  409. package/dist/impl/ua_reference_type_impl.js +157 -0
  410. package/dist/impl/ua_reference_type_impl.js.map +1 -0
  411. package/dist/impl/ua_variable_impl.d.ts +391 -0
  412. package/dist/impl/ua_variable_impl.js +2001 -0
  413. package/dist/impl/ua_variable_impl.js.map +1 -0
  414. package/dist/impl/ua_variable_impl_ext_obj.d.ts +23 -0
  415. package/dist/impl/ua_variable_impl_ext_obj.js +753 -0
  416. package/dist/impl/ua_variable_impl_ext_obj.js.map +1 -0
  417. package/dist/impl/ua_variable_type_impl.d.ts +79 -0
  418. package/dist/impl/ua_variable_type_impl.js +279 -0
  419. package/dist/impl/ua_variable_type_impl.js.map +1 -0
  420. package/dist/impl/ua_view_impl.d.ts +18 -0
  421. package/dist/impl/ua_view_impl.js +45 -0
  422. package/dist/impl/ua_view_impl.js.map +1 -0
  423. package/dist/impl/validate_data_type_correctness.d.ts +6 -0
  424. package/dist/impl/validate_data_type_correctness.js +123 -0
  425. package/dist/impl/validate_data_type_correctness.js.map +1 -0
  426. package/dist/tsconfig_base.tsbuildinfo +1 -1
  427. package/distHelpers/address_space_digest.d.ts +4 -0
  428. package/distHelpers/address_space_digest.js +9 -0
  429. package/distHelpers/address_space_digest.js.map +1 -0
  430. package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
  431. package/distHelpers/assertHasMatchingReference.d.ts +1 -1
  432. package/distHelpers/boiler_system.d.ts +1 -1
  433. package/distHelpers/boiler_system.js +3 -3
  434. package/distHelpers/boiler_system.js.map +1 -1
  435. package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
  436. package/distHelpers/get_address_space_fixture.js +38 -22
  437. package/distHelpers/get_address_space_fixture.js.map +1 -1
  438. package/distHelpers/get_mini_address_space.d.ts +1 -1
  439. package/distHelpers/get_mini_address_space.js +7 -7
  440. package/distHelpers/get_mini_address_space.js.map +1 -1
  441. package/distHelpers/index.d.ts +9 -9
  442. package/distHelpers/index.js +9 -9
  443. package/distHelpers/index.js.map +1 -1
  444. package/distHelpers/mock_session.d.ts +1 -1
  445. package/distHelpers/mock_session.js +2 -2
  446. package/distHelpers/mock_session.js.map +1 -1
  447. package/distNodeJS/address_space_digest.d.ts +13 -0
  448. package/distNodeJS/address_space_digest.js +31 -0
  449. package/distNodeJS/address_space_digest.js.map +1 -0
  450. package/distNodeJS/generate_address_space.d.ts +35 -2
  451. package/distNodeJS/generate_address_space.js +201 -7
  452. package/distNodeJS/generate_address_space.js.map +1 -1
  453. package/distNodeJS/index.d.ts +3 -1
  454. package/distNodeJS/index.js +3 -1
  455. package/distNodeJS/index.js.map +1 -1
  456. package/distNodeJS/nodeset_image_file_store.d.ts +29 -0
  457. package/distNodeJS/nodeset_image_file_store.js +120 -0
  458. package/distNodeJS/nodeset_image_file_store.js.map +1 -0
  459. package/impl/_instantiate_helpers.ts +197 -0
  460. package/impl/_mandatory_child_or_requested_optional_filter.ts +100 -0
  461. package/impl/address_space.ts +1572 -0
  462. package/impl/address_space_change_event_tools.ts +177 -0
  463. package/impl/address_space_private.ts +100 -0
  464. package/impl/alarms_and_conditions/condition_info_impl.ts +45 -0
  465. package/impl/alarms_and_conditions/condition_snapshot_impl.ts +793 -0
  466. package/impl/alarms_and_conditions/deviation_alarm_helper.ts +73 -0
  467. package/impl/alarms_and_conditions/index.ts +16 -0
  468. package/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +351 -0
  469. package/impl/alarms_and_conditions/ua_alarm_condition_impl.ts +515 -0
  470. package/impl/alarms_and_conditions/ua_base_event_impl.ts +61 -0
  471. package/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +246 -0
  472. package/impl/alarms_and_conditions/ua_condition_impl.ts +1286 -0
  473. package/impl/alarms_and_conditions/ua_discrete_alarm_impl.ts +60 -0
  474. package/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +95 -0
  475. package/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +21 -0
  476. package/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +112 -0
  477. package/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +25 -0
  478. package/impl/alarms_and_conditions/ua_limit_alarm_impl.ts +265 -0
  479. package/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +94 -0
  480. package/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +232 -0
  481. package/impl/alarms_and_conditions/ua_off_normal_alarm_impl.ts +216 -0
  482. package/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +26 -0
  483. package/impl/apply_condition_refresh.ts +56 -0
  484. package/impl/base_node_impl.ts +2165 -0
  485. package/impl/base_node_private.ts +1420 -0
  486. package/impl/child_accessors.ts +239 -0
  487. package/impl/data_access/adjust_datavalue_status_code.ts +36 -0
  488. package/impl/data_access/ua_multistate_discrete_impl.ts +198 -0
  489. package/impl/data_access/ua_multistate_value_discrete_impl.ts +384 -0
  490. package/impl/data_access/ua_two_state_discrete_impl.ts +195 -0
  491. package/impl/event_data.ts +80 -0
  492. package/impl/event_layout.ts +141 -0
  493. package/impl/extension_object_array_node.ts +343 -0
  494. package/impl/handle_hierarchy_parent.ts +133 -0
  495. package/impl/historical_access/address_space_historical_data_node.ts +849 -0
  496. package/impl/historizer_factory.ts +17 -0
  497. package/impl/namespace_impl.ts +2323 -0
  498. package/impl/namespace_private.ts +68 -0
  499. package/impl/nodeid_manager.ts +293 -0
  500. package/impl/nodeset_tools/construct_namespace_dependency.ts +381 -0
  501. package/impl/nodeset_tools/dump_to_bsd.ts +210 -0
  502. package/impl/nodeset_tools/nodeset_to_records.ts +846 -0
  503. package/impl/nodeset_tools/nodeset_to_xml.ts +1326 -0
  504. package/impl/private_namespace.ts +21 -0
  505. package/impl/reference_impl.ts +244 -0
  506. package/impl/reference_type_version.ts +19 -0
  507. package/impl/state_machine/finite_state_machine.ts +676 -0
  508. package/impl/state_machine/ua_shelving_state_machine_ex.ts +356 -0
  509. package/impl/state_machine/ua_two_state_variable.ts +421 -0
  510. package/impl/tool_isSubtypeOf.ts +168 -0
  511. package/impl/ua_data_type_impl.ts +486 -0
  512. package/impl/ua_method_impl.ts +364 -0
  513. package/impl/ua_object_impl.ts +278 -0
  514. package/impl/ua_object_type_impl.ts +179 -0
  515. package/impl/ua_reference_type_impl.ts +179 -0
  516. package/impl/ua_variable_impl.ts +2559 -0
  517. package/impl/ua_variable_impl_ext_obj.ts +904 -0
  518. package/impl/ua_variable_type_impl.ts +390 -0
  519. package/impl/ua_view_impl.ts +53 -0
  520. package/impl/validate_data_type_correctness.ts +142 -0
  521. package/package.json +49 -44
  522. package/source_nodejs/address_space_digest.ts +35 -0
  523. package/source_nodejs/generate_address_space.ts +181 -8
  524. package/source_nodejs/index.ts +3 -1
  525. package/source_nodejs/nodeset_image_file_store.ts +127 -0
  526. package/dist/source/address_space_ts.d.ts +0 -128
  527. package/dist/source/address_space_ts.js +0 -23
  528. package/dist/source/address_space_ts.js.map +0 -1
  529. package/dist/source/continuation_points/continuation_point_manager.js +0 -230
  530. package/dist/source/continuation_points/continuation_point_manager.js.map +0 -1
  531. package/dist/source/helpers/adjust_browse_direction.js.map +0 -1
  532. package/dist/source/helpers/argument_list.js +0 -263
  533. package/dist/source/helpers/argument_list.js.map +0 -1
  534. package/dist/source/helpers/call_helpers.js +0 -80
  535. package/dist/source/helpers/call_helpers.js.map +0 -1
  536. package/dist/source/helpers/coerce_enum_value.d.ts +0 -6
  537. package/dist/source/helpers/coerce_enum_value.js.map +0 -1
  538. package/dist/source/helpers/dump_tools.js +0 -81
  539. package/dist/source/helpers/dump_tools.js.map +0 -1
  540. package/dist/source/helpers/ensure_secure_access.d.ts +0 -9
  541. package/dist/source/helpers/ensure_secure_access.js +0 -58
  542. package/dist/source/helpers/ensure_secure_access.js.map +0 -1
  543. package/dist/source/helpers/make_optionals_map.js.map +0 -1
  544. package/dist/source/helpers/multiform_func.js +0 -75
  545. package/dist/source/helpers/multiform_func.js.map +0 -1
  546. package/dist/source/helpers/resolve_opaque_on_address_space.js +0 -25
  547. package/dist/source/helpers/resolve_opaque_on_address_space.js.map +0 -1
  548. package/dist/source/index.d.ts +0 -66
  549. package/dist/source/index.js +0 -97
  550. package/dist/source/index.js.map +0 -1
  551. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +0 -21
  552. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js +0 -3
  553. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js.map +0 -1
  554. package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +0 -150
  555. package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js.map +0 -1
  556. package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +0 -12
  557. package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js.map +0 -1
  558. package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js.map +0 -1
  559. package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +0 -7
  560. package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +0 -1
  561. package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +0 -1
  562. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +0 -4
  563. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +0 -1
  564. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +0 -4
  565. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +0 -1
  566. package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +0 -10
  567. package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +0 -1
  568. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +0 -4
  569. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +0 -1
  570. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +0 -4
  571. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +0 -1
  572. package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +0 -20
  573. package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +0 -1
  574. package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +0 -21
  575. package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +0 -1
  576. package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +0 -33
  577. package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +0 -1
  578. package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +0 -1
  579. package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +0 -19
  580. package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +0 -1
  581. package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +0 -44
  582. package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js.map +0 -1
  583. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +0 -4
  584. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +0 -1
  585. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +0 -5
  586. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +0 -1
  587. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +0 -19
  588. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +0 -1
  589. package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +0 -25
  590. package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +0 -1
  591. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +0 -8
  592. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +0 -1
  593. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +0 -10
  594. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +0 -1
  595. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +0 -44
  596. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js.map +0 -1
  597. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +0 -22
  598. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +0 -1
  599. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +0 -13
  600. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js.map +0 -1
  601. package/dist/source/interfaces/data_access/ua_y_array_item_ex.js.map +0 -1
  602. package/dist/source/interfaces/extension_object_constructor.js.map +0 -1
  603. package/dist/source/interfaces/i_condition_variable_type_setter_options.js.map +0 -1
  604. package/dist/source/interfaces/i_set_state_options.js.map +0 -1
  605. package/dist/source/interfaces/nodeset_loader_options.d.ts +0 -37
  606. package/dist/source/interfaces/nodeset_loader_options.js.map +0 -1
  607. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +0 -12
  608. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +0 -1
  609. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +0 -49
  610. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js.map +0 -1
  611. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +0 -11
  612. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js.map +0 -1
  613. package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +0 -29
  614. package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +0 -1
  615. package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +0 -236
  616. package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +0 -1
  617. package/dist/source/interfaces/state_machine/ua_transition_ex.js.map +0 -1
  618. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +0 -1
  619. package/dist/source/loader/decode_xml_extension_object.d.ts +0 -6
  620. package/dist/source/loader/decode_xml_extension_object.js +0 -69
  621. package/dist/source/loader/decode_xml_extension_object.js.map +0 -1
  622. package/dist/source/loader/ensure_datatype_extracted.js +0 -88
  623. package/dist/source/loader/ensure_datatype_extracted.js.map +0 -1
  624. package/dist/source/loader/generateAddressSpaceRaw.d.ts +0 -29
  625. package/dist/source/loader/generateAddressSpaceRaw.js +0 -188
  626. package/dist/source/loader/generateAddressSpaceRaw.js.map +0 -1
  627. package/dist/source/loader/load_nodeset2.d.ts +0 -15
  628. package/dist/source/loader/load_nodeset2.js +0 -1047
  629. package/dist/source/loader/load_nodeset2.js.map +0 -1
  630. package/dist/source/loader/make_semver_compatible.js.map +0 -1
  631. package/dist/source/loader/make_xml_extension_object_parser.js +0 -422
  632. package/dist/source/loader/make_xml_extension_object_parser.js.map +0 -1
  633. package/dist/source/loader/namespace_post_step.js +0 -57
  634. package/dist/source/loader/namespace_post_step.js.map +0 -1
  635. package/dist/source/loader/parsers/extension_object_parser.js +0 -274
  636. package/dist/source/loader/parsers/extension_object_parser.js.map +0 -1
  637. package/dist/source/loader/parsers/localized_text_parser.js.map +0 -1
  638. package/dist/source/loader/parsers/nodeid_parser.js.map +0 -1
  639. package/dist/source/loader/parsers/qualified_name_parser.js.map +0 -1
  640. package/dist/source/loader/parsers/variant_parser.d.ts +0 -35
  641. package/dist/source/loader/parsers/variant_parser.js +0 -331
  642. package/dist/source/loader/parsers/variant_parser.js.map +0 -1
  643. package/dist/source/loader/register_node_promoter.d.ts +0 -2
  644. package/dist/source/loader/register_node_promoter.js +0 -9
  645. package/dist/source/loader/register_node_promoter.js.map +0 -1
  646. package/dist/source/namespace.d.ts +0 -6
  647. package/dist/source/namespace.js.map +0 -1
  648. package/dist/source/namespace_alarm_and_condition.d.ts +0 -33
  649. package/dist/source/namespace_alarm_and_condition.js.map +0 -1
  650. package/dist/source/namespace_data_access.d.ts +0 -67
  651. package/dist/source/namespace_data_access.js.map +0 -1
  652. package/dist/source/namespace_machine_state.d.ts +0 -8
  653. package/dist/source/namespace_machine_state.js.map +0 -1
  654. package/dist/source/pseudo_session.d.ts +0 -74
  655. package/dist/source/pseudo_session.js +0 -308
  656. package/dist/source/pseudo_session.js.map +0 -1
  657. package/dist/source/session_context.d.ts +0 -241
  658. package/dist/source/session_context.js +0 -517
  659. package/dist/source/session_context.js.map +0 -1
  660. package/dist/source/set_namespace_meta_data.js.map +0 -1
  661. package/dist/source/ua_addin.js.map +0 -1
  662. package/dist/source/ua_interface.js +0 -25
  663. package/dist/source/ua_interface.js.map +0 -1
  664. package/dist/source/ua_root_folder.js.map +0 -1
  665. package/dist/source/ua_two_state_variable_ex.d.ts +0 -24
  666. package/dist/source/ua_two_state_variable_ex.js.map +0 -1
  667. package/dist/source/xml_writer.js.map +0 -1
  668. package/dist/src/_instantiate_helpers.js +0 -99
  669. package/dist/src/_instantiate_helpers.js.map +0 -1
  670. package/dist/src/_mandatory_child_or_requested_optional_filter.js +0 -82
  671. package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +0 -1
  672. package/dist/src/address_space.d.ts +0 -369
  673. package/dist/src/address_space.js +0 -1416
  674. package/dist/src/address_space.js.map +0 -1
  675. package/dist/src/address_space_change_event_tools.d.ts +0 -6
  676. package/dist/src/address_space_change_event_tools.js.map +0 -1
  677. package/dist/src/address_space_private.d.ts +0 -45
  678. package/dist/src/address_space_private.js.map +0 -1
  679. package/dist/src/alarms_and_conditions/condition.js.map +0 -1
  680. package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +0 -18
  681. package/dist/src/alarms_and_conditions/condition_info_impl.js +0 -38
  682. package/dist/src/alarms_and_conditions/condition_info_impl.js.map +0 -1
  683. package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +0 -269
  684. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +0 -699
  685. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +0 -1
  686. package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +0 -12
  687. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +0 -66
  688. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +0 -1
  689. package/dist/src/alarms_and_conditions/index.d.ts +0 -16
  690. package/dist/src/alarms_and_conditions/index.js +0 -33
  691. package/dist/src/alarms_and_conditions/index.js.map +0 -1
  692. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +0 -42
  693. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +0 -243
  694. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +0 -1
  695. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +0 -80
  696. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +0 -415
  697. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +0 -1
  698. package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +0 -18
  699. package/dist/src/alarms_and_conditions/ua_base_event_impl.js +0 -33
  700. package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +0 -1
  701. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +0 -44
  702. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +0 -203
  703. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +0 -1
  704. package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +0 -104
  705. package/dist/src/alarms_and_conditions/ua_condition_impl.js +0 -1017
  706. package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +0 -1
  707. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +0 -19
  708. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +0 -39
  709. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +0 -1
  710. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +0 -25
  711. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +0 -55
  712. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +0 -1
  713. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +0 -11
  714. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +0 -12
  715. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +0 -1
  716. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +0 -23
  717. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +0 -87
  718. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +0 -1
  719. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +0 -10
  720. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +0 -8
  721. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +0 -1
  722. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +0 -26
  723. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +0 -208
  724. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +0 -1
  725. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +0 -23
  726. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +0 -55
  727. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +0 -1
  728. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +0 -27
  729. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +0 -173
  730. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +0 -1
  731. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +0 -43
  732. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +0 -168
  733. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +0 -1
  734. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +0 -18
  735. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +0 -18
  736. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +0 -1
  737. package/dist/src/apply_condition_refresh.d.ts +0 -4
  738. package/dist/src/apply_condition_refresh.js +0 -27
  739. package/dist/src/apply_condition_refresh.js.map +0 -1
  740. package/dist/src/base_node_impl.d.ts +0 -287
  741. package/dist/src/base_node_impl.js +0 -1538
  742. package/dist/src/base_node_impl.js.map +0 -1
  743. package/dist/src/base_node_private.d.ts +0 -87
  744. package/dist/src/base_node_private.js +0 -925
  745. package/dist/src/base_node_private.js.map +0 -1
  746. package/dist/src/check_value_rank_compatibility.js.map +0 -1
  747. package/dist/src/data_access/add_dataItem_stuff.js.map +0 -1
  748. package/dist/src/data_access/adjust_datavalue_status_code.d.ts +0 -7
  749. package/dist/src/data_access/adjust_datavalue_status_code.js.map +0 -1
  750. package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +0 -35
  751. package/dist/src/data_access/ua_multistate_discrete_impl.js +0 -142
  752. package/dist/src/data_access/ua_multistate_discrete_impl.js.map +0 -1
  753. package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +0 -51
  754. package/dist/src/data_access/ua_multistate_value_discrete_impl.js +0 -302
  755. package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +0 -1
  756. package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +0 -20
  757. package/dist/src/data_access/ua_two_state_discrete_impl.js +0 -163
  758. package/dist/src/data_access/ua_two_state_discrete_impl.js.map +0 -1
  759. package/dist/src/event_data.d.ts +0 -18
  760. package/dist/src/event_data.js +0 -70
  761. package/dist/src/event_data.js.map +0 -1
  762. package/dist/src/extension_object_array_node.d.ts +0 -34
  763. package/dist/src/extension_object_array_node.js +0 -262
  764. package/dist/src/extension_object_array_node.js.map +0 -1
  765. package/dist/src/get_basic_datatype.js.map +0 -1
  766. package/dist/src/historical_access/address_space_historical_data_node.d.ts +0 -21
  767. package/dist/src/historical_access/address_space_historical_data_node.js +0 -654
  768. package/dist/src/historical_access/address_space_historical_data_node.js.map +0 -1
  769. package/dist/src/idx_iterator.js.map +0 -1
  770. package/dist/src/index_current.d.ts +0 -50
  771. package/dist/src/index_current.js +0 -82
  772. package/dist/src/index_current.js.map +0 -1
  773. package/dist/src/namespace_impl.d.ts +0 -450
  774. package/dist/src/namespace_impl.js +0 -1876
  775. package/dist/src/namespace_impl.js.map +0 -1
  776. package/dist/src/namespace_private.d.ts +0 -31
  777. package/dist/src/namespace_private.js.map +0 -1
  778. package/dist/src/nodeid_manager.js +0 -249
  779. package/dist/src/nodeid_manager.js.map +0 -1
  780. package/dist/src/nodeset_tools/adjust_namespace_array.js.map +0 -1
  781. package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +0 -33
  782. package/dist/src/nodeset_tools/construct_namespace_dependency.js +0 -347
  783. package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +0 -1
  784. package/dist/src/nodeset_tools/dump_to_bsd.d.ts +0 -2
  785. package/dist/src/nodeset_tools/dump_to_bsd.js +0 -164
  786. package/dist/src/nodeset_tools/dump_to_bsd.js.map +0 -1
  787. package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +0 -12
  788. package/dist/src/nodeset_tools/nodeset_to_xml.js +0 -1381
  789. package/dist/src/nodeset_tools/nodeset_to_xml.js.map +0 -1
  790. package/dist/src/private_namespace.d.ts +0 -5
  791. package/dist/src/private_namespace.js.map +0 -1
  792. package/dist/src/reference_impl.d.ts +0 -43
  793. package/dist/src/reference_impl.js +0 -152
  794. package/dist/src/reference_impl.js.map +0 -1
  795. package/dist/src/role_permissions.js.map +0 -1
  796. package/dist/src/state_machine/finite_state_machine.d.ts +0 -70
  797. package/dist/src/state_machine/finite_state_machine.js +0 -574
  798. package/dist/src/state_machine/finite_state_machine.js.map +0 -1
  799. package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +0 -39
  800. package/dist/src/state_machine/ua_shelving_state_machine_ex.js +0 -249
  801. package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +0 -1
  802. package/dist/src/state_machine/ua_two_state_variable.d.ts +0 -55
  803. package/dist/src/state_machine/ua_two_state_variable.js +0 -323
  804. package/dist/src/state_machine/ua_two_state_variable.js.map +0 -1
  805. package/dist/src/tool_isSubtypeOf.d.ts +0 -18
  806. package/dist/src/tool_isSubtypeOf.js +0 -130
  807. package/dist/src/tool_isSubtypeOf.js.map +0 -1
  808. package/dist/src/ua_condition_type.js.map +0 -1
  809. package/dist/src/ua_data_type_impl.d.ts +0 -87
  810. package/dist/src/ua_data_type_impl.js +0 -393
  811. package/dist/src/ua_data_type_impl.js.map +0 -1
  812. package/dist/src/ua_method_impl.d.ts +0 -48
  813. package/dist/src/ua_method_impl.js +0 -280
  814. package/dist/src/ua_method_impl.js.map +0 -1
  815. package/dist/src/ua_object_impl.d.ts +0 -38
  816. package/dist/src/ua_object_impl.js +0 -214
  817. package/dist/src/ua_object_impl.js.map +0 -1
  818. package/dist/src/ua_object_type_impl.d.ts +0 -55
  819. package/dist/src/ua_object_type_impl.js +0 -131
  820. package/dist/src/ua_object_type_impl.js.map +0 -1
  821. package/dist/src/ua_reference_type_impl.d.ts +0 -42
  822. package/dist/src/ua_reference_type_impl.js +0 -146
  823. package/dist/src/ua_reference_type_impl.js.map +0 -1
  824. package/dist/src/ua_variable_impl.d.ts +0 -379
  825. package/dist/src/ua_variable_impl.js +0 -1940
  826. package/dist/src/ua_variable_impl.js.map +0 -1
  827. package/dist/src/ua_variable_impl_ext_obj.d.ts +0 -23
  828. package/dist/src/ua_variable_impl_ext_obj.js +0 -752
  829. package/dist/src/ua_variable_impl_ext_obj.js.map +0 -1
  830. package/dist/src/ua_variable_type_impl.d.ts +0 -79
  831. package/dist/src/ua_variable_type_impl.js +0 -276
  832. package/dist/src/ua_variable_type_impl.js.map +0 -1
  833. package/dist/src/ua_view_impl.d.ts +0 -18
  834. package/dist/src/ua_view_impl.js +0 -45
  835. package/dist/src/ua_view_impl.js.map +0 -1
  836. package/dist/src/validate_data_type_correctness.d.ts +0 -6
  837. package/dist/src/validate_data_type_correctness.js +0 -106
  838. package/dist/src/validate_data_type_correctness.js.map +0 -1
  839. package/source/address_space_ts.ts +0 -220
  840. package/source/continuation_points/continuation_point_manager.ts +0 -271
  841. package/source/helpers/argument_list.ts +0 -310
  842. package/source/helpers/call_helpers.ts +0 -100
  843. package/source/helpers/coerce_enum_value.ts +0 -33
  844. package/source/helpers/dump_tools.ts +0 -90
  845. package/source/helpers/ensure_secure_access.ts +0 -57
  846. package/source/helpers/multiform_func.ts +0 -78
  847. package/source/helpers/resolve_opaque_on_address_space.ts +0 -26
  848. package/source/index.ts +0 -72
  849. package/source/interfaces/alarms_and_conditions/condition_info_i.ts +0 -24
  850. package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +0 -235
  851. package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +0 -16
  852. package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +0 -8
  853. package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +0 -6
  854. package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +0 -6
  855. package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +0 -13
  856. package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +0 -6
  857. package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +0 -6
  858. package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +0 -21
  859. package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +0 -28
  860. package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +0 -43
  861. package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +0 -36
  862. package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +0 -55
  863. package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +0 -17
  864. package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +0 -21
  865. package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +0 -21
  866. package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +0 -26
  867. package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +0 -29
  868. package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +0 -25
  869. package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +0 -57
  870. package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +0 -31
  871. package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +0 -15
  872. package/source/interfaces/nodeset_loader_options.ts +0 -38
  873. package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +0 -20
  874. package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +0 -50
  875. package/source/interfaces/state_machine/ua_program_state_machine_type.ts +0 -14
  876. package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +0 -35
  877. package/source/interfaces/state_machine/ua_state_machine_type.ts +0 -288
  878. package/source/loader/decode_xml_extension_object.ts +0 -80
  879. package/source/loader/ensure_datatype_extracted.ts +0 -122
  880. package/source/loader/generateAddressSpaceRaw.ts +0 -219
  881. package/source/loader/load_nodeset2.ts +0 -1275
  882. package/source/loader/make_xml_extension_object_parser.ts +0 -524
  883. package/source/loader/namespace_post_step.ts +0 -68
  884. package/source/loader/parsers/extension_object_parser.ts +0 -374
  885. package/source/loader/parsers/variant_parser.ts +0 -433
  886. package/source/loader/register_node_promoter.ts +0 -6
  887. package/source/namespace.ts +0 -7
  888. package/source/namespace_alarm_and_condition.ts +0 -78
  889. package/source/namespace_data_access.ts +0 -92
  890. package/source/namespace_machine_state.ts +0 -20
  891. package/source/pseudo_session.ts +0 -415
  892. package/source/session_context.ts +0 -717
  893. package/source/ua_interface.ts +0 -38
  894. package/source/ua_two_state_variable_ex.ts +0 -36
  895. package/src/_instantiate_helpers.ts +0 -197
  896. package/src/_mandatory_child_or_requested_optional_filter.ts +0 -100
  897. package/src/address_space.ts +0 -1631
  898. package/src/address_space_change_event_tools.ts +0 -177
  899. package/src/address_space_private.ts +0 -96
  900. package/src/alarms_and_conditions/condition_info_impl.ts +0 -44
  901. package/src/alarms_and_conditions/condition_snapshot_impl.ts +0 -792
  902. package/src/alarms_and_conditions/deviation_alarm_helper.ts +0 -73
  903. package/src/alarms_and_conditions/index.ts +0 -16
  904. package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +0 -331
  905. package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +0 -479
  906. package/src/alarms_and_conditions/ua_base_event_impl.ts +0 -42
  907. package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +0 -244
  908. package/src/alarms_and_conditions/ua_condition_impl.ts +0 -1261
  909. package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +0 -57
  910. package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +0 -94
  911. package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +0 -20
  912. package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +0 -109
  913. package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +0 -25
  914. package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +0 -244
  915. package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +0 -88
  916. package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +0 -223
  917. package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +0 -218
  918. package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +0 -26
  919. package/src/apply_condition_refresh.ts +0 -29
  920. package/src/base_node_impl.ts +0 -1907
  921. package/src/base_node_private.ts +0 -1287
  922. package/src/data_access/adjust_datavalue_status_code.ts +0 -36
  923. package/src/data_access/ua_multistate_discrete_impl.ts +0 -189
  924. package/src/data_access/ua_multistate_value_discrete_impl.ts +0 -369
  925. package/src/data_access/ua_two_state_discrete_impl.ts +0 -184
  926. package/src/event_data.ts +0 -83
  927. package/src/extension_object_array_node.ts +0 -331
  928. package/src/historical_access/address_space_historical_data_node.ts +0 -842
  929. package/src/index_current.ts +0 -51
  930. package/src/namespace_impl.ts +0 -2380
  931. package/src/namespace_private.ts +0 -77
  932. package/src/nodeid_manager.ts +0 -293
  933. package/src/nodeset_tools/construct_namespace_dependency.ts +0 -375
  934. package/src/nodeset_tools/dump_to_bsd.ts +0 -201
  935. package/src/nodeset_tools/nodeset_to_xml.ts +0 -1652
  936. package/src/private_namespace.ts +0 -21
  937. package/src/reference_impl.ts +0 -171
  938. package/src/state_machine/finite_state_machine.ts +0 -668
  939. package/src/state_machine/ua_shelving_state_machine_ex.ts +0 -330
  940. package/src/state_machine/ua_two_state_variable.ts +0 -421
  941. package/src/tool_isSubtypeOf.ts +0 -160
  942. package/src/ua_data_type_impl.ts +0 -483
  943. package/src/ua_method_impl.ts +0 -362
  944. package/src/ua_object_impl.ts +0 -278
  945. package/src/ua_object_type_impl.ts +0 -179
  946. package/src/ua_reference_type_impl.ts +0 -170
  947. package/src/ua_variable_impl.ts +0 -2489
  948. package/src/ua_variable_impl_ext_obj.ts +0 -903
  949. package/src/ua_variable_type_impl.ts +0 -385
  950. package/src/ua_view_impl.ts +0 -53
  951. package/src/validate_data_type_correctness.ts +0 -124
  952. /package/{source → api}/helpers/adjust_browse_direction.ts +0 -0
  953. /package/{source → api}/helpers/make_optionals_map.ts +0 -0
  954. /package/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.ts +0 -0
  955. /package/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.ts +0 -0
  956. /package/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.ts +0 -0
  957. /package/{source → api}/interfaces/data_access/ua_y_array_item_ex.ts +0 -0
  958. /package/{source → api}/interfaces/extension_object_constructor.ts +0 -0
  959. /package/{source → api}/interfaces/i_condition_variable_type_setter_options.ts +0 -0
  960. /package/{source → api}/interfaces/i_set_state_options.ts +0 -0
  961. /package/{source → api}/interfaces/state_machine/ua_transition_ex.ts +0 -0
  962. /package/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.ts +0 -0
  963. /package/{source → api}/loader/make_semver_compatible.ts +0 -0
  964. /package/{source → api}/loader/parsers/localized_text_parser.ts +0 -0
  965. /package/{source → api}/loader/parsers/nodeid_parser.ts +0 -0
  966. /package/{source → api}/loader/parsers/qualified_name_parser.ts +0 -0
  967. /package/{source → api}/set_namespace_meta_data.ts +0 -0
  968. /package/{source → api}/ua_addin.ts +0 -0
  969. /package/{source → api}/ua_root_folder.ts +0 -0
  970. /package/{source → api}/xml_writer.ts +0 -0
  971. /package/dist/{source → api}/continuation_points/continuation_point_manager.d.ts +0 -0
  972. /package/dist/{source → api}/helpers/adjust_browse_direction.d.ts +0 -0
  973. /package/dist/{source → api}/helpers/adjust_browse_direction.js +0 -0
  974. /package/dist/{source → api}/helpers/argument_list.d.ts +0 -0
  975. /package/dist/{source → api}/helpers/call_helpers.d.ts +0 -0
  976. /package/dist/{source → api}/helpers/coerce_enum_value.js +0 -0
  977. /package/dist/{source → api}/helpers/dump_tools.d.ts +0 -0
  978. /package/dist/{source → api}/helpers/make_optionals_map.d.ts +0 -0
  979. /package/dist/{source → api}/helpers/make_optionals_map.js +0 -0
  980. /package/dist/{source → api}/helpers/multiform_func.d.ts +0 -0
  981. /package/dist/{source → api}/helpers/resolve_opaque_on_address_space.d.ts +0 -0
  982. /package/dist/{source → api}/interfaces/alarms_and_conditions/condition_snapshot.js +0 -0
  983. /package/dist/{source → api}/interfaces/alarms_and_conditions/deviation_stuff.js +0 -0
  984. /package/dist/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +0 -0
  985. /package/dist/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.js +0 -0
  986. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js +0 -0
  987. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +0 -0
  988. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.js +0 -0
  989. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js +0 -0
  990. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js +0 -0
  991. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js +0 -0
  992. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js +0 -0
  993. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js +0 -0
  994. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js +0 -0
  995. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js +0 -0
  996. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js +0 -0
  997. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +0 -0
  998. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.js +0 -0
  999. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js +0 -0
  1000. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_condition_ex.js +0 -0
  1001. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -0
  1002. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js +0 -0
  1003. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js +0 -0
  1004. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js +0 -0
  1005. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js +0 -0
  1006. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js +0 -0
  1007. /package/dist/{source → api}/interfaces/data_access/ua_multistate_discrete_ex.js +0 -0
  1008. /package/dist/{source → api}/interfaces/data_access/ua_multistate_value_discrete_ex.js +0 -0
  1009. /package/dist/{source → api}/interfaces/data_access/ua_two_state_discrete_ex.js +0 -0
  1010. /package/dist/{source → api}/interfaces/data_access/ua_y_array_item_ex.d.ts +0 -0
  1011. /package/dist/{source → api}/interfaces/data_access/ua_y_array_item_ex.js +0 -0
  1012. /package/dist/{source → api}/interfaces/extension_object_constructor.d.ts +0 -0
  1013. /package/dist/{source → api}/interfaces/extension_object_constructor.js +0 -0
  1014. /package/dist/{source → api}/interfaces/i_condition_variable_type_setter_options.d.ts +0 -0
  1015. /package/dist/{source → api}/interfaces/i_condition_variable_type_setter_options.js +0 -0
  1016. /package/dist/{source → api}/interfaces/i_set_state_options.d.ts +0 -0
  1017. /package/dist/{source → api}/interfaces/i_set_state_options.js +0 -0
  1018. /package/dist/{source → api}/interfaces/nodeset_loader_options.js +0 -0
  1019. /package/dist/{source → api}/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +0 -0
  1020. /package/dist/{source → api}/interfaces/state_machine/ua_finite_state_machine_type.js +0 -0
  1021. /package/dist/{source → api}/interfaces/state_machine/ua_program_state_machine_type.js +0 -0
  1022. /package/dist/{source → api}/interfaces/state_machine/ua_shelved_state_machine_ex.js +0 -0
  1023. /package/dist/{source → api}/interfaces/state_machine/ua_state_machine_type.js +0 -0
  1024. /package/dist/{source → api}/interfaces/state_machine/ua_transition_ex.d.ts +0 -0
  1025. /package/dist/{source → api}/interfaces/state_machine/ua_transition_ex.js +0 -0
  1026. /package/dist/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +0 -0
  1027. /package/dist/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.js +0 -0
  1028. /package/dist/{source → api}/loader/ensure_datatype_extracted.d.ts +0 -0
  1029. /package/dist/{source → api}/loader/make_semver_compatible.d.ts +0 -0
  1030. /package/dist/{source → api}/loader/make_semver_compatible.js +0 -0
  1031. /package/dist/{source → api}/loader/make_xml_extension_object_parser.d.ts +0 -0
  1032. /package/dist/{source → api}/loader/namespace_post_step.d.ts +0 -0
  1033. /package/dist/{source → api}/loader/parsers/extension_object_parser.d.ts +0 -0
  1034. /package/dist/{source → api}/loader/parsers/localized_text_parser.d.ts +0 -0
  1035. /package/dist/{source → api}/loader/parsers/localized_text_parser.js +0 -0
  1036. /package/dist/{source → api}/loader/parsers/nodeid_parser.d.ts +0 -0
  1037. /package/dist/{source → api}/loader/parsers/nodeid_parser.js +0 -0
  1038. /package/dist/{source → api}/loader/parsers/qualified_name_parser.d.ts +0 -0
  1039. /package/dist/{source → api}/loader/parsers/qualified_name_parser.js +0 -0
  1040. /package/dist/{source → api}/namespace.js +0 -0
  1041. /package/dist/{source → api}/namespace_alarm_and_condition.js +0 -0
  1042. /package/dist/{source → api}/namespace_data_access.js +0 -0
  1043. /package/dist/{source → api}/namespace_machine_state.js +0 -0
  1044. /package/dist/{source → api}/set_namespace_meta_data.d.ts +0 -0
  1045. /package/dist/{source → api}/set_namespace_meta_data.js +0 -0
  1046. /package/dist/{source → api}/ua_addin.d.ts +0 -0
  1047. /package/dist/{source → api}/ua_addin.js +0 -0
  1048. /package/dist/{source → api}/ua_interface.d.ts +0 -0
  1049. /package/dist/{source → api}/ua_root_folder.d.ts +0 -0
  1050. /package/dist/{source → api}/ua_root_folder.js +0 -0
  1051. /package/dist/{source → api}/ua_two_state_variable_ex.js +0 -0
  1052. /package/dist/{source → api}/xml_writer.d.ts +0 -0
  1053. /package/dist/{source → api}/xml_writer.js +0 -0
  1054. /package/dist/{src → impl}/_instantiate_helpers.d.ts +0 -0
  1055. /package/dist/{src → impl}/_mandatory_child_or_requested_optional_filter.d.ts +0 -0
  1056. /package/dist/{src → impl}/address_space_change_event_tools.js +0 -0
  1057. /package/dist/{src → impl}/address_space_private.js +0 -0
  1058. /package/dist/{src → impl}/alarms_and_conditions/condition.d.ts +0 -0
  1059. /package/dist/{src → impl}/alarms_and_conditions/condition.js +0 -0
  1060. /package/dist/{src → impl}/check_value_rank_compatibility.d.ts +0 -0
  1061. /package/dist/{src → impl}/check_value_rank_compatibility.js +0 -0
  1062. /package/dist/{src → impl}/data_access/add_dataItem_stuff.d.ts +0 -0
  1063. /package/dist/{src → impl}/data_access/add_dataItem_stuff.js +0 -0
  1064. /package/dist/{src → impl}/data_access/adjust_datavalue_status_code.js +0 -0
  1065. /package/dist/{src → impl}/get_basic_datatype.d.ts +0 -0
  1066. /package/dist/{src → impl}/get_basic_datatype.js +0 -0
  1067. /package/dist/{src → impl}/idx_iterator.d.ts +0 -0
  1068. /package/dist/{src → impl}/idx_iterator.js +0 -0
  1069. /package/dist/{src → impl}/namespace_private.js +0 -0
  1070. /package/dist/{src → impl}/nodeid_manager.d.ts +0 -0
  1071. /package/dist/{src → impl}/nodeset_tools/adjust_namespace_array.d.ts +0 -0
  1072. /package/dist/{src → impl}/nodeset_tools/adjust_namespace_array.js +0 -0
  1073. /package/dist/{src → impl}/private_namespace.js +0 -0
  1074. /package/dist/{src → impl}/role_permissions.d.ts +0 -0
  1075. /package/dist/{src → impl}/role_permissions.js +0 -0
  1076. /package/dist/{src → impl}/ua_condition_type.d.ts +0 -0
  1077. /package/dist/{src → impl}/ua_condition_type.js +0 -0
  1078. /package/{src → impl}/alarms_and_conditions/condition.ts +0 -0
  1079. /package/{src → impl}/check_value_rank_compatibility.ts +0 -0
  1080. /package/{src → impl}/data_access/add_dataItem_stuff.ts +0 -0
  1081. /package/{src → impl}/get_basic_datatype.ts +0 -0
  1082. /package/{src → impl}/idx_iterator.ts +0 -0
  1083. /package/{src → impl}/nodeset_tools/adjust_namespace_array.ts +0 -0
  1084. /package/{src → impl}/role_permissions.ts +0 -0
  1085. /package/{src → impl}/ua_condition_type.ts +0 -0
@@ -1,1907 +0,0 @@
1
- /**
2
- * @module node-opcua-address-space
3
- */
4
-
5
- import { isDeepStrictEqual as isEqual } from "node:util";
6
- import chalk from "chalk";
7
- import {
8
- type AddReferenceOpts,
9
- type AttributeEventName,
10
- type BaseNode,
11
- type BaseNodeEvents,
12
- type BrowseDescriptionOptions2,
13
- type IAddressSpace,
14
- type INamespace,
15
- type ISessionContext,
16
- type ListenerSignature,
17
- type ModellingRuleType,
18
- TypedEventEmitter,
19
- type UAMethod,
20
- type UAObject,
21
- type UAObjectType,
22
- type UAProperty,
23
- type UAReference,
24
- type UAReferenceType,
25
- type UAVariable,
26
- type UAVariableType
27
- } from "node-opcua-address-space-base";
28
- import { assert } from "node-opcua-assert";
29
- import type { UAString } from "node-opcua-basic-types";
30
- import { ObjectTypeIds, ReferenceTypeIds, VariableTypeIds } from "node-opcua-constants";
31
- import {
32
- AccessRestrictionsFlag,
33
- AttributeIds,
34
- attributeNameById,
35
- BrowseDirection,
36
- coerceLocalizedText,
37
- coerceQualifiedName,
38
- LocalizedText,
39
- type LocalizedTextLike,
40
- makeNodeClassMask,
41
- NodeClass,
42
- QualifiedName,
43
- type QualifiedNameLike,
44
- type QualifiedNameOptions
45
- } from "node-opcua-data-model";
46
- import { DataValue } from "node-opcua-data-value";
47
- import { dumpIf, make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
48
- import { coerceNodeId, makeNodeId, NodeId, type NodeIdLike, NodeIdType, resolveNodeId, sameNodeId } from "node-opcua-nodeid";
49
- import type { UAStateVariable } from "node-opcua-nodeset-ua";
50
- import type { NumericRange } from "node-opcua-numeric-range";
51
- import type { ReferenceDescription } from "node-opcua-service-browse";
52
- import { type StatusCode, StatusCodes } from "node-opcua-status-code";
53
- import {
54
- PermissionType,
55
- type RelativePathElement,
56
- RolePermissionType,
57
- type RolePermissionTypeOptions,
58
- type WriteValueOptions
59
- } from "node-opcua-types";
60
- import { lowerFirstLetter } from "node-opcua-utils";
61
- import { DataType, VariantArrayType } from "node-opcua-variant";
62
- import { dumpReferenceDescriptions, dumpReferences } from "../source/helpers/dump_tools";
63
- import { SessionContext, WellKnownRolesNodeId } from "../source/session_context";
64
- import type { XmlWriter } from "../source/xml_writer";
65
- import type { AddressSpace } from "../src/address_space";
66
- import { _handle_add_reference_change_event } from "./address_space_change_event_tools";
67
- import type { AddressSpacePrivate } from "./address_space_private";
68
- import {
69
- _constructReferenceDescription,
70
- _get_HierarchicalReference,
71
- _handle_HierarchicalReference,
72
- _remove_HierarchicalReference,
73
- BaseNode_add_backward_reference,
74
- BaseNode_clearCache,
75
- BaseNode_getCache,
76
- BaseNode_getPrivate,
77
- BaseNode_initPrivate,
78
- BaseNode_remove_backward_reference,
79
- BaseNode_removePrivate,
80
- BaseNode_toString,
81
- type HierarchicalIndexMap,
82
- ToStringBuilder
83
- } from "./base_node_private";
84
- import { type MinimalistAddressSpace, ReferenceImpl } from "./reference_impl";
85
- import { coerceRolePermissions } from "./role_permissions";
86
-
87
- type ApplyFunc = { apply: (...args: unknown[]) => void };
88
-
89
- const doDebug = false;
90
- const warningLog = make_warningLog(__filename);
91
- const errorLog = make_errorLog(__filename);
92
- const debugLog = make_debugLog(__filename);
93
-
94
- const HasEventSourceReferenceType = resolveNodeId("HasEventSource");
95
- const HasNotifierReferenceType = resolveNodeId("HasNotifier");
96
-
97
- function defaultBrowseFilterFunc(_context?: ISessionContext): boolean {
98
- return true;
99
- }
100
-
101
- function _get_QualifiedBrowseName(browseName: QualifiedNameLike): QualifiedName {
102
- return coerceQualifiedName(browseName) || "";
103
- }
104
-
105
- export interface InternalBaseNodeOptions {
106
- /**
107
- * the parent address space
108
- */
109
- addressSpace: AddressSpacePrivate;
110
- browseName: QualifiedName;
111
- nodeId: NodeId;
112
- references?: UAReference[];
113
-
114
- displayName?: LocalizedTextLike | LocalizedTextLike[];
115
- description?: LocalizedTextLike | null;
116
-
117
- browseFilter?: (this: BaseNode, context?: ISessionContext) => boolean;
118
-
119
- /**
120
- * https://reference.opcfoundation.org/v104/Core/docs/Part3/8.56/
121
- */
122
- accessRestrictions?: AccessRestrictionsFlag;
123
- rolePermissions?: RolePermissionTypeOptions[];
124
- }
125
-
126
- function _is_valid_BrowseDirection(browseDirection: BrowseDirection) {
127
- return (
128
- browseDirection === BrowseDirection.Forward ||
129
- browseDirection === BrowseDirection.Inverse ||
130
- browseDirection === BrowseDirection.Both
131
- );
132
- }
133
- export function makeAttributeEventName(attributeId: AttributeIds): AttributeEventName {
134
- const attributeName = attributeNameById[attributeId];
135
- return `${attributeName}_changed` as AttributeEventName;
136
- }
137
-
138
- /**
139
- * Base class for all Node classes
140
- *
141
- * BaseNode is the base class for all the OPCUA objects in the address space
142
- * It provides attributes and a set of references to other nodes.
143
- * see:
144
- * {{#crossLink "UAObject"}}{{/crossLink}},
145
- * {{#crossLink "UAVariable"}}{{/crossLink}},
146
- * {{#crossLink "Reference"}}{{/crossLink}},
147
- * {{#crossLink "UAMethod"}}{{/crossLink}},
148
- * {{#crossLink "UAView"}}{{/crossLink}},
149
- * {{#crossLink "UAObjectType"}}{{/crossLink}},
150
- * {{#crossLink "UADataType"}}{{/crossLink}},
151
- * {{#crossLink "UAVariableType"}}{{/crossLink}},
152
- *
153
- *
154
- */
155
-
156
- export abstract class BaseNodeImpl<T extends BaseNodeEvents & ListenerSignature<T> = BaseNodeEvents>
157
- extends TypedEventEmitter<T>
158
- implements BaseNode<T>
159
- {
160
- public static makeAttributeEventName(attributeId: AttributeIds): AttributeEventName {
161
- return makeAttributeEventName(attributeId);
162
- }
163
-
164
- private _accessRestrictions?: AccessRestrictionsFlag;
165
- private _rolePermissions?: RolePermissionType[];
166
-
167
- // public onFirstBrowseAction?: (this: BaseNode<T>) => Promise<void>;
168
-
169
- public get addressSpace(): IAddressSpace {
170
- const _private = BaseNode_getPrivate(this);
171
- // c8 ignore next
172
- if (!_private) {
173
- throw new Error(`Internal error , cannot extract private data from ${this.browseName.toString()}`);
174
- }
175
- return _private.__address_space as AddressSpace;
176
- }
177
-
178
- protected get addressSpacePrivate(): AddressSpacePrivate {
179
- const _private = BaseNode_getPrivate(this);
180
- // c8 ignore next
181
- if (!_private) {
182
- throw new Error(`Internal error , cannot extract private data from ${this.browseName.toString()}`);
183
- }
184
- return _private.__address_space as AddressSpacePrivate;
185
- }
186
-
187
- public get displayName(): LocalizedText[] {
188
- const _private = BaseNode_getPrivate(this);
189
- return _private._displayName;
190
- }
191
-
192
- public setDisplayName(value: LocalizedTextLike[] | LocalizedTextLike): void {
193
- if (!Array.isArray(value)) {
194
- this.setDisplayName([value]);
195
- return;
196
- }
197
- this._setDisplayName(value);
198
- /**
199
- * fires when the displayName is changed.
200
- * @event DisplayName_changed
201
- * @param dataValue {DataValue}
202
- */
203
- this._notifyAttributeChange(AttributeIds.DisplayName);
204
- }
205
-
206
- public get description(): LocalizedText {
207
- const _private = BaseNode_getPrivate(this);
208
- return _private._description || new LocalizedText({ text: "" });
209
- }
210
-
211
- public setDescription(value: LocalizedTextLike | null): void {
212
- this._setDescription(value);
213
- /**
214
- * fires when the description attribute is changed.
215
- * @event Description_changed
216
- * @param dataValue {DataValue}
217
- */
218
- this._notifyAttributeChange(AttributeIds.Description);
219
- }
220
-
221
- /**
222
- * returns the nodeId of this node's Type Definition
223
- */
224
- public get typeDefinition(): NodeId {
225
- const _cache = BaseNode_getCache(this);
226
- if (!_cache.typeDefinition) {
227
- const has_type_definition_ref = this.findReference("HasTypeDefinition", true);
228
- let nodeId = has_type_definition_ref ? has_type_definition_ref.nodeId : null;
229
- if (!nodeId) {
230
- switch (this.nodeClass) {
231
- case NodeClass.Object:
232
- nodeId = coerceNodeId(ObjectTypeIds.BaseObjectType);
233
- break;
234
- case NodeClass.Variable:
235
- nodeId = coerceNodeId(VariableTypeIds.BaseVariableType);
236
- break;
237
- default:
238
- }
239
- }
240
- _cache.typeDefinition = nodeId as NodeId;
241
- }
242
- return _cache.typeDefinition;
243
- }
244
-
245
- /**
246
- * returns the nodeId of this node's Type Definition
247
- */
248
- public get typeDefinitionObj(): UAObjectType | UAVariableType {
249
- const _cache = BaseNode_getCache(this);
250
- if (undefined === _cache.typeDefinitionObj) {
251
- const nodeId = this.typeDefinition;
252
- _cache.typeDefinitionObj = nodeId ? (this.addressSpace.findNode(nodeId) as UAObjectType | UAVariableType) : null;
253
- }
254
- if (!_cache.typeDefinitionObj) {
255
- warningLog(
256
- this.nodeClass,
257
- "cannot find typeDefinitionObj ",
258
- this.browseName.toString(),
259
- this.nodeId.toString(),
260
- NodeClass[this.nodeClass]
261
- );
262
- }
263
- return _cache.typeDefinitionObj as UAObjectType | UAVariableType;
264
- }
265
-
266
- public get parentNodeId(): NodeId | undefined {
267
- const parent = this.parent;
268
- return parent ? parent.nodeId : undefined;
269
- }
270
-
271
- /**
272
- * namespace index
273
- */
274
- public get namespaceIndex(): number {
275
- return this.nodeId.namespace;
276
- }
277
-
278
- /**
279
- * namespace uri
280
- */
281
- public get namespaceUri(): string {
282
- return this.addressSpace.getNamespaceUri(this.namespaceIndex);
283
- }
284
-
285
- /**
286
- * the parent node
287
- */
288
- public get parent(): BaseNode | null {
289
- const _private = BaseNode_getPrivate(this);
290
- if (_private._parent === undefined) {
291
- // never been set before
292
- _private._parent = _setup_parent_item.call(this, _private._referenceIdx);
293
- }
294
- return _private._parent || null;
295
- }
296
-
297
- /**
298
- * @property modellingRule
299
- * @type {String|undefined}
300
- */
301
- public get modellingRule(): ModellingRuleType | undefined {
302
- const r = this.findReferencesAsObject("HasModellingRule");
303
- if (!r || r.length === 0) {
304
- return null; /// "? modellingRule missing ?"; // consider "Mandatory"
305
- }
306
- const r0 = r[0];
307
- return r0.browseName.toString() as ModellingRuleType | undefined;
308
- }
309
-
310
- public readonly nodeClass: NodeClass = NodeClass.Unspecified;
311
- public readonly nodeId: NodeId;
312
- public readonly browseName: QualifiedName;
313
-
314
- protected _postInstantiateFunc?: (instance: BaseNode, instanceType: BaseNode, options?: unknown) => void;
315
-
316
- /**
317
- * @internal
318
- * @param options
319
- */
320
- constructor(options: InternalBaseNodeOptions) {
321
- super();
322
-
323
- assert(this.nodeClass === NodeClass.Unspecified, "must not be specify a nodeClass");
324
- assert(options.addressSpace); // expecting an address space
325
- assert(options.browseName instanceof QualifiedName, "Expecting a valid QualifiedName");
326
- assert(options.nodeId instanceof NodeId, "Expecting a valid NodeId");
327
- options.references = options.references || [];
328
-
329
- const _private = BaseNode_initPrivate(this);
330
- _private.__address_space = options.addressSpace;
331
-
332
- this.nodeId = resolveNodeId(options.nodeId);
333
-
334
- // QualifiedName
335
- /**
336
- * the node browseName
337
- * @property browseName
338
- * @type QualifiedName
339
- * @static
340
- */
341
- this.browseName = _get_QualifiedBrowseName(options.browseName);
342
-
343
- // re-use browseName as displayName if displayName is missing
344
- options.displayName = options.displayName || this.browseName.name?.toString();
345
-
346
- if (options.description === undefined) {
347
- options.description = null;
348
- }
349
- this._setDisplayName(options.displayName || "");
350
-
351
- this._setDescription(options.description);
352
-
353
- // user defined filter function for browsing
354
- const _browseFilter = options.browseFilter || defaultBrowseFilterFunc;
355
- assert(typeof _browseFilter === "function");
356
-
357
- _private._browseFilter = _browseFilter;
358
-
359
- // normalize reference type
360
- // this will convert any referenceType expressed with its inverseName into
361
- // its normal name and fix the isForward flag accordingly.
362
- // ( e.g "ComponentOf" isForward:true => "HasComponent", isForward:false)
363
- for (const reference of options.references) {
364
- this.__addReference(reference);
365
- }
366
-
367
- this._accessRestrictions = options.accessRestrictions;
368
- this._rolePermissions = coerceRolePermissions(options.rolePermissions);
369
- }
370
-
371
- public getDisplayName(_locale?: string): string {
372
- const _private = BaseNode_getPrivate(this);
373
- return _private._displayName[0].text || "";
374
- }
375
-
376
- public get namespace(): INamespace {
377
- return this.addressSpacePrivate.getNamespace(this.nodeId.namespace);
378
- }
379
-
380
- // ---------------------------------------------------------------------------------------------------
381
- // Finders
382
- // ---------------------------------------------------------------------------------------------------
383
-
384
- public findReferencesEx(referenceType: string | NodeId | UAReferenceType, browseDirection?: BrowseDirection): UAReference[] {
385
- browseDirection = browseDirection !== undefined ? browseDirection : BrowseDirection.Forward;
386
- assert(_is_valid_BrowseDirection(browseDirection));
387
- assert(browseDirection !== BrowseDirection.Both);
388
-
389
- const referenceTypeNode = this._coerceReferenceType(referenceType);
390
-
391
- if (!referenceTypeNode) {
392
- // note: when loading nodeset2.xml files, reference type may not exit yet
393
- // throw new Error("expecting valid reference name " + strReference);
394
- return [];
395
- }
396
-
397
- const isForward = browseDirection === BrowseDirection.Forward;
398
- const results: UAReference[] = [];
399
-
400
- const process = (referenceIdx: Map<string, UAReference>) => {
401
- for (const ref of referenceIdx.values()) {
402
- if (ref.isForward === isForward && referenceTypeNode && referenceTypeNode.checkHasSubtype(ref.referenceType)) {
403
- results.push(ref);
404
- }
405
- }
406
- };
407
- const _private = BaseNode_getPrivate(this);
408
- process(_private._referenceIdx);
409
- process(_private._back_referenceIdx);
410
- return results;
411
- }
412
-
413
- public findReferences_no_cache(referenceTypeNode: UAReferenceType, isForward = true): UAReference[] {
414
- const _private = BaseNode_getPrivate(this);
415
- const result: UAReference[] = [];
416
- for (const ref of _private._referenceIdx.values()) {
417
- if (ref.isForward === isForward) {
418
- if (sameNodeId(ref.referenceType, referenceTypeNode.nodeId)) {
419
- result.push(ref);
420
- }
421
- }
422
- }
423
-
424
- for (const ref of _private._back_referenceIdx.values()) {
425
- if (ref.isForward === isForward) {
426
- if (sameNodeId(ref.referenceType, referenceTypeNode.nodeId)) {
427
- result.push(ref);
428
- }
429
- }
430
- }
431
- return result;
432
- }
433
-
434
- public findReferences(referenceType: string | NodeId | UAReferenceType, isForward = true): UAReference[] {
435
- const _cache = BaseNode_getCache(this);
436
- const referenceTypeNode = this._coerceReferenceType(referenceType);
437
- if (!referenceTypeNode) {
438
- // note: when loading nodeset2.xml files, reference type may not exit yet
439
- // throw new Error("expecting valid reference name " + strReference);
440
- return [];
441
- }
442
-
443
- _cache._ref = _cache._ref || new Map();
444
-
445
- const hash = `r|${referenceTypeNode.nodeId.toString()}|${isForward ? "f" : "b"}`;
446
-
447
- if (_cache._ref.has(hash)) {
448
- return _cache._ref.get(hash) || [];
449
- }
450
- // c8 ignore next
451
- if (doDebug && !this.addressSpace.findReferenceType(referenceTypeNode.nodeId)) {
452
- throw new Error(`expecting valid reference name ${referenceType}`);
453
- }
454
- const result = this.findReferences_no_cache(referenceTypeNode, isForward);
455
- _cache._ref.set(hash, result);
456
- return result;
457
- }
458
-
459
- public findReference(strReference: string | NodeId | UAReferenceType, isForward?: boolean): UAReference | null {
460
- const refs = this.findReferences(strReference, isForward);
461
- if (refs.length !== 1 && refs.length !== 0) {
462
- throw new Error("findReference: expecting only one or zero element here");
463
- }
464
- return refs[0] || null;
465
- }
466
-
467
- public findReferencesExAsObject(
468
- referenceType: string | NodeId | UAReferenceType,
469
- browseDirection?: BrowseDirection
470
- ): BaseNode[] {
471
- const references = this.findReferencesEx(referenceType, browseDirection);
472
- return _asObject<BaseNode>(references, this.addressSpace);
473
- }
474
-
475
- public findReferencesAsObject(referenceType: string | NodeId | UAReferenceType, isForward?: boolean): BaseNode[] {
476
- const references = this.findReferences(referenceType, isForward);
477
- return _asObject<BaseNode>(references, this.addressSpace);
478
- }
479
-
480
- /**
481
- * return an array with the Aggregates of this object.
482
- */
483
- public getAggregates(): BaseNode[] {
484
- return this.findReferencesExAsObject("Aggregates", BrowseDirection.Forward);
485
- }
486
-
487
- /**
488
- * return an array with the components of this object.
489
- */
490
- public getComponents(): BaseNode[] {
491
- return this.findReferencesExAsObject("HasComponent", BrowseDirection.Forward);
492
- }
493
-
494
- /**
495
- * return a array with the properties of this object.
496
- */
497
- public getProperties(): BaseNode[] {
498
- return this.findReferencesExAsObject("HasProperty", BrowseDirection.Forward);
499
- }
500
-
501
- private static _hasChild: NodeId = new NodeId(NodeIdType.NUMERIC, ReferenceTypeIds.HasChild);
502
- public getChildren(): BaseNode[] {
503
- // return this.findReferencesExAsObject(BaseNodeImpl._hasChild, BrowseDirection.Forward);
504
- const _cache = BaseNode_getCache(this);
505
- if (!_cache._children) {
506
- _cache._children = this.findReferencesExAsObject(BaseNodeImpl._hasChild, BrowseDirection.Forward);
507
- }
508
- return _cache._children;
509
- }
510
-
511
- /**
512
- * return a array with the notifiers of this object.
513
- * only reference of exact type HasNotifier are returned.
514
- */
515
- public getNotifiers(): BaseNode[] {
516
- return this.findReferencesAsObject(HasNotifierReferenceType, true);
517
- }
518
-
519
- /**
520
- * return a array with the event source of this object.
521
- * only reference of exact type HasEventSource are returned.
522
- */
523
- public getEventSources(): BaseNode[] {
524
- return this.findReferencesAsObject(HasEventSourceReferenceType, true);
525
- }
526
-
527
- /**
528
- * return a array of the objects for which this node is an EventSource
529
- */
530
- public getEventSourceOfs(): BaseNode[] {
531
- return this.findReferencesAsObject(HasEventSourceReferenceType, false);
532
- }
533
-
534
- /**
535
- * retrieve a component by name
536
- */
537
- public getComponentByName(browseName: QualifiedNameOptions): UAVariable | UAObject | null;
538
- public getComponentByName(browseName: string, namespaceIndex?: number): UAVariable | UAObject | null;
539
- public getComponentByName(browseName: QualifiedNameLike, namespaceIndex?: number): UAVariable | UAObject | null {
540
- const components = this.getComponents();
541
- const select = _filter_by_browse_name(components, browseName, namespaceIndex);
542
- assert(select.length <= 1, "BaseNode#getComponentByName found duplicated reference");
543
- if (select.length === 1) {
544
- const component = select[0];
545
- if (component.nodeClass === NodeClass.Method) {
546
- warningLog("please use getMethodByName to retrieve a method");
547
- return null;
548
- }
549
- assert(component.nodeClass === NodeClass.Variable || component.nodeClass === NodeClass.Object);
550
- return component as unknown as UAVariable | UAObject;
551
- } else {
552
- return null;
553
- }
554
- }
555
-
556
- /**
557
- * retrieve a property by name
558
- */
559
- public getPropertyByName(browseName: QualifiedNameOptions): UAVariable | null;
560
- public getPropertyByName(browseName: string, namespaceIndex?: number): UAVariable | null;
561
- public getPropertyByName(browseName: QualifiedNameLike, namespaceIndex?: number): UAVariable | null {
562
- const properties = this.getProperties();
563
- const select = _filter_by_browse_name(properties, browseName, namespaceIndex);
564
- assert(select.length <= 1, "BaseNode#getPropertyByName found duplicated reference");
565
- if (select.length === 1 && select[0].nodeClass !== NodeClass.Variable) {
566
- throw new Error("Expecting a property to be of nodeClass==NodeClass.Variable");
567
- }
568
- return select.length === 1 ? (select[0] as unknown as UAVariable) : null;
569
- }
570
-
571
- /**
572
- * retrieve a folder element by name
573
- */
574
- public getFolderElementByName(browseName: QualifiedNameOptions): BaseNode | null;
575
- public getFolderElementByName(browseName: string, namespaceIndex?: number): BaseNode | null;
576
- public getFolderElementByName(browseName: QualifiedNameLike, namespaceIndex?: number): BaseNode | null {
577
- const elements = this.getFolderElements();
578
- const select = _filter_by_browse_name(elements, browseName, namespaceIndex);
579
- return select.length === 1 ? select[0] : null;
580
- }
581
-
582
- /**
583
- * returns the list of nodes that this folder object organizes
584
- */
585
- public getFolderElements(): BaseNodeImpl[] {
586
- return this.findReferencesExAsObject("Organizes", BrowseDirection.Forward) as BaseNodeImpl[];
587
- }
588
-
589
- /**
590
- * returns the list of methods that this object provides
591
- * @return an array with Method objects.
592
- *
593
- *
594
- * Note: internally, methods are special types of components
595
- */
596
- public getMethods(): UAMethod[] {
597
- const components = this.getComponents();
598
- return components.filter((obj) => obj.nodeClass === NodeClass.Method) as UAMethod[];
599
- }
600
-
601
- /**
602
- * returns the method exposed by this object and with the given nodeId
603
- */
604
- public getMethodById(nodeId: NodeId): UAMethod | null {
605
- const methods = this.getMethods();
606
- const found = methods.find((m: UAMethod) => m.nodeId.toString() === nodeId.toString());
607
- return found || null;
608
- }
609
-
610
- public getMethodByName(methodName: QualifiedNameOptions): UAMethod | null;
611
- public getMethodByName(methodName: string, namespaceIndex?: number): UAMethod | null;
612
- public getMethodByName(methodName: QualifiedNameLike, namespaceIndex?: number): UAMethod | null {
613
- const methods = this.getMethods();
614
- const select = _filter_by_browse_name(methods, methodName, namespaceIndex);
615
- assert(select.length <= 1, "BaseNode#getMethodByName found duplicated reference");
616
- return select.length === 1 ? (select[0] as UAMethod) : null;
617
- }
618
-
619
- public getWriteMask(): number {
620
- return 0;
621
- }
622
-
623
- public getUserWriteMask(): number {
624
- return 0;
625
- }
626
- public readAttribute(
627
- context: ISessionContext | null,
628
- attributeId: AttributeIds,
629
- indexRange?: NumericRange,
630
- dataEncoding?: QualifiedNameLike | null
631
- ): DataValue {
632
- indexRange;
633
- dataEncoding;
634
- assert(!context || context instanceof SessionContext);
635
- const options: Record<string, unknown> = {};
636
- options.statusCode = StatusCodes.Good;
637
-
638
- switch (attributeId) {
639
- case AttributeIds.NodeId: // NodeId
640
- options.value = { dataType: DataType.NodeId, value: this.nodeId };
641
- break;
642
-
643
- case AttributeIds.NodeClass: // NodeClass
644
- assert(Number.isFinite(this.nodeClass));
645
- options.value = { dataType: DataType.Int32, value: this.nodeClass };
646
- break;
647
-
648
- case AttributeIds.BrowseName: // QualifiedName
649
- assert(this.browseName instanceof QualifiedName);
650
- options.value = { dataType: DataType.QualifiedName, value: this.browseName };
651
- break;
652
-
653
- case AttributeIds.DisplayName: // LocalizedText
654
- options.value = { dataType: DataType.LocalizedText, value: this.displayName[0] };
655
- break;
656
-
657
- case AttributeIds.Description: // LocalizedText
658
- options.value = { dataType: DataType.LocalizedText, value: this.description };
659
- break;
660
-
661
- case AttributeIds.WriteMask:
662
- options.value = { dataType: DataType.UInt32, value: this.getWriteMask() };
663
- break;
664
-
665
- case AttributeIds.UserWriteMask:
666
- options.value = { dataType: DataType.UInt32, value: this.getUserWriteMask() };
667
- break;
668
-
669
- case AttributeIds.AccessRestrictions:
670
- return this._readAccessRestrictions(context);
671
-
672
- case AttributeIds.RolePermissions:
673
- return this._readRolePermissions(context);
674
-
675
- case AttributeIds.UserRolePermissions:
676
- return this._readUserRolePermissions(context);
677
-
678
- default:
679
- options.value = null;
680
- options.statusCode = StatusCodes.BadAttributeIdInvalid;
681
- break;
682
- }
683
- // xx options.serverTimestamp = new Date();
684
- return new DataValue(options);
685
- }
686
-
687
- public writeAttribute(
688
- context: ISessionContext | null,
689
- writeValue: WriteValueOptions,
690
- callback: (err: Error | null, statusCode?: StatusCode) => void
691
- ): void {
692
- context = context || SessionContext.defaultContext;
693
-
694
- assert(context instanceof SessionContext);
695
- assert(typeof callback === "function");
696
-
697
- if (
698
- writeValue.attributeId === undefined ||
699
- writeValue.attributeId <= 0 ||
700
- writeValue.attributeId > AttributeIds.AccessLevelEx
701
- ) {
702
- callback(null, StatusCodes.BadAttributeIdInvalid);
703
- return;
704
- }
705
- if (!this.canUserWriteAttribute(context, writeValue.attributeId)) {
706
- callback(null, StatusCodes.BadUserAccessDenied);
707
- return;
708
- }
709
- // by default Node is read-only,
710
- // this method needs to be overridden to change the behavior
711
- callback(null, StatusCodes.BadNotWritable);
712
- }
713
-
714
- public fullName(): string {
715
- if (this.parentNodeId) {
716
- const parent = this.addressSpace.findNode(this.parentNodeId) as BaseNode;
717
-
718
- // c8 ignore next
719
- if (parent) {
720
- return `${parent.fullName()}.${this.browseName.toString()}`;
721
- } else {
722
- return `NOT YET REGISTERED${this.parentNodeId.toString()}.${this.browseName.toString()}`;
723
- }
724
- }
725
- return this.browseName.toString();
726
- }
727
-
728
- public ownReferences(): UAReference[] {
729
- const _private = BaseNode_getPrivate(this);
730
- return [..._private._referenceIdx.values()];
731
- }
732
-
733
- /**
734
- *
735
- * @param relativePathElement
736
- * @param isLast
737
- * @return {NodeId[]}
738
- */
739
- public browseNodeByTargetName(relativePathElement: RelativePathElement, isLast: boolean): NodeId[] {
740
- relativePathElement.targetName = relativePathElement.targetName || new QualifiedName({});
741
- // part 4.0 v1.03 $7.26 RelativePath
742
- // The BrowseName of the target node.
743
- // The final element may have an empty targetName. In this situation all targets of the references identified by
744
- // the referenceTypeId are the targets of the RelativePath.
745
- // The targetName shall be specified for all other elements.
746
- // The current path cannot be followed any further if no targets with the specified BrowseName exist.
747
- assert(relativePathElement.targetName instanceof QualifiedName);
748
- assert(relativePathElement.targetName.namespaceIndex >= 0);
749
- assert((relativePathElement.targetName.name?.length || 0) > 0);
750
-
751
- // The type of reference to follow from the current node.
752
- // The current path cannot be followed any further if the referenceTypeId is not available on the Node instance.
753
- // If not specified then all References are included and the parameter includeSubtypes is ignored.
754
- assert(Object.hasOwn(relativePathElement, "referenceTypeId"));
755
-
756
- // Indicates whether the inverse Reference should be followed.
757
- // The inverse reference is followed if this value is TRUE.
758
- assert(Object.hasOwn(relativePathElement, "isInverse"));
759
-
760
- // Indicates whether subtypes of the ReferenceType should be followed.
761
- // Subtypes are included if this value is TRUE.
762
- assert(Object.hasOwn(relativePathElement, "includeSubtypes"));
763
-
764
- const references = this.allReferences();
765
-
766
- const _check_reference = (reference: UAReference) => {
767
- if (relativePathElement.referenceTypeId.isEmpty()) {
768
- return true;
769
- }
770
- assert(relativePathElement.referenceTypeId instanceof NodeId);
771
- if (
772
- (relativePathElement.isInverse && reference.isForward) ||
773
- (!relativePathElement.isInverse && !reference.isForward)
774
- ) {
775
- return false;
776
- }
777
- assert(Object.hasOwn(reference, "isForward"));
778
- const referenceType = resolveReferenceType(this.addressSpace, reference);
779
- const referenceTypeId = referenceType.nodeId;
780
-
781
- if (sameNodeId(relativePathElement.referenceTypeId, referenceTypeId)) {
782
- return true;
783
- }
784
- if (relativePathElement.includeSubtypes) {
785
- const baseType = this.addressSpace.findReferenceType(relativePathElement.referenceTypeId);
786
- if (baseType && referenceType.isSubtypeOf(baseType)) {
787
- return true;
788
- }
789
- }
790
- return false;
791
- };
792
-
793
- const nodeIdsMap: Record<string, BaseNode> = {};
794
- let nodeIds: NodeId[] = [];
795
-
796
- for (const reference of references) {
797
- if (!_check_reference(reference)) {
798
- continue;
799
- }
800
-
801
- const obj = resolveReferenceNode(this.addressSpace, reference);
802
-
803
- // c8 ignore next
804
- if (!obj) {
805
- throw new Error(` cannot find node with id ${reference.nodeId.toString()}`);
806
- }
807
-
808
- if (isEqual(obj.browseName, relativePathElement.targetName)) {
809
- // compare QualifiedName
810
-
811
- const key = obj.nodeId.toString();
812
- if (!Object.hasOwn(nodeIdsMap, key)) {
813
- nodeIds.push(obj.nodeId);
814
- nodeIdsMap[key] = obj;
815
- }
816
- }
817
- }
818
-
819
- if (nodeIds.length === 0 && (this.nodeClass === NodeClass.ObjectType || this.nodeClass === NodeClass.VariableType)) {
820
- const nodeType = this as unknown as UAVariableType;
821
-
822
- if (nodeType.subtypeOf) {
823
- // browsing also InstanceDeclarations included in base type
824
- const baseType = this.addressSpace.findNode(nodeType.subtypeOf) as BaseNode;
825
- const n = (baseType as BaseNodeImpl).browseNodeByTargetName(relativePathElement, isLast);
826
- nodeIds = ([] as NodeId[]).concat(nodeIds, n);
827
- }
828
- }
829
- return nodeIds;
830
- }
831
-
832
- /**
833
- * browse the node to extract information requested in browseDescription
834
- * and returns an array with reference descriptions
835
- *
836
- *
837
- *
838
- */
839
- public browseNode(browseDescription: BrowseDescriptionOptions2, context?: ISessionContext): ReferenceDescription[] {
840
- assert(Number.isFinite(browseDescription.nodeClassMask));
841
-
842
- const do_debug = false;
843
-
844
- const _private = BaseNode_getPrivate(this);
845
-
846
- const addressSpace = this.addressSpace;
847
-
848
- const referenceTypeId = normalize_referenceTypeId(addressSpace, browseDescription.referenceTypeId);
849
- assert(referenceTypeId instanceof NodeId);
850
-
851
- const browseDirection =
852
- browseDescription.browseDirection !== undefined ? browseDescription.browseDirection : BrowseDirection.Both;
853
-
854
- // get all possible references
855
- let references = this.allReferences();
856
-
857
- /* c8 ignore next */
858
- if (do_debug) {
859
- // c8 ignore next
860
- doDebug && debugLog("all references :", this.nodeId.toString(), this.browseName.toString());
861
- dumpReferences(addressSpace, _private._referenceIdx.values());
862
- }
863
-
864
- // filter out references not matching referenceType
865
- references = _filter_by_referenceType.call(this, browseDescription, references, referenceTypeId);
866
-
867
- references = _filter_by_direction(references, browseDirection);
868
-
869
- references = _filter_by_nodeClass.call(this, references, browseDescription.nodeClassMask);
870
-
871
- references = _filter_by_userFilter.call(this, references, context);
872
-
873
- if (context) {
874
- references = _filter_by_context(this, references, context);
875
- }
876
- const referenceDescriptions = _constructReferenceDescription(addressSpace, references, browseDescription.resultMask);
877
-
878
- /* c8 ignore next */
879
- if (do_debug) {
880
- dumpReferenceDescriptions(this.addressSpace, referenceDescriptions);
881
- }
882
-
883
- return referenceDescriptions;
884
- }
885
-
886
- public allReferences(): UAReference[] {
887
- const _private = BaseNode_getPrivate(this);
888
- return [..._private._referenceIdx.values(), ..._private._back_referenceIdx.values()];
889
- }
890
-
891
- /**
892
- * @param reference
893
- * @param reference.referenceType {String}
894
- * @param [reference.isForward = true] {Boolean}
895
- * @param reference.nodeId {Node|NodeId|String}
896
- *
897
- * @example
898
- *
899
- * view.addReference({ referenceType: "Organizes", nodeId: myDevice });
900
- *
901
- * or
902
- *
903
- * myDevice1.addReference({ referenceType: "OrganizedBy", nodeId: view });
904
- */
905
- public addReference(reference: AddReferenceOpts): void {
906
- const referenceNode = this.__addReference(reference);
907
- const addressSpace = this.addressSpace;
908
-
909
- if (!resolveReferenceType(addressSpace, referenceNode)) {
910
- throw new Error(`BaseNode#addReference : invalid reference ${reference.toString()}`);
911
- }
912
-
913
- _propagate_ref.call(this, addressSpace, referenceNode);
914
- this.install_extra_properties();
915
- _handle_add_reference_change_event(this, referenceNode.nodeId);
916
- }
917
-
918
- public removeReference(referenceOpts: AddReferenceOpts): void {
919
- const _private = BaseNode_getPrivate(this);
920
-
921
- assert(Object.hasOwn(referenceOpts, "referenceType"));
922
- // xx isForward is optional : assert(Object.prototype.hasOwnProperty.call(reference,"isForward"));
923
- assert(Object.hasOwn(referenceOpts, "nodeId"));
924
-
925
- const addressSpace = this.addressSpace as AddressSpacePrivate;
926
-
927
- const reference = addressSpace.normalizeReferenceTypes([referenceOpts])?.[0];
928
- const h = (<ReferenceImpl>reference).hash;
929
-
930
- const relatedNode = addressSpace.findNode(reference.nodeId);
931
-
932
- // c8 ignore next
933
- if (!relatedNode) {
934
- return;
935
- }
936
-
937
- const backwardReference = new ReferenceImpl({
938
- isForward: !reference.isForward,
939
- nodeId: this.nodeId,
940
- referenceType: reference.referenceType
941
- });
942
-
943
- if (_private._referenceIdx.has(h)) {
944
- _private._referenceIdx.delete(h);
945
- BaseNode_remove_backward_reference.call(relatedNode as BaseNodeImpl, backwardReference);
946
- _remove_HierarchicalReference(this, reference);
947
- this.uninstall_extra_properties(reference);
948
- this._clear_caches();
949
- } else if (_private._back_referenceIdx.has(h)) {
950
- relatedNode.removeReference(backwardReference);
951
- } else {
952
- // A back reference of a massively used type was never installed: _propagate_ref
953
- // skips HasTypeDefinition and HasModellingRule deliberately, "because there are
954
- // too many". Removal has to mirror that, or detaching any node asks its type
955
- // definition to drop a reference it never held - which is where the hundred-odd
956
- // "Cannot find reference to remove: ns=0;i=40" lines per run came from. The
957
- // absence is the designed state, not a fault worth reporting.
958
- const referenceType = resolveReferenceType(addressSpace, reference);
959
- if (!reference.isForward && referenceType && _is_massively_used_reference(referenceType)) {
960
- return;
961
- }
962
- warningLog(`Cannot find reference to remove: ${reference.toString()}`);
963
- }
964
- }
965
-
966
- /**
967
- *
968
- */
969
- public resolveNodeId(nodeId: NodeIdLike): NodeId {
970
- return this.addressSpace.resolveNodeId(nodeId);
971
- }
972
-
973
- public install_extra_properties(): void {
974
- const addressSpace = this.addressSpace;
975
-
976
- if (addressSpace.isFrugal) {
977
- // skipping
978
- return;
979
- }
980
-
981
- install_components_as_object_properties(this);
982
-
983
- // Only this node is new, so only this node has to appear on the parent.
984
- // Re-walking every child the parent already has made building a folder
985
- // of N children cost O(N^2) - measured at 7.2s for 3000 children, of
986
- // which 4.1s was spent re-installing properties that were already there.
987
- const self = this as BaseNode;
988
- function install_extra_properties_on_parent(ref: UAReference): void {
989
- const node = ReferenceImpl.resolveReferenceNode(addressSpace, ref) as BaseNode;
990
- install_child_as_object_property(node, self);
991
- }
992
-
993
- // make sure parent have extra properties updated
994
- const parentComponents = this.findReferencesEx("HasComponent", BrowseDirection.Inverse);
995
- const parentSubfolders = this.findReferencesEx("Organizes", BrowseDirection.Inverse);
996
- const parentProperties = this.findReferencesEx("HasProperty", BrowseDirection.Inverse);
997
-
998
- for (const p of parentComponents) {
999
- install_extra_properties_on_parent(p);
1000
- }
1001
- for (const p of parentSubfolders) {
1002
- install_extra_properties_on_parent(p);
1003
- }
1004
- for (const p of parentProperties) {
1005
- install_extra_properties_on_parent(p);
1006
- }
1007
- }
1008
-
1009
- public uninstall_extra_properties(reference: UAReference): void {
1010
- const addressSpace = this.addressSpace;
1011
-
1012
- if (addressSpace.isFrugal) {
1013
- // skipping
1014
- return;
1015
- }
1016
- if (!reference.isForward) {
1017
- const parentNode = resolveReferenceNode(addressSpace, reference);
1018
- // uninstall backward
1019
- (parentNode as BaseNodeImpl).uninstall_extra_properties({
1020
- isForward: true,
1021
- nodeId: this.nodeId,
1022
- referenceType: reference.referenceType
1023
- });
1024
- }
1025
- const childNode = resolveReferenceNode(addressSpace, reference);
1026
-
1027
- const name = lowerFirstLetter(childNode.browseName.name || "");
1028
- if (Object.hasOwn(reservedNames, name)) {
1029
- // c8 ignore next
1030
- if (doDebug) {
1031
- debugLog(chalk.bgWhite.red(`Ignoring reserved keyword ${name}`));
1032
- }
1033
- return;
1034
- }
1035
- /* c8 ignore next */
1036
- if (!Object.hasOwn(this, name)) {
1037
- return;
1038
- }
1039
-
1040
- Object.defineProperty(this, name, {
1041
- value: undefined
1042
- });
1043
- }
1044
-
1045
- public toString(): string {
1046
- const options = new ToStringBuilder();
1047
- BaseNode_toString.call(this, options);
1048
- return options.toString();
1049
- }
1050
-
1051
- public toJSON(): Record<string, unknown> {
1052
- return {
1053
- nodeId: this.nodeId.toString(),
1054
- nodeClass: NodeClass[this.nodeClass],
1055
- browseName: this.browseName.toString(),
1056
- displayName: this.displayName.length ? this.displayName[0].text : ""
1057
- };
1058
- }
1059
-
1060
- public [Symbol.for("nodejs.util.inspect.custom")](): string {
1061
- return this.toString();
1062
- }
1063
-
1064
- /**
1065
- * @property isFalseSubStateOf
1066
- * @type {BaseNode|null}
1067
- */
1068
- public get isFalseSubStateOf(): BaseNode | null {
1069
- const r = this.findReferencesAsObject("HasFalseSubState", false);
1070
- if (!r || r.length === 0) {
1071
- return null;
1072
- }
1073
- assert(r.length === 1);
1074
- return r[0];
1075
- }
1076
-
1077
- /**
1078
- * @property isTrueSubStateOf
1079
- * @type {BaseNode|null}
1080
- */
1081
- public get isTrueSubStateOf(): BaseNode | null {
1082
- const r = this.findReferencesAsObject("HasTrueSubState", false);
1083
- if (!r || r.length === 0) {
1084
- return null;
1085
- }
1086
- assert(r.length === 1);
1087
- return r[0] as BaseNode;
1088
- }
1089
-
1090
- /**
1091
- * @return {UAStateVariable[]} return an array with the SubStates of this object.
1092
- */
1093
- public getFalseSubStates(): UAStateVariable<LocalizedText>[] {
1094
- return this.findReferencesAsObject("HasFalseSubState") as UAStateVariable<LocalizedText>[];
1095
- }
1096
-
1097
- /**
1098
-
1099
- * @return {UAStateVariable[]} return an array with the SubStates of this object.
1100
- */
1101
- public getTrueSubStates(): UAStateVariable<LocalizedText>[] {
1102
- return this.findReferencesAsObject("HasTrueSubState") as UAStateVariable<LocalizedText>[];
1103
- }
1104
-
1105
- public findHierarchicalReferences(): UAReference[] {
1106
- return this.findReferencesEx("HierarchicalReferences", BrowseDirection.Forward);
1107
- }
1108
-
1109
- public getChildByName(browseName: QualifiedNameOptions): BaseNode | null;
1110
- public getChildByName(browseName: string, namespaceIndex?: number): BaseNode | null;
1111
- //
1112
- public getChildByName(browseName: QualifiedNameLike, namespaceIndex?: number): BaseNode | null {
1113
- var childrenMap = _get_HierarchicalReference(this);
1114
- const select = _select_by_browse_name(childrenMap, browseName, namespaceIndex);
1115
- if (select.length === 0) {
1116
- return null;
1117
- }
1118
- const ref = select[0];
1119
- const r = this.addressSpace.findReferenceType(ref.referenceType);
1120
- if (!r) return null;
1121
- const hasChild = this.addressSpace.findReferenceType("HasChild");
1122
- if (!hasChild) {
1123
- return null; // too early, bmy be namespace 0 is still loading
1124
- }
1125
- if (r.isSubtypeOf(hasChild)) {
1126
- return ref.node || null;
1127
- }
1128
- return null;
1129
- }
1130
- public getNodeVersion(): UAProperty<UAString, DataType.String> | null {
1131
- return this.getChildByName("NodeVersion", 0) as UAProperty<UAString, DataType.String> | null;
1132
- /*
1133
- const cache = BaseNode_getCache(this);
1134
- if (cache._versionNode == undefined) {
1135
- cache._versionNode = this.getChildByName("NodeVersion", 0) as UAProperty<string, DataType.String> | null;
1136
- }
1137
- return cache._versionNode as UAProperty<UAString, DataType.String> | null;
1138
- */
1139
- }
1140
-
1141
- public get nodeVersion(): UAProperty<UAString, DataType.String> | undefined {
1142
- return this.getNodeVersion() || undefined;
1143
- }
1144
- public set nodeVersion(_n: unknown) {
1145
- assert(false);
1146
- }
1147
-
1148
- get toStateNode(): BaseNode | null {
1149
- const nodes = this.findReferencesAsObject("ToState", true);
1150
- assert(nodes.length <= 1);
1151
- return nodes.length === 1 ? nodes[0] : null;
1152
- }
1153
-
1154
- get fromStateNode(): BaseNode | null {
1155
- const nodes = this.findReferencesAsObject("FromState", true);
1156
- assert(nodes.length <= 1);
1157
- return nodes.length === 1 ? nodes[0] : null;
1158
- }
1159
-
1160
- /**
1161
- * this methods propagates the forward references to the pointed node
1162
- * by inserting backward references to the counter part node
1163
- * @private
1164
- */
1165
- public propagate_back_references(): void {
1166
- const _private = BaseNode_getPrivate(this);
1167
- if ((this.addressSpace as AddressSpacePrivate).suspendBackReference) {
1168
- // this indicates that the base node is constructed from an xml definition
1169
- // propagate_back_references will be called later once the file has been completely processed.
1170
- return;
1171
- }
1172
- const addressSpace = this.addressSpace;
1173
- for (const reference of _private._referenceIdx.values()) {
1174
- _propagate_ref.call(this, addressSpace, reference);
1175
- }
1176
- }
1177
-
1178
- /**
1179
- * the dispose method should be called when the node is no longer used, to release
1180
- * back pointer to the address space and clear caches.
1181
- *
1182
- * @private
1183
- */
1184
- public dispose(): void {
1185
- (this as BaseNode).emit("dispose");
1186
-
1187
- this.removeAllListeners();
1188
- this._clear_caches();
1189
-
1190
- const _private = BaseNode_getPrivate(this);
1191
- for (const ref of _private._back_referenceIdx.values()) {
1192
- (ref as ReferenceImpl).dispose();
1193
- }
1194
-
1195
- for (const ref of _private._referenceIdx.values()) {
1196
- (ref as ReferenceImpl).dispose();
1197
- }
1198
-
1199
- BaseNode_removePrivate(this);
1200
- }
1201
-
1202
- public isDisposed(): boolean {
1203
- return !this.addressSpacePrivate;
1204
- }
1205
-
1206
- // c8 ignore next
1207
- public dumpXML(xmlWriter: XmlWriter): void {
1208
- console.error(" This ", NodeClass[this.nodeClass]);
1209
- assert(false, "BaseNode#dumpXML NOT IMPLEMENTED !");
1210
- assert(xmlWriter);
1211
- }
1212
-
1213
- /**
1214
- * Undo the effect of propagate_back_references
1215
- */
1216
- public unpropagate_back_references(): void {
1217
- const _private = BaseNode_getPrivate(this);
1218
-
1219
- const addressSpace = this.addressSpace;
1220
-
1221
- for (const reference of _private._referenceIdx.values()) {
1222
- // filter out non Hierarchical References
1223
- const referenceType = resolveReferenceType(addressSpace, reference);
1224
-
1225
- // c8 ignore next
1226
- if (!referenceType) {
1227
- console.error(chalk.red(" ERROR"), " cannot find reference ", reference.referenceType, reference.toString());
1228
- }
1229
-
1230
- const related_node = resolveReferenceNode(addressSpace, reference) as BaseNodeImpl;
1231
- if (related_node) {
1232
- assert(reference.nodeId.toString() !== this.nodeId.toString());
1233
- BaseNode_remove_backward_reference.call(
1234
- related_node,
1235
- new ReferenceImpl({
1236
- isForward: !reference.isForward,
1237
- nodeId: this.nodeId,
1238
- referenceType: reference.referenceType
1239
- })
1240
- );
1241
- } // else addressSpace may be incomplete
1242
- }
1243
- }
1244
-
1245
- public installPostInstallFunc(f: (instance: BaseNode, tpyeNode: BaseNode, opts?: unknown) => void): void {
1246
- if (!f) {
1247
- // nothing to do
1248
- return;
1249
- }
1250
-
1251
- function chain(f1: ApplyFunc | undefined, f2: ApplyFunc | undefined) {
1252
- return function chainingFunc(this: BaseNode, ...args: unknown[]) {
1253
- if (f1) {
1254
- f1.apply(this, args);
1255
- }
1256
- if (f2) {
1257
- f2.apply(this, args);
1258
- }
1259
- };
1260
- }
1261
-
1262
- this._postInstantiateFunc = chain.call(this, this._postInstantiateFunc, f);
1263
- }
1264
-
1265
- public _on_child_added(childNode: BaseNode): void {
1266
- // this._clear_caches();
1267
- // return;
1268
- const cache = BaseNode_getCache(this);
1269
- const tmpV = cache._versionNode;
1270
- const tmpC = cache._children;
1271
- this._clear_caches();
1272
- const newCache = BaseNode_getCache(this);
1273
- newCache._versionNode = tmpV;
1274
- newCache._children = tmpC;
1275
- if (newCache._children) {
1276
- newCache._children?.push(childNode);
1277
- }
1278
- }
1279
-
1280
- public _on_child_removed(_obj: BaseNode): void {
1281
- // obj; // unused;
1282
- this._clear_caches();
1283
- }
1284
-
1285
- /**
1286
- * @private
1287
- * @param reference
1288
- */
1289
- public _add_backward_reference(reference: UAReference): void {
1290
- BaseNode_add_backward_reference.call(this, reference);
1291
- }
1292
-
1293
- protected _coerceReferenceType(referenceType: string | NodeId | UAReferenceType): UAReferenceType | null {
1294
- let result: UAReferenceType | null = null;
1295
- if (typeof referenceType === "string") {
1296
- result = this.addressSpace.findReferenceType(referenceType);
1297
- /* c8 ignore next */
1298
- if (!result) {
1299
- errorLog("referenceType ", referenceType, " cannot be found");
1300
- throw new Error(`Cannot coerce reference with name ${referenceType}`);
1301
- }
1302
- } else if (referenceType instanceof NodeId) {
1303
- result = this.addressSpace.findNode(referenceType) as UAReferenceType;
1304
- if (!result) {
1305
- return null;
1306
- }
1307
- } else {
1308
- result = referenceType;
1309
- }
1310
- assert(result, "reference must exists");
1311
- assert(result.nodeClass === NodeClass.ReferenceType);
1312
- return result as UAReferenceType;
1313
- }
1314
-
1315
- private __addReference(referenceOpts: AddReferenceOpts): UAReference {
1316
- const addressSpace = this.addressSpace as AddressSpacePrivate;
1317
- const _private = BaseNode_getPrivate(this);
1318
- assert(Object.hasOwn(referenceOpts, "referenceType"));
1319
- // xx isForward is optional : assert(Object.prototype.hasOwnProperty.call(reference,"isForward"));
1320
- assert(Object.hasOwn(referenceOpts, "nodeId"));
1321
-
1322
- const reference: UAReference = addressSpace.normalizeReferenceTypes([referenceOpts])[0];
1323
- assert(reference instanceof ReferenceImpl);
1324
-
1325
- const h = (<ReferenceImpl>reference).hash;
1326
- assert(!_private._back_referenceIdx.has(h), "reference exists already in _back_references");
1327
- assert(!_private._referenceIdx.has(h), "reference exists already in _references");
1328
-
1329
- _private._referenceIdx.set(h, reference);
1330
- _handle_HierarchicalReference(this, reference);
1331
- this._clear_caches();
1332
- return reference;
1333
- }
1334
-
1335
- private _setDisplayName(displayName: LocalizedTextLike | LocalizedTextLike[]) {
1336
- const displayNames: LocalizedTextLike[] = Array.isArray(displayName) ? displayName : [displayName];
1337
- const _displayNames = displayNames.map(coerceLocalizedText) as LocalizedText[];
1338
- const _private = BaseNode_getPrivate(this);
1339
- _private._displayName = _displayNames;
1340
- }
1341
-
1342
- private _setDescription(description: LocalizedTextLike | null): void {
1343
- const __description = coerceLocalizedText(description);
1344
- const _private = BaseNode_getPrivate(this);
1345
- _private._description = __description || new LocalizedText({ text: "" });
1346
- }
1347
-
1348
- private _notifyAttributeChange(attributeId: AttributeIds): void {
1349
- const event_name = BaseNodeImpl.makeAttributeEventName(attributeId);
1350
- (this as BaseNode).emit(event_name, this.readAttribute(SessionContext.defaultContext, attributeId));
1351
- }
1352
-
1353
- private _clear_caches() {
1354
- BaseNode_clearCache(this);
1355
- }
1356
-
1357
- public canUserWriteAttribute(context: ISessionContext | null, attributeId: AttributeIds): boolean {
1358
- // the Client is allowed to write to Attributes other than the Value,
1359
- // Historizing or RolePermissions Attribute
1360
- if (!context) return true;
1361
- if (attributeId === AttributeIds.Historizing) {
1362
- return context.checkPermission(this as BaseNode, PermissionType.WriteHistorizing);
1363
- }
1364
- if (attributeId === AttributeIds.RolePermissions) {
1365
- return context.checkPermission(this as BaseNode, PermissionType.WriteRolePermissions);
1366
- }
1367
- if (attributeId === AttributeIds.Value) {
1368
- return context.checkPermission(this as BaseNode, PermissionType.Write);
1369
- }
1370
- return context.checkPermission(this as BaseNode, PermissionType.WriteAttribute);
1371
- }
1372
-
1373
- private _readAccessRestrictions(_context: ISessionContext | null): DataValue {
1374
- // https://reference.opcfoundation.org/v104/Core/docs/Part3/8.56/
1375
- if (this.accessRestrictions === undefined) {
1376
- return new DataValue({ statusCode: StatusCodes.BadAttributeIdInvalid });
1377
- }
1378
-
1379
- return new DataValue({
1380
- statusCode: StatusCodes.Good,
1381
- value: {
1382
- dataType: DataType.UInt16,
1383
- value: this.accessRestrictions
1384
- }
1385
- });
1386
- }
1387
- private _readRolePermissions(context: ISessionContext | null): DataValue {
1388
- // https://reference.opcfoundation.org/v104/Core/docs/Part3/4.8.3/
1389
-
1390
- // to do check that current user can read permission
1391
- if (context && !context.checkPermission(this as BaseNode, PermissionType.ReadRolePermissions)) {
1392
- return new DataValue({
1393
- statusCode: StatusCodes.BadSecurityModeInsufficient
1394
- });
1395
- }
1396
-
1397
- if (this.rolePermissions === undefined) {
1398
- // to do : If not specified, the value of DefaultUserRolePermissions Property from
1399
- // the Namespace Metadata Object associated with the Node is used instead.
1400
- return new DataValue({
1401
- statusCode: StatusCodes.BadAttributeIdInvalid
1402
- });
1403
- }
1404
-
1405
- const rolePermissions = this.rolePermissions.map(({ roleId, permissions }) => {
1406
- return new RolePermissionType({
1407
- roleId: toRoleNodeId(roleId),
1408
- permissions
1409
- });
1410
- });
1411
- return new DataValue({
1412
- statusCode: StatusCodes.Good,
1413
- value: {
1414
- dataType: DataType.ExtensionObject,
1415
- arrayType: VariantArrayType.Array,
1416
- value: rolePermissions
1417
- }
1418
- });
1419
- }
1420
-
1421
- private _readUserRolePermissions(context: ISessionContext | null): DataValue {
1422
- const allUserCanSeeTheirOwnRolePermissions = true;
1423
- if (!allUserCanSeeTheirOwnRolePermissions) {
1424
- // to do check that current user can read permission
1425
- if (context && !context.checkPermission(this as BaseNode, PermissionType.ReadRolePermissions)) {
1426
- return new DataValue({
1427
- statusCode: StatusCodes.BadSecurityModeInsufficient
1428
- });
1429
- }
1430
- }
1431
-
1432
- if (this.rolePermissions === undefined) {
1433
- // to do : If not specified, the value of DefaultUserRolePermissions Property from
1434
- // the Namespace Metadata Object associated with the Node is used instead.
1435
- return new DataValue({
1436
- statusCode: StatusCodes.BadAttributeIdInvalid
1437
- });
1438
- }
1439
- const context1: ISessionContext = context === null ? SessionContext.defaultContext : context;
1440
-
1441
- // for the time being get user Permission
1442
- const rolePermissions = this.rolePermissions
1443
- .map(({ roleId, permissions }) => {
1444
- return new RolePermissionType({
1445
- roleId: toRoleNodeId(roleId),
1446
- permissions
1447
- });
1448
- })
1449
- .filter(({ roleId }) => context1.currentUserHasRole(roleId));
1450
-
1451
- return new DataValue({
1452
- statusCode: StatusCodes.Good,
1453
- value: {
1454
- dataType: DataType.ExtensionObject,
1455
- arrayType: VariantArrayType.Array,
1456
- value: rolePermissions
1457
- }
1458
- });
1459
- }
1460
-
1461
- /**
1462
- *
1463
- * @param rolePermissions
1464
- */
1465
- setRolePermissions(rolePermissions: RolePermissionTypeOptions[]): void {
1466
- this._rolePermissions = coerceRolePermissions(rolePermissions);
1467
- }
1468
- getRolePermissions(inherited: boolean): RolePermissionType[] | null {
1469
- if (this.rolePermissions === undefined && inherited) {
1470
- return this.namespace.getDefaultRolePermissions();
1471
- }
1472
- return this._rolePermissions || null;
1473
- }
1474
- get rolePermissions(): RolePermissionType[] | undefined {
1475
- return this._rolePermissions || undefined;
1476
- }
1477
-
1478
- setAccessRestrictions(accessRestrictions: AccessRestrictionsFlag): void {
1479
- this._accessRestrictions = accessRestrictions;
1480
- }
1481
- get accessRestrictions(): AccessRestrictionsFlag | undefined {
1482
- return this._accessRestrictions;
1483
- }
1484
- getAccessRestrictions(inherited: boolean): AccessRestrictionsFlag {
1485
- if (this._accessRestrictions === undefined && inherited) {
1486
- return this.namespace.getDefaultAccessRestrictions();
1487
- }
1488
- return this._accessRestrictions || AccessRestrictionsFlag.None;
1489
- }
1490
- }
1491
-
1492
- function toRoleNodeId(s: NodeIdLike): NodeId {
1493
- if (typeof s === "string") {
1494
- return resolveNodeId(WellKnownRolesNodeId[s as keyof typeof WellKnownRolesNodeId]);
1495
- }
1496
- return coerceNodeId(s);
1497
- }
1498
-
1499
- let displayWarning = true;
1500
-
1501
- function toString_ReferenceDescription(ref: UAReference, options: { addressSpace: IAddressSpace }): string {
1502
- const addressSpace = options.addressSpace as AddressSpacePrivate;
1503
-
1504
- const refNode = addressSpace.findNode(ref.referenceType);
1505
- if (!refNode) {
1506
- return `Unknown Ref : ${ref}`;
1507
- }
1508
- const r = new ReferenceImpl({
1509
- isForward: ref.isForward,
1510
- nodeId: ref.nodeId,
1511
- referenceType: refNode.nodeId
1512
- });
1513
- const str = r.toString(options);
1514
- r.dispose();
1515
- return str;
1516
- }
1517
-
1518
- function _setup_parent_item(this: BaseNode, referencesMap: Map<string, UAReference>): BaseNode | null {
1519
- let references: UAReference[] | MapIterator<UAReference> = referencesMap.values();
1520
-
1521
- const _private = BaseNode_getPrivate(this);
1522
- assert(!_private._parent, "_setup_parent_item has been already called");
1523
-
1524
- const addressSpace = this.addressSpace;
1525
-
1526
- if (referencesMap.size > 0) {
1527
- references = this.findReferencesEx("Aggregates", BrowseDirection.Inverse);
1528
-
1529
- if (references.length >= 1) {
1530
- // c8 ignore next
1531
- if (references.length > 1) {
1532
- if (displayWarning) {
1533
- const options = { addressSpace };
1534
-
1535
- warningLog(" More than one Aggregates reference have been found for parent of object");
1536
- warningLog(" object node id:", this.nodeId.toString(), chalk.cyan(this.browseName.toString()));
1537
- warningLog(" browseResults:");
1538
- warningLog(references.map((f: UAReference) => toString_ReferenceDescription(f, options)).join("\n"));
1539
- warningLog(" first one will be used as parent");
1540
- // xx assert(browseResults.length === 1);
1541
- displayWarning = false;
1542
- }
1543
- }
1544
- return ReferenceImpl.resolveReferenceNode(addressSpace, references[0]);
1545
- }
1546
- }
1547
- return null;
1548
- }
1549
-
1550
- function toObject(addressSpace: IAddressSpace, reference: UAReference): BaseNode {
1551
- const obj = resolveReferenceNode(addressSpace, reference);
1552
- // c8 ignore next
1553
- if (doDebug && !obj) {
1554
- // c8 ignore next
1555
- doDebug &&
1556
- debugLog(
1557
- chalk.red(" Warning : object with nodeId ") +
1558
- chalk.cyan(reference.nodeId.toString()) +
1559
- chalk.red(" cannot be found in the address space !")
1560
- );
1561
- }
1562
- return obj;
1563
- }
1564
-
1565
- function _asObject<T extends BaseNode>(references: UAReference[], addressSpace: IAddressSpace): T[] {
1566
- return references.map((a) => toObject(addressSpace, a)).filter((o) => !!o) as T[];
1567
- }
1568
-
1569
- function _select_by_browse_name(map: HierarchicalIndexMap, browseName: QualifiedNameLike, namespaceIndex?: number): UAReference[] {
1570
- if ((namespaceIndex === null || namespaceIndex === undefined) && typeof browseName === "string") {
1571
- // no namespace specified and needed
1572
- const result = map.get(browseName);
1573
- if (result) {
1574
- if (Array.isArray(result)) {
1575
- return result;
1576
- }
1577
- return [result];
1578
- }
1579
- } else {
1580
- const _browseName = coerceQualifiedName(typeof browseName === "string" ? { name: browseName, namespaceIndex } : browseName);
1581
- // c8 ignore next
1582
- if (!_browseName) {
1583
- return [];
1584
- }
1585
- const result = map.get(_browseName.name || "");
1586
- if (result) {
1587
- if (Array.isArray(result)) {
1588
- // only select the one with the matching namepsace index
1589
- return result.filter((t) => t.node.browseName.namespaceIndex === _browseName.namespaceIndex);
1590
- } else {
1591
- if (result.node.browseName.namespaceIndex === _browseName.namespaceIndex) {
1592
- return [result];
1593
- }
1594
- return [];
1595
- }
1596
- }
1597
- }
1598
- return [];
1599
- }
1600
-
1601
- function _filter_by_browse_name(components: BaseNode[], browseName: QualifiedNameLike, namespaceIndex?: number): BaseNode[] {
1602
- let select: BaseNode[] = [];
1603
- if ((namespaceIndex === null || namespaceIndex === undefined) && typeof browseName === "string") {
1604
- select = components.filter((c: BaseNode) => c.browseName.name === browseName);
1605
- if (select && select.length > 1) {
1606
- warningLog("Multiple children exist with name ", browseName, " please specify a namespace index");
1607
- }
1608
- } else {
1609
- const _browseName = coerceQualifiedName(typeof browseName === "string" ? { name: browseName, namespaceIndex } : browseName);
1610
- if (!_browseName) {
1611
- return [];
1612
- }
1613
- select = components.filter(
1614
- (c: BaseNode) => c.browseName.name === _browseName.name && c.browseName.namespaceIndex === _browseName.namespaceIndex
1615
- );
1616
- }
1617
- return select;
1618
- }
1619
-
1620
- let displayWarningReferencePointingToItSelf = true;
1621
-
1622
- function _is_massively_used_reference(referenceType: UAReferenceType): boolean {
1623
- const name = referenceType.browseName.toString();
1624
- return name === "HasTypeDefinition" || name === "HasModellingRule";
1625
- }
1626
-
1627
- function _propagate_ref(this: BaseNode, addressSpace: MinimalistAddressSpace, reference: UAReference): void {
1628
- // filter out non Hierarchical References
1629
- const referenceType = ReferenceImpl.resolveReferenceType(addressSpace, reference);
1630
-
1631
- // c8 ignore next
1632
- if (!referenceType) {
1633
- errorLog(chalk.red(" ERROR"), " cannot find reference ", reference.referenceType, reference.toString());
1634
- }
1635
-
1636
- // ------------------------------- Filter out back reference when reference type
1637
- // is HasTypeDefinition, HasModellingRule, etc ...
1638
- //
1639
- // var referenceNode = Reference.resolveReferenceNode(addressSpace,reference);
1640
- // ignore propagation on back reference to UAVariableType or UAObject Type reference
1641
- // because there are too many !
1642
- if (!referenceType || _is_massively_used_reference(referenceType)) {
1643
- return;
1644
- }
1645
-
1646
- const related_node = resolveReferenceNode(addressSpace, reference) as BaseNodeImpl;
1647
- if (related_node) {
1648
- // verify that reference doesn't point to object it this (see mantis 3099)
1649
- if (sameNodeId(reference.nodeId, this.nodeId)) {
1650
- // c8 ignore next
1651
- if (displayWarningReferencePointingToItSelf) {
1652
- // this could happen with method
1653
- warningLog(
1654
- " Warning: a Reference is pointing to source ",
1655
- this.nodeId.toString(),
1656
- this.browseName.toString(),
1657
- ". Is this intentional ?"
1658
- );
1659
- displayWarningReferencePointingToItSelf = false;
1660
- }
1661
- }
1662
-
1663
- (related_node as BaseNodeImpl)._add_backward_reference(
1664
- new ReferenceImpl({
1665
- _referenceType: getReferenceType(reference),
1666
- isForward: !reference.isForward,
1667
- node: this as BaseNode,
1668
- nodeId: this.nodeId,
1669
- referenceType: reference.referenceType
1670
- })
1671
- );
1672
- } // else addressSpace may be incomplete and under construction (while loading a nodeset.xml file for instance)
1673
- }
1674
-
1675
- function nodeid_is_nothing(nodeid: NodeId): boolean {
1676
- return nodeid.value === 0 && nodeid.namespace === 0;
1677
- }
1678
-
1679
- /**
1680
-
1681
- * @param addressSpace {IAddressSpace}
1682
- * @param referenceTypeId {String|NodeId|null} : the referenceType either as a string or a nodeId
1683
- * @return {NodeId}
1684
- */
1685
- function normalize_referenceTypeId(addressSpace: IAddressSpace, referenceTypeId?: NodeIdLike | null): NodeId {
1686
- if (!referenceTypeId) {
1687
- return makeNodeId(0);
1688
- }
1689
- if (typeof referenceTypeId === "string") {
1690
- const ref = addressSpace.findReferenceType(referenceTypeId);
1691
- if (ref) {
1692
- return ref.nodeId;
1693
- }
1694
- }
1695
- let nodeId: NodeId;
1696
- try {
1697
- nodeId = addressSpace.resolveNodeId(referenceTypeId);
1698
- } catch (err) {
1699
- errorLog("cannot normalize_referenceTypeId", referenceTypeId);
1700
- throw err;
1701
- }
1702
- assert(nodeId);
1703
- return nodeId;
1704
- }
1705
-
1706
- const resolveReferenceNode = ReferenceImpl.resolveReferenceNode;
1707
- const resolveReferenceType = ReferenceImpl.resolveReferenceType;
1708
-
1709
- function _filter_by_referenceType(
1710
- this: BaseNode,
1711
- browseDescription: BrowseDescriptionOptions2,
1712
- references: UAReference[],
1713
- referenceTypeId: NodeId
1714
- ) {
1715
- // make sure we have a valid referenceTypeId if not null
1716
- if (!nodeid_is_nothing(referenceTypeId)) {
1717
- assert(referenceTypeId instanceof NodeId);
1718
- const referenceType = this.addressSpace.findNode(referenceTypeId) as UAReferenceType;
1719
- dumpIf(!referenceType, referenceTypeId);
1720
- // c8 ignore next
1721
- if (!referenceType || referenceType.nodeClass !== NodeClass.ReferenceType) {
1722
- throw new Error("Cannot find reference type");
1723
- }
1724
-
1725
- if (!browseDescription.includeSubtypes && referenceType.isAbstract) {
1726
- warningLog("filter by reference will skip all reference as referenceType is abstract and includeSubtypes is false");
1727
- }
1728
-
1729
- references = references.filter((reference) => {
1730
- const ref = resolveReferenceType(this.addressSpace, reference);
1731
- // c8 ignore next
1732
- if (!ref) {
1733
- throw new Error(`Cannot find reference type ${reference.toString()}`);
1734
- }
1735
- // unknown type ... this may happen when the address space is not fully build
1736
- assert(ref.nodeClass === NodeClass.ReferenceType);
1737
-
1738
- const isSameType = sameNodeId(ref.nodeId, referenceType.nodeId);
1739
- if (isSameType) {
1740
- return true;
1741
- }
1742
- if (browseDescription.includeSubtypes) {
1743
- return ref.isSubtypeOf(referenceType);
1744
- } else {
1745
- return false;
1746
- }
1747
- });
1748
- }
1749
- return references;
1750
- }
1751
-
1752
- function forwardOnly(reference: UAReference): boolean {
1753
- return reference.isForward;
1754
- }
1755
-
1756
- function reverseOnly(reference: UAReference): boolean {
1757
- return !reference.isForward;
1758
- }
1759
-
1760
- function _filter_by_direction(references: UAReference[], browseDirection: BrowseDirection): UAReference[] {
1761
- if (browseDirection === BrowseDirection.Both) {
1762
- return references;
1763
- }
1764
- if (browseDirection === BrowseDirection.Forward) {
1765
- return references.filter(forwardOnly);
1766
- } else {
1767
- return references.filter(reverseOnly);
1768
- }
1769
- }
1770
- /*
1771
- function _filter_by_context(node: BaseNode, references: Reference[], context: SessionContext): Reference[] {
1772
- if (!context.isBrowseAccessRestricted(node)) {
1773
- return references;
1774
- }
1775
- // browse access is restricted for forward
1776
- return [];
1777
- }
1778
- */
1779
- function _filter_by_context(node: BaseNode, references: UAReference[], context: ISessionContext): UAReference[] {
1780
- const addressSpace = node.addressSpace;
1781
- return references.filter((reference) => !context.isBrowseAccessRestricted(resolveReferenceNode(addressSpace, reference)));
1782
- }
1783
-
1784
- function _filter_by_nodeClass(this: BaseNode, references: UAReference[], nodeClassMask: number): UAReference[] {
1785
- assert(Number.isFinite(nodeClassMask));
1786
- if (nodeClassMask === 0) {
1787
- return references;
1788
- }
1789
- const addressSpace = this.addressSpace;
1790
- return references.filter((reference) => {
1791
- const obj = resolveReferenceNode(addressSpace, reference);
1792
-
1793
- if (!obj) {
1794
- return false;
1795
- }
1796
-
1797
- const nodeClassName = NodeClass[obj.nodeClass];
1798
-
1799
- const value = makeNodeClassMask(nodeClassName);
1800
- return (value & nodeClassMask) === value;
1801
- });
1802
- }
1803
-
1804
- function _filter_by_userFilter(this: BaseNode, references: UAReference[], context?: ISessionContext): UAReference[] {
1805
- const addressSpace = this.addressSpace;
1806
- return references.filter((reference: UAReference) => {
1807
- const obj = resolveReferenceNode(addressSpace, reference) as BaseNode;
1808
- // c8 ignore next
1809
- if (!obj) {
1810
- return false;
1811
- }
1812
-
1813
- const _private = BaseNode_getPrivate(obj);
1814
- // c8 ignore next
1815
- if (!_private._browseFilter) {
1816
- throw Error("Internal error : cannot find browseFilter");
1817
- }
1818
-
1819
- const filter1 = _private._browseFilter.call(obj, context);
1820
- return filter1;
1821
- });
1822
- }
1823
-
1824
- const reservedNames = {
1825
- __description: 0,
1826
- __displayName: 0,
1827
- browseName: 0,
1828
- description: 0,
1829
- displayName: 0,
1830
- nodeClass: 0,
1831
- nodeId: 0,
1832
- typeDefinition: 0
1833
- };
1834
-
1835
- /*
1836
- * install hierarchical references as javascript properties
1837
- * Components/Properties/Organizes
1838
- */
1839
- /**
1840
- * Expose a single child of `parentObj` as a JavaScript property on it.
1841
- *
1842
- * Split out of {@link install_components_as_object_properties} so that adding
1843
- * one child does not have to re-walk every child the parent already has: that
1844
- * made building a large folder quadratic. See
1845
- * {@link BaseNodeImpl.install_extra_properties}.
1846
- */
1847
- function install_child_as_object_property(parentObj: BaseNode | null, child: BaseNode | null): void {
1848
- // the parent may be unresolvable while a nodeset is still loading, which is
1849
- // why the whole-parent form guarded it too
1850
- if (!parentObj || !child) {
1851
- return;
1852
- }
1853
- // assumption: we ignore namespace here .
1854
- const name = lowerFirstLetter(child.browseName.name || "");
1855
-
1856
- if (Object.hasOwn(reservedNames, name)) {
1857
- // ignore reserved names
1858
- if (doDebug) {
1859
- debugLog(chalk.bgWhite.red(`Ignoring reserved keyword ${name}`));
1860
- }
1861
- return;
1862
- }
1863
-
1864
- // ignore reserved names
1865
- doDebug && debugLog(`Installing property ${name}`, " on ", parentObj.browseName.toString());
1866
-
1867
- const hasProperty = Object.hasOwn(parentObj, name);
1868
- if (
1869
- hasProperty &&
1870
- (parentObj as unknown as Record<string, unknown>)[name] !== null &&
1871
- (parentObj as unknown as Record<string, unknown>)[name] !== undefined
1872
- ) {
1873
- return;
1874
- }
1875
-
1876
- Object.defineProperty(parentObj, name, {
1877
- configurable: true, // set to true, so we can undefine later
1878
- enumerable: true,
1879
- // xx writable: false,
1880
- get() {
1881
- return child;
1882
- }
1883
- // value: child
1884
- });
1885
- }
1886
-
1887
- function install_components_as_object_properties(parentObj: BaseNode) {
1888
- if (!parentObj) {
1889
- return;
1890
- }
1891
-
1892
- const addressSpace = parentObj.addressSpace;
1893
- const hierarchicalRefs = (parentObj as BaseNodeImpl).findHierarchicalReferences();
1894
-
1895
- for (const reference of hierarchicalRefs) {
1896
- install_child_as_object_property(parentObj, ReferenceImpl.resolveReferenceNode(addressSpace, reference) as BaseNode);
1897
- }
1898
- }
1899
-
1900
- export function getReferenceType(reference: UAReference): UAReferenceType {
1901
- const r = (reference as ReferenceImpl)._referenceType;
1902
- // c8 ignore next
1903
- if (!r) {
1904
- throw new Error("Internal error : cannot find referenceType");
1905
- }
1906
- return r;
1907
- }