node-opcua-address-space 2.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (598) hide show
  1. package/.mocharc.yml +12 -0
  2. package/LICENSE +20 -0
  3. package/dist/source/address_space_ts.d.ts +122 -0
  4. package/dist/source/address_space_ts.js +18 -0
  5. package/dist/source/address_space_ts.js.map +1 -0
  6. package/dist/source/continuation_points/continuation_point_manager.d.ts +21 -0
  7. package/dist/source/continuation_points/continuation_point_manager.js +100 -0
  8. package/dist/source/continuation_points/continuation_point_manager.js.map +1 -0
  9. package/dist/source/helpers/adjust_browse_direction.d.ts +5 -0
  10. package/dist/source/helpers/adjust_browse_direction.js +12 -0
  11. package/dist/source/helpers/adjust_browse_direction.js.map +1 -0
  12. package/dist/source/helpers/argument_list.d.ts +30 -0
  13. package/dist/source/helpers/argument_list.js +237 -0
  14. package/dist/source/helpers/argument_list.js.map +1 -0
  15. package/dist/source/helpers/call_helpers.d.ts +6 -0
  16. package/dist/source/helpers/call_helpers.js +71 -0
  17. package/dist/source/helpers/call_helpers.js.map +1 -0
  18. package/dist/source/helpers/check_event_clause.d.ts +17 -0
  19. package/dist/source/helpers/check_event_clause.js +53 -0
  20. package/dist/source/helpers/check_event_clause.js.map +1 -0
  21. package/dist/source/helpers/coerce_enum_value.d.ts +6 -0
  22. package/dist/source/helpers/coerce_enum_value.js +34 -0
  23. package/dist/source/helpers/coerce_enum_value.js.map +1 -0
  24. package/dist/source/helpers/dump_tools.d.ts +14 -0
  25. package/dist/source/helpers/dump_tools.js +79 -0
  26. package/dist/source/helpers/dump_tools.js.map +1 -0
  27. package/dist/source/helpers/ensure_secure_access.d.ts +9 -0
  28. package/dist/source/helpers/ensure_secure_access.js +90 -0
  29. package/dist/source/helpers/ensure_secure_access.js.map +1 -0
  30. package/dist/source/helpers/make_optionals_map.d.ts +21 -0
  31. package/dist/source/helpers/make_optionals_map.js +30 -0
  32. package/dist/source/helpers/make_optionals_map.js.map +1 -0
  33. package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +3 -0
  34. package/dist/source/helpers/resolve_opaque_on_address_space.js +37 -0
  35. package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -0
  36. package/dist/source/index.d.ts +39 -0
  37. package/dist/source/index.js +62 -0
  38. package/dist/source/index.js.map +1 -0
  39. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +12 -0
  40. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js +3 -0
  41. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js.map +1 -0
  42. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.d.ts +1 -0
  43. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js +3 -0
  44. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js.map +1 -0
  45. package/dist/source/interfaces/data_access/ua_discrete_item.d.ts +4 -0
  46. package/dist/source/interfaces/data_access/ua_discrete_item.js +3 -0
  47. package/dist/source/interfaces/data_access/ua_discrete_item.js.map +1 -0
  48. package/dist/source/interfaces/data_access/ua_multistate_discrete.d.ts +25 -0
  49. package/dist/source/interfaces/data_access/ua_multistate_discrete.js +3 -0
  50. package/dist/source/interfaces/data_access/ua_multistate_discrete.js.map +1 -0
  51. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +21 -0
  52. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js +3 -0
  53. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js.map +1 -0
  54. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.d.ts +27 -0
  55. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js +3 -0
  56. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js.map +1 -0
  57. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +24 -0
  58. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js +3 -0
  59. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +1 -0
  60. package/dist/source/interfaces/data_access/ua_two_state_discrete.d.ts +17 -0
  61. package/dist/source/interfaces/data_access/ua_two_state_discrete.js +3 -0
  62. package/dist/source/interfaces/data_access/ua_two_state_discrete.js.map +1 -0
  63. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +12 -0
  64. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js +3 -0
  65. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js.map +1 -0
  66. package/dist/source/interfaces/data_access/ua_y_array_item.d.ts +4 -0
  67. package/dist/source/interfaces/data_access/ua_y_array_item.js +3 -0
  68. package/dist/source/interfaces/data_access/ua_y_array_item.js.map +1 -0
  69. package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +8 -0
  70. package/dist/source/interfaces/data_access/ua_y_array_item_ex.js +3 -0
  71. package/dist/source/interfaces/data_access/ua_y_array_item_ex.js.map +1 -0
  72. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.d.ts +11 -0
  73. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js +3 -0
  74. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js.map +1 -0
  75. package/dist/source/interfaces/state_machine/finite_state_machine.d.ts +69 -0
  76. package/dist/source/interfaces/state_machine/finite_state_machine.js +3 -0
  77. package/dist/source/interfaces/state_machine/finite_state_machine.js.map +1 -0
  78. package/dist/source/interfaces/state_machine/program_finite_state_machine.d.ts +74 -0
  79. package/dist/source/interfaces/state_machine/program_finite_state_machine.js +3 -0
  80. package/dist/source/interfaces/state_machine/program_finite_state_machine.js.map +1 -0
  81. package/dist/source/interfaces/state_machine/state_machine.d.ts +342 -0
  82. package/dist/source/interfaces/state_machine/state_machine.js +3 -0
  83. package/dist/source/interfaces/state_machine/state_machine.js.map +1 -0
  84. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +12 -0
  85. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +3 -0
  86. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +1 -0
  87. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +49 -0
  88. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js +3 -0
  89. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js.map +1 -0
  90. package/dist/source/interfaces/state_machine/ua_finite_state_variable.d.ts +18 -0
  91. package/dist/source/interfaces/state_machine/ua_finite_state_variable.js +3 -0
  92. package/dist/source/interfaces/state_machine/ua_finite_state_variable.js.map +1 -0
  93. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +11 -0
  94. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js +3 -0
  95. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js.map +1 -0
  96. package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +222 -0
  97. package/dist/source/interfaces/state_machine/ua_state_machine_type.js +3 -0
  98. package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -0
  99. package/dist/source/interfaces/state_machine/ua_state_variable.d.ts +29 -0
  100. package/dist/source/interfaces/state_machine/ua_state_variable.js +3 -0
  101. package/dist/source/interfaces/state_machine/ua_state_variable.js.map +1 -0
  102. package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +6 -0
  103. package/dist/source/interfaces/state_machine/ua_transition_ex.js +3 -0
  104. package/dist/source/interfaces/state_machine/ua_transition_ex.js.map +1 -0
  105. package/dist/source/interfaces/state_machine/ua_two_state_variable.d.ts +26 -0
  106. package/dist/source/interfaces/state_machine/ua_two_state_variable.js +3 -0
  107. package/dist/source/interfaces/state_machine/ua_two_state_variable.js.map +1 -0
  108. package/dist/source/interfaces/subscription_diagnostics_variable.d.ts +41 -0
  109. package/dist/source/interfaces/subscription_diagnostics_variable.js +3 -0
  110. package/dist/source/interfaces/subscription_diagnostics_variable.js.map +1 -0
  111. package/dist/source/interfaces/ua_authorisation_service.d.ts +1 -0
  112. package/dist/source/interfaces/ua_authorisation_service.js +3 -0
  113. package/dist/source/interfaces/ua_authorisation_service.js.map +1 -0
  114. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +8 -0
  115. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
  116. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -0
  117. package/dist/source/loader/generateAddressSpaceRaw.d.ts +10 -0
  118. package/dist/source/loader/generateAddressSpaceRaw.js +59 -0
  119. package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -0
  120. package/dist/source/loader/load_nodeset2.d.ts +13 -0
  121. package/dist/source/loader/load_nodeset2.js +1392 -0
  122. package/dist/source/loader/load_nodeset2.js.map +1 -0
  123. package/dist/source/loader/namespace_post_step.d.ts +6 -0
  124. package/dist/source/loader/namespace_post_step.js +48 -0
  125. package/dist/source/loader/namespace_post_step.js.map +1 -0
  126. package/dist/source/loader/register_node_promoter.d.ts +3 -0
  127. package/dist/source/loader/register_node_promoter.js +10 -0
  128. package/dist/source/loader/register_node_promoter.js.map +1 -0
  129. package/dist/source/namespace.d.ts +6 -0
  130. package/dist/source/namespace.js +3 -0
  131. package/dist/source/namespace.js.map +1 -0
  132. package/dist/source/namespace_alarm_and_condition.d.ts +24 -0
  133. package/dist/source/namespace_alarm_and_condition.js +3 -0
  134. package/dist/source/namespace_alarm_and_condition.js.map +1 -0
  135. package/dist/source/namespace_data_access.d.ts +42 -0
  136. package/dist/source/namespace_data_access.js +3 -0
  137. package/dist/source/namespace_data_access.js.map +1 -0
  138. package/dist/source/namespace_machine_state.d.ts +7 -0
  139. package/dist/source/namespace_machine_state.js +3 -0
  140. package/dist/source/namespace_machine_state.js.map +1 -0
  141. package/dist/source/pseudo_session.d.ts +55 -0
  142. package/dist/source/pseudo_session.js +205 -0
  143. package/dist/source/pseudo_session.js.map +1 -0
  144. package/dist/source/session_context.d.ts +111 -0
  145. package/dist/source/session_context.js +266 -0
  146. package/dist/source/session_context.js.map +1 -0
  147. package/dist/source/set_namespace_meta_data.d.ts +2 -0
  148. package/dist/source/set_namespace_meta_data.js +60 -0
  149. package/dist/source/set_namespace_meta_data.js.map +1 -0
  150. package/dist/source/ua_namespace_meta_data_type.d.ts +71 -0
  151. package/dist/source/ua_namespace_meta_data_type.js +3 -0
  152. package/dist/source/ua_namespace_meta_data_type.js.map +1 -0
  153. package/dist/source/ua_root_folder.d.ts +9 -0
  154. package/dist/source/ua_root_folder.js +3 -0
  155. package/dist/source/ua_root_folder.js.map +1 -0
  156. package/dist/source/ua_two_state_variable_ex.d.ts +23 -0
  157. package/dist/source/ua_two_state_variable_ex.js +3 -0
  158. package/dist/source/ua_two_state_variable_ex.js.map +1 -0
  159. package/dist/source/xml_writer.d.ts +9 -0
  160. package/dist/source/xml_writer.js +3 -0
  161. package/dist/source/xml_writer.js.map +1 -0
  162. package/dist/src/address_space.d.ts +393 -0
  163. package/dist/src/address_space.js +1375 -0
  164. package/dist/src/address_space.js.map +1 -0
  165. package/dist/src/address_space_change_event_tools.d.ts +6 -0
  166. package/dist/src/address_space_change_event_tools.js +150 -0
  167. package/dist/src/address_space_change_event_tools.js.map +1 -0
  168. package/dist/src/address_space_private.d.ts +44 -0
  169. package/dist/src/address_space_private.js +3 -0
  170. package/dist/src/address_space_private.js.map +1 -0
  171. package/dist/src/alarms_and_conditions/base_event_type.d.ts +26 -0
  172. package/dist/src/alarms_and_conditions/base_event_type.js +41 -0
  173. package/dist/src/alarms_and_conditions/base_event_type.js.map +1 -0
  174. package/dist/src/alarms_and_conditions/check_where_clause.d.ts +4 -0
  175. package/dist/src/alarms_and_conditions/check_where_clause.js +110 -0
  176. package/dist/src/alarms_and_conditions/check_where_clause.js.map +1 -0
  177. package/dist/src/alarms_and_conditions/condition.d.ts +5 -0
  178. package/dist/src/alarms_and_conditions/condition.js +81 -0
  179. package/dist/src/alarms_and_conditions/condition.js.map +1 -0
  180. package/dist/src/alarms_and_conditions/condition_info.d.ts +27 -0
  181. package/dist/src/alarms_and_conditions/condition_info.js +55 -0
  182. package/dist/src/alarms_and_conditions/condition_info.js.map +1 -0
  183. package/dist/src/alarms_and_conditions/condition_snapshot.d.ts +232 -0
  184. package/dist/src/alarms_and_conditions/condition_snapshot.js +667 -0
  185. package/dist/src/alarms_and_conditions/condition_snapshot.js.map +1 -0
  186. package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +21 -0
  187. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +47 -0
  188. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -0
  189. package/dist/src/alarms_and_conditions/extract_event_fields.d.ts +10 -0
  190. package/dist/src/alarms_and_conditions/extract_event_fields.js +90 -0
  191. package/dist/src/alarms_and_conditions/extract_event_fields.js.map +1 -0
  192. package/dist/src/alarms_and_conditions/index.d.ts +18 -0
  193. package/dist/src/alarms_and_conditions/index.js +31 -0
  194. package/dist/src/alarms_and_conditions/index.js.map +1 -0
  195. package/dist/src/alarms_and_conditions/shelving_state_machine.d.ts +22 -0
  196. package/dist/src/alarms_and_conditions/shelving_state_machine.js +241 -0
  197. package/dist/src/alarms_and_conditions/shelving_state_machine.js.map +1 -0
  198. package/dist/src/alarms_and_conditions/trip_alarm.d.ts +16 -0
  199. package/dist/src/alarms_and_conditions/trip_alarm.js +21 -0
  200. package/dist/src/alarms_and_conditions/trip_alarm.js.map +1 -0
  201. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.d.ts +54 -0
  202. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js +255 -0
  203. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js.map +1 -0
  204. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +62 -0
  205. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +244 -0
  206. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -0
  207. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.d.ts +138 -0
  208. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js +460 -0
  209. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js.map +1 -0
  210. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +118 -0
  211. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +417 -0
  212. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -0
  213. package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +29 -0
  214. package/dist/src/alarms_and_conditions/ua_base_event_impl.js +39 -0
  215. package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -0
  216. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.d.ts +35 -0
  217. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js +32 -0
  218. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js.map +1 -0
  219. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +21 -0
  220. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +26 -0
  221. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -0
  222. package/dist/src/alarms_and_conditions/ua_condition_base.d.ts +191 -0
  223. package/dist/src/alarms_and_conditions/ua_condition_base.js +1029 -0
  224. package/dist/src/alarms_and_conditions/ua_condition_base.js.map +1 -0
  225. package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +182 -0
  226. package/dist/src/alarms_and_conditions/ua_condition_impl.js +1021 -0
  227. package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -0
  228. package/dist/src/alarms_and_conditions/ua_discrete_alarm.d.ts +11 -0
  229. package/dist/src/alarms_and_conditions/ua_discrete_alarm.js +58 -0
  230. package/dist/src/alarms_and_conditions/ua_discrete_alarm.js.map +1 -0
  231. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +17 -0
  232. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +58 -0
  233. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -0
  234. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.d.ts +24 -0
  235. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js +59 -0
  236. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js.map +1 -0
  237. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +27 -0
  238. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +57 -0
  239. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -0
  240. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.d.ts +14 -0
  241. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js +17 -0
  242. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js.map +1 -0
  243. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +9 -0
  244. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +12 -0
  245. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -0
  246. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.d.ts +22 -0
  247. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js +87 -0
  248. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js.map +1 -0
  249. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +38 -0
  250. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +87 -0
  251. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -0
  252. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.d.ts +6 -0
  253. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js +11 -0
  254. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js.map +1 -0
  255. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +10 -0
  256. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +8 -0
  257. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -0
  258. package/dist/src/alarms_and_conditions/ua_limit_alarm.d.ts +76 -0
  259. package/dist/src/alarms_and_conditions/ua_limit_alarm.js +237 -0
  260. package/dist/src/alarms_and_conditions/ua_limit_alarm.js.map +1 -0
  261. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +98 -0
  262. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +233 -0
  263. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -0
  264. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.d.ts +27 -0
  265. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js +62 -0
  266. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js.map +1 -0
  267. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +28 -0
  268. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +51 -0
  269. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -0
  270. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.d.ts +49 -0
  271. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js +176 -0
  272. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js.map +1 -0
  273. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +25 -0
  274. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +163 -0
  275. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -0
  276. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.d.ts +47 -0
  277. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js +151 -0
  278. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js.map +1 -0
  279. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +39 -0
  280. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +136 -0
  281. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -0
  282. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.d.ts +16 -0
  283. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js +18 -0
  284. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js.map +1 -0
  285. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +16 -0
  286. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +18 -0
  287. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -0
  288. package/dist/src/apply_condition_refresh.d.ts +6 -0
  289. package/dist/src/apply_condition_refresh.js +28 -0
  290. package/dist/src/apply_condition_refresh.js.map +1 -0
  291. package/dist/src/base_node.d.ts +279 -0
  292. package/dist/src/base_node.js +1364 -0
  293. package/dist/src/base_node.js.map +1 -0
  294. package/dist/src/base_node_impl.d.ts +281 -0
  295. package/dist/src/base_node_impl.js +1394 -0
  296. package/dist/src/base_node_impl.js.map +1 -0
  297. package/dist/src/base_node_private.d.ts +61 -0
  298. package/dist/src/base_node_private.js +521 -0
  299. package/dist/src/base_node_private.js.map +1 -0
  300. package/dist/src/data_access/add_dataItem_stuff.d.ts +11 -0
  301. package/dist/src/data_access/add_dataItem_stuff.js +62 -0
  302. package/dist/src/data_access/add_dataItem_stuff.js.map +1 -0
  303. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.d.ts +1 -0
  304. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js +35 -0
  305. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js.map +1 -0
  306. package/dist/src/data_access/ua_analog_item.d.ts +13 -0
  307. package/dist/src/data_access/ua_analog_item.js +37 -0
  308. package/dist/src/data_access/ua_analog_item.js.map +1 -0
  309. package/dist/src/data_access/ua_data_item.d.ts +16 -0
  310. package/dist/src/data_access/ua_data_item.js +66 -0
  311. package/dist/src/data_access/ua_data_item.js.map +1 -0
  312. package/dist/src/data_access/ua_multistate_discrete.d.ts +23 -0
  313. package/dist/src/data_access/ua_multistate_discrete.js +131 -0
  314. package/dist/src/data_access/ua_multistate_discrete.js.map +1 -0
  315. package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +32 -0
  316. package/dist/src/data_access/ua_multistate_discrete_impl.js +131 -0
  317. package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -0
  318. package/dist/src/data_access/ua_multistate_value_discrete.d.ts +51 -0
  319. package/dist/src/data_access/ua_multistate_value_discrete.js +249 -0
  320. package/dist/src/data_access/ua_multistate_value_discrete.js.map +1 -0
  321. package/dist/src/data_access/ua_two_state_discrete.d.ts +25 -0
  322. package/dist/src/data_access/ua_two_state_discrete.js +154 -0
  323. package/dist/src/data_access/ua_two_state_discrete.js.map +1 -0
  324. package/dist/src/event_data.d.ts +29 -0
  325. package/dist/src/event_data.js +96 -0
  326. package/dist/src/event_data.js.map +1 -0
  327. package/dist/src/extension_object_array_node.d.ts +61 -0
  328. package/dist/src/extension_object_array_node.js +266 -0
  329. package/dist/src/extension_object_array_node.js.map +1 -0
  330. package/dist/src/historical_access/address_space_historical_data_node.d.ts +26 -0
  331. package/dist/src/historical_access/address_space_historical_data_node.js +662 -0
  332. package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -0
  333. package/dist/src/index_current.d.ts +42 -0
  334. package/dist/src/index_current.js +71 -0
  335. package/dist/src/index_current.js.map +1 -0
  336. package/dist/src/namespace.d.ts +475 -0
  337. package/dist/src/namespace.js +1775 -0
  338. package/dist/src/namespace.js.map +1 -0
  339. package/dist/src/namespace_impl.d.ts +463 -0
  340. package/dist/src/namespace_impl.js +1763 -0
  341. package/dist/src/namespace_impl.js.map +1 -0
  342. package/dist/src/namespace_private.d.ts +21 -0
  343. package/dist/src/namespace_private.js +29 -0
  344. package/dist/src/namespace_private.js.map +1 -0
  345. package/dist/src/nodeid_manager.d.ts +36 -0
  346. package/dist/src/nodeid_manager.js +196 -0
  347. package/dist/src/nodeid_manager.js.map +1 -0
  348. package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +2 -0
  349. package/dist/src/nodeset_tools/adjust_namespace_array.js +14 -0
  350. package/dist/src/nodeset_tools/adjust_namespace_array.js.map +1 -0
  351. package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -0
  352. package/dist/src/nodeset_tools/construct_namespace_dependency.js +39 -0
  353. package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -0
  354. package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +2 -0
  355. package/dist/src/nodeset_tools/nodeset_to_xml.js +1155 -0
  356. package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -0
  357. package/dist/src/nodeset_tools/typedictionary_to_xml.d.ts +2 -0
  358. package/dist/src/nodeset_tools/typedictionary_to_xml.js +147 -0
  359. package/dist/src/nodeset_tools/typedictionary_to_xml.js.map +1 -0
  360. package/dist/src/reference.d.ts +43 -0
  361. package/dist/src/reference.js +138 -0
  362. package/dist/src/reference.js.map +1 -0
  363. package/dist/src/reference_impl.d.ts +43 -0
  364. package/dist/src/reference_impl.js +138 -0
  365. package/dist/src/reference_impl.js.map +1 -0
  366. package/dist/src/role_permissions.d.ts +2 -0
  367. package/dist/src/role_permissions.js +11 -0
  368. package/dist/src/role_permissions.js.map +1 -0
  369. package/dist/src/session_context.d.ts +4 -0
  370. package/dist/src/session_context.js +9 -0
  371. package/dist/src/session_context.js.map +1 -0
  372. package/dist/src/state_machine/finite_state_machine.d.ts +67 -0
  373. package/dist/src/state_machine/finite_state_machine.js +354 -0
  374. package/dist/src/state_machine/finite_state_machine.js.map +1 -0
  375. package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +34 -0
  376. package/dist/src/state_machine/ua_shelving_state_machine_ex.js +244 -0
  377. package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -0
  378. package/dist/src/state_machine/ua_two_state_variable.d.ts +61 -0
  379. package/dist/src/state_machine/ua_two_state_variable.js +332 -0
  380. package/dist/src/state_machine/ua_two_state_variable.js.map +1 -0
  381. package/dist/src/tool_isSupertypeOf.d.ts +17 -0
  382. package/dist/src/tool_isSupertypeOf.js +103 -0
  383. package/dist/src/tool_isSupertypeOf.js.map +1 -0
  384. package/dist/src/ua_condition_type.d.ts +8 -0
  385. package/dist/src/ua_condition_type.js +3 -0
  386. package/dist/src/ua_condition_type.js.map +1 -0
  387. package/dist/src/ua_data_type.d.ts +83 -0
  388. package/dist/src/ua_data_type.js +289 -0
  389. package/dist/src/ua_data_type.js.map +1 -0
  390. package/dist/src/ua_data_type_impl.d.ts +83 -0
  391. package/dist/src/ua_data_type_impl.js +291 -0
  392. package/dist/src/ua_data_type_impl.js.map +1 -0
  393. package/dist/src/ua_method.d.ts +42 -0
  394. package/dist/src/ua_method.js +204 -0
  395. package/dist/src/ua_method.js.map +1 -0
  396. package/dist/src/ua_method_impl.d.ts +40 -0
  397. package/dist/src/ua_method_impl.js +203 -0
  398. package/dist/src/ua_method_impl.js.map +1 -0
  399. package/dist/src/ua_object.d.ts +29 -0
  400. package/dist/src/ua_object.js +153 -0
  401. package/dist/src/ua_object.js.map +1 -0
  402. package/dist/src/ua_object_impl.d.ts +29 -0
  403. package/dist/src/ua_object_impl.js +156 -0
  404. package/dist/src/ua_object_impl.js.map +1 -0
  405. package/dist/src/ua_object_type.d.ts +49 -0
  406. package/dist/src/ua_object_type.js +124 -0
  407. package/dist/src/ua_object_type.js.map +1 -0
  408. package/dist/src/ua_object_type_impl.d.ts +48 -0
  409. package/dist/src/ua_object_type_impl.js +124 -0
  410. package/dist/src/ua_object_type_impl.js.map +1 -0
  411. package/dist/src/ua_reference_type.d.ts +42 -0
  412. package/dist/src/ua_reference_type.js +138 -0
  413. package/dist/src/ua_reference_type.js.map +1 -0
  414. package/dist/src/ua_reference_type_impl.d.ts +43 -0
  415. package/dist/src/ua_reference_type_impl.js +138 -0
  416. package/dist/src/ua_reference_type_impl.js.map +1 -0
  417. package/dist/src/ua_variable.d.ts +346 -0
  418. package/dist/src/ua_variable.js +1721 -0
  419. package/dist/src/ua_variable.js.map +1 -0
  420. package/dist/src/ua_variable_impl.d.ts +353 -0
  421. package/dist/src/ua_variable_impl.js +1719 -0
  422. package/dist/src/ua_variable_impl.js.map +1 -0
  423. package/dist/src/ua_variable_type.d.ts +54 -0
  424. package/dist/src/ua_variable_type.js +555 -0
  425. package/dist/src/ua_variable_type.js.map +1 -0
  426. package/dist/src/ua_variable_type_impl.d.ts +63 -0
  427. package/dist/src/ua_variable_type_impl.js +556 -0
  428. package/dist/src/ua_variable_type_impl.js.map +1 -0
  429. package/dist/src/ua_view.d.ts +16 -0
  430. package/dist/src/ua_view.js +42 -0
  431. package/dist/src/ua_view.js.map +1 -0
  432. package/dist/src/ua_view_impl.d.ts +15 -0
  433. package/dist/src/ua_view_impl.js +37 -0
  434. package/dist/src/ua_view_impl.js.map +1 -0
  435. package/distHelpers/add_event_generator_object.d.ts +3 -0
  436. package/distHelpers/add_event_generator_object.js +66 -0
  437. package/distHelpers/add_event_generator_object.js.map +1 -0
  438. package/distHelpers/alarms_and_conditions_demo.d.ts +10 -0
  439. package/distHelpers/alarms_and_conditions_demo.js +115 -0
  440. package/distHelpers/alarms_and_conditions_demo.js.map +1 -0
  441. package/distHelpers/assertHasMatchingReference.d.ts +19 -0
  442. package/distHelpers/assertHasMatchingReference.js +41 -0
  443. package/distHelpers/assertHasMatchingReference.js.map +1 -0
  444. package/distHelpers/boiler_system.d.ts +113 -0
  445. package/distHelpers/boiler_system.js +397 -0
  446. package/distHelpers/boiler_system.js.map +1 -0
  447. package/distHelpers/create_minimalist_address_space_nodeset.d.ts +5 -0
  448. package/distHelpers/create_minimalist_address_space_nodeset.js +171 -0
  449. package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -0
  450. package/distHelpers/dump_statemachine.d.ts +6 -0
  451. package/distHelpers/dump_statemachine.js +116 -0
  452. package/distHelpers/dump_statemachine.js.map +1 -0
  453. package/distHelpers/get_address_space_fixture.d.ts +1 -0
  454. package/distHelpers/get_address_space_fixture.js +31 -0
  455. package/distHelpers/get_address_space_fixture.js.map +1 -0
  456. package/distHelpers/get_mini_address_space.d.ts +7 -0
  457. package/distHelpers/get_mini_address_space.js +37 -0
  458. package/distHelpers/get_mini_address_space.js.map +1 -0
  459. package/distHelpers/index.d.ts +11 -0
  460. package/distHelpers/index.js +24 -0
  461. package/distHelpers/index.js.map +1 -0
  462. package/distNodeJS/generate_address_space.d.ts +4 -0
  463. package/distNodeJS/generate_address_space.js +31 -0
  464. package/distNodeJS/generate_address_space.js.map +1 -0
  465. package/distNodeJS/index.d.ts +1 -0
  466. package/distNodeJS/index.js +14 -0
  467. package/distNodeJS/index.js.map +1 -0
  468. package/generate.js +1 -0
  469. package/nodeJS.d.ts +1 -0
  470. package/nodeJS.js +1 -0
  471. package/package.json +87 -0
  472. package/source/address_space_ts.ts +217 -0
  473. package/source/continuation_points/continuation_point_manager.ts +121 -0
  474. package/source/helpers/adjust_browse_direction.ts +15 -0
  475. package/source/helpers/argument_list.ts +286 -0
  476. package/source/helpers/call_helpers.ts +112 -0
  477. package/source/helpers/check_event_clause.ts +62 -0
  478. package/source/helpers/coerce_enum_value.ts +33 -0
  479. package/source/helpers/dump_tools.ts +92 -0
  480. package/source/helpers/ensure_secure_access.ts +88 -0
  481. package/source/helpers/make_optionals_map.ts +49 -0
  482. package/source/helpers/resolve_opaque_on_address_space.ts +23 -0
  483. package/source/index.ts +49 -0
  484. package/source/interfaces/alarms_and_conditions/condition_info_i.ts +13 -0
  485. package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +26 -0
  486. package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +34 -0
  487. package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +14 -0
  488. package/source/interfaces/data_access/ua_y_array_item_ex.ts +10 -0
  489. package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +14 -0
  490. package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +50 -0
  491. package/source/interfaces/state_machine/ua_program_state_machine_type.ts +13 -0
  492. package/source/interfaces/state_machine/ua_state_machine_type.ts +261 -0
  493. package/source/interfaces/state_machine/ua_transition_ex.ts +7 -0
  494. package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +8 -0
  495. package/source/loader/generateAddressSpaceRaw.ts +79 -0
  496. package/source/loader/load_nodeset2.ts +1600 -0
  497. package/source/loader/namespace_post_step.ts +36 -0
  498. package/source/loader/register_node_promoter.ts +8 -0
  499. package/source/namespace.ts +9 -0
  500. package/source/namespace_alarm_and_condition.ts +47 -0
  501. package/source/namespace_data_access.ts +60 -0
  502. package/source/namespace_machine_state.ts +13 -0
  503. package/source/pseudo_session.ts +288 -0
  504. package/source/session_context.ts +345 -0
  505. package/source/set_namespace_meta_data.ts +68 -0
  506. package/source/ua_root_folder.ts +10 -0
  507. package/source/ua_two_state_variable_ex.ts +35 -0
  508. package/source/xml_writer.ts +15 -0
  509. package/source_nodejs/generate_address_space.ts +36 -0
  510. package/source_nodejs/index.ts +1 -0
  511. package/src/address_space.ts +1575 -0
  512. package/src/address_space_change_event_tools.ts +177 -0
  513. package/src/address_space_private.ts +98 -0
  514. package/src/alarms_and_conditions/check_where_clause.ts +148 -0
  515. package/src/alarms_and_conditions/condition.ts +89 -0
  516. package/src/alarms_and_conditions/condition_info.ts +66 -0
  517. package/src/alarms_and_conditions/condition_snapshot.ts +766 -0
  518. package/src/alarms_and_conditions/deviation_alarm_helper.ts +66 -0
  519. package/src/alarms_and_conditions/extract_event_fields.ts +104 -0
  520. package/src/alarms_and_conditions/index.ts +18 -0
  521. package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +339 -0
  522. package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +513 -0
  523. package/src/alarms_and_conditions/ua_base_event_impl.ts +55 -0
  524. package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +50 -0
  525. package/src/alarms_and_conditions/ua_condition_impl.ts +1298 -0
  526. package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +81 -0
  527. package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +110 -0
  528. package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +19 -0
  529. package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +130 -0
  530. package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +24 -0
  531. package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +305 -0
  532. package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +108 -0
  533. package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +224 -0
  534. package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +186 -0
  535. package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +27 -0
  536. package/src/apply_condition_refresh.ts +30 -0
  537. package/src/base_node_impl.ts +1749 -0
  538. package/src/base_node_private.ts +690 -0
  539. package/src/data_access/add_dataItem_stuff.ts +75 -0
  540. package/src/data_access/check_variant_compatibility_ua_analog_item.ts +41 -0
  541. package/src/data_access/ua_multistate_discrete_impl.ts +168 -0
  542. package/src/data_access/ua_multistate_value_discrete.ts +299 -0
  543. package/src/data_access/ua_two_state_discrete.ts +185 -0
  544. package/src/event_data.ts +117 -0
  545. package/src/extension_object_array_node.ts +325 -0
  546. package/src/historical_access/address_space_historical_data_node.ts +828 -0
  547. package/src/index_current.ts +52 -0
  548. package/src/namespace_impl.ts +2181 -0
  549. package/src/namespace_private.ts +60 -0
  550. package/src/nodeid_manager.ts +228 -0
  551. package/src/nodeset_tools/adjust_namespace_array.ts +11 -0
  552. package/src/nodeset_tools/construct_namespace_dependency.ts +40 -0
  553. package/src/nodeset_tools/nodeset_to_xml.ts +1317 -0
  554. package/src/nodeset_tools/typedictionary_to_xml.ts +175 -0
  555. package/src/reference_impl.ts +169 -0
  556. package/src/role_permissions.ts +6 -0
  557. package/src/state_machine/finite_state_machine.ts +428 -0
  558. package/src/state_machine/ua_shelving_state_machine_ex.ts +314 -0
  559. package/src/state_machine/ua_two_state_variable.ts +421 -0
  560. package/src/tool_isSupertypeOf.ts +129 -0
  561. package/src/ua_condition_type.ts +10 -0
  562. package/src/ua_data_type_impl.ts +356 -0
  563. package/src/ua_method_impl.ts +278 -0
  564. package/src/ua_object_impl.ts +203 -0
  565. package/src/ua_object_type_impl.ts +158 -0
  566. package/src/ua_reference_type_impl.ts +174 -0
  567. package/src/ua_variable_impl.ts +2277 -0
  568. package/src/ua_variable_type_impl.ts +741 -0
  569. package/src/ua_view_impl.ts +54 -0
  570. package/testHelpers.d.ts +1 -0
  571. package/testHelpers.js +1 -0
  572. package/test_helpers/add_event_generator_object.ts +71 -0
  573. package/test_helpers/alarms_and_conditions_demo.ts +147 -0
  574. package/test_helpers/assertHasMatchingReference.ts +43 -0
  575. package/test_helpers/boiler_system.ts +618 -0
  576. package/test_helpers/create_minimalist_address_space_nodeset.ts +208 -0
  577. package/test_helpers/dump_statemachine.ts +155 -0
  578. package/test_helpers/get_address_space_fixture.ts +30 -0
  579. package/test_helpers/get_mini_address_space.ts +42 -0
  580. package/test_helpers/index.ts +11 -0
  581. package/test_helpers/test_fixtures/dataType_in_separateNamespace.xml +150 -0
  582. package/test_helpers/test_fixtures/dataType_in_separateNamespace_basic.xml +57 -0
  583. package/test_helpers/test_fixtures/dataType_in_separateNamespace_mix.xml +136 -0
  584. package/test_helpers/test_fixtures/dataType_withEnumeration.xml +82 -0
  585. package/test_helpers/test_fixtures/dataType_with_isOptionSet.xml +194 -0
  586. package/test_helpers/test_fixtures/dataType_with_structures.xml +605 -0
  587. package/test_helpers/test_fixtures/dataType_with_union.xml +1 -0
  588. package/test_helpers/test_fixtures/datatype_as_per_1.04.xml +91 -0
  589. package/test_helpers/test_fixtures/fixture_empty_nodeset2.xml +106 -0
  590. package/test_helpers/test_fixtures/fixture_simple_statemachine_nodeset2.xml +1303 -0
  591. package/test_helpers/test_fixtures/fixuture_nodeset_objects_with_some_methods.xml +362 -0
  592. package/test_helpers/test_fixtures/issue_846.xml +3172 -0
  593. package/test_helpers/test_fixtures/issue_899_variable_with_nodeid_value.xml +33 -0
  594. package/test_helpers/test_fixtures/mini.Node.Set2.xml +4508 -0
  595. package/test_helpers/test_fixtures/mini.nodeset.withVariousVariables.xml +194 -0
  596. package/test_helpers/test_fixtures/minimalist_nodeset_with_models.xml +8 -0
  597. package/test_helpers/test_fixtures/minimalist_nodeset_with_models_more_complex.xml +16 -0
  598. package/test_helpers/test_fixtures/nodeset_with_analog_items.xml +45 -0
@@ -0,0 +1,233 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UALimitAlarmImpl = void 0;
4
+ const node_opcua_assert_1 = require("node-opcua-assert");
5
+ const node_opcua_data_model_1 = require("node-opcua-data-model");
6
+ const node_opcua_data_value_1 = require("node-opcua-data-value");
7
+ const node_opcua_status_code_1 = require("node-opcua-status-code");
8
+ const node_opcua_variant_1 = require("node-opcua-variant");
9
+ const ua_alarm_condition_impl_1 = require("./ua_alarm_condition_impl");
10
+ class UALimitAlarmImpl extends ua_alarm_condition_impl_1.UAAlarmConditionImpl {
11
+ /**
12
+ * @method (static)UALimitAlarm.instantiate
13
+ * @param namespace {INamespace}
14
+ * @param limitAlarmTypeId
15
+ * @param options
16
+ * @param options.inputNode
17
+ * @param options.optionals
18
+ * @param options.highHighLimit {Double}
19
+ * @param options.highLimit {Double}
20
+ * @param options.lowLimit {Double}
21
+ * @param options.lowLowLimit {Double}
22
+ * @param data
23
+ * @return {UALimitAlarm}
24
+ */
25
+ static instantiate(namespace, limitAlarmTypeId, options, data) {
26
+ const addressSpace = namespace.addressSpace;
27
+ // must provide a inputNode
28
+ // xx assert(Object.prototype.hasOwnProperty.call(options,"conditionOf")); // must provide a conditionOf
29
+ (0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(options, "inputNode"), "UALimitAlarm.instantiate: options must provide the inputNode");
30
+ options.optionals = options.optionals || [];
31
+ let count = 0;
32
+ if (Object.prototype.hasOwnProperty.call(options, "highHighLimit")) {
33
+ options.optionals.push("HighHighLimit");
34
+ options.optionals.push("HighHighState");
35
+ count++;
36
+ }
37
+ if (Object.prototype.hasOwnProperty.call(options, "highLimit")) {
38
+ options.optionals.push("HighLimit");
39
+ options.optionals.push("HighState");
40
+ count++;
41
+ }
42
+ if (Object.prototype.hasOwnProperty.call(options, "lowLimit")) {
43
+ options.optionals.push("LowLimit");
44
+ options.optionals.push("LowState");
45
+ count++;
46
+ }
47
+ if (Object.prototype.hasOwnProperty.call(options, "lowLowLimit")) {
48
+ options.optionals.push("LowLowLimit");
49
+ options.optionals.push("LowLowState");
50
+ count++;
51
+ }
52
+ // xx assert(options.optionals,"must provide an optionals");
53
+ const alarmNode = ua_alarm_condition_impl_1.UAAlarmConditionImpl.instantiate(namespace, limitAlarmTypeId, options, data);
54
+ Object.setPrototypeOf(alarmNode, UALimitAlarmImpl.prototype);
55
+ (0, node_opcua_assert_1.assert)(alarmNode.conditionOfNode() !== null);
56
+ const inputNode = addressSpace._coerceNode(options.inputNode);
57
+ if (!inputNode) {
58
+ throw new Error("Expecting a valid input node");
59
+ }
60
+ (0, node_opcua_assert_1.assert)(inputNode.nodeClass === node_opcua_data_model_1.NodeClass.Variable);
61
+ // ----------------------- Install Limit Alarm specifics
62
+ // from spec 1.03:
63
+ // Four optional limits are defined that configure the states of the derived limit Alarm Types.
64
+ // These Properties shall be set for any Alarm limits that are exposed by the derived limit Alarm
65
+ // Types. These Properties are listed as optional but at least one is required. For cases where
66
+ // an underlying system cannot provide the actual value of a limit, the limit Property shall still be
67
+ // provided, but will have its AccessLevel set to not readable. It is assumed that the limits are
68
+ // described using the same Engineering Unit that is assigned to the variable that is the source
69
+ // of the alarm. For Rate of change limit alarms, it is assumed this rate is units per second
70
+ // unless otherwise specified.
71
+ if (count === 0) {
72
+ throw new Error("at least one limit is required");
73
+ }
74
+ const dataType = addressSpace.findCorrespondingBasicDataType(options.inputNode.dataType);
75
+ alarmNode._dataType = dataType;
76
+ if (Object.prototype.hasOwnProperty.call(options, "highHighLimit")) {
77
+ alarmNode.setHighHighLimit(options.highHighLimit);
78
+ }
79
+ if (Object.prototype.hasOwnProperty.call(options, "highLimit")) {
80
+ alarmNode.setHighLimit(options.highLimit);
81
+ }
82
+ if (Object.prototype.hasOwnProperty.call(options, "lowLimit")) {
83
+ alarmNode.setLowLimit(options.lowLimit);
84
+ }
85
+ if (Object.prototype.hasOwnProperty.call(options, "lowLowLimit")) {
86
+ alarmNode.setLowLowLimit(options.lowLowLimit);
87
+ }
88
+ /*
89
+ * The InputNode Property provides the NodeId of the Variable the Value of which is used as
90
+ * primary input in the calculation of the Alarm state. If this Variable is not in the AddressSpace,
91
+ * a Null NodeId shall be provided. In some systems, an Alarm may be calculated based on
92
+ * multiple Variables Values; it is up to the system to determine which Variable’s NodeId is used.
93
+ */
94
+ (0, node_opcua_assert_1.assert)(alarmNode.inputNode.nodeClass === node_opcua_data_model_1.NodeClass.Variable);
95
+ alarmNode.inputNode.setValueFromSource({ dataType: "NodeId", value: inputNode.nodeId });
96
+ // install inputNode monitoring for change
97
+ alarmNode.installInputNodeMonitoring(options.inputNode);
98
+ alarmNode._watchLimits();
99
+ return alarmNode;
100
+ }
101
+ /**
102
+ * @method getHighHighLimit
103
+ * @return {Number}
104
+ */
105
+ getHighHighLimit() {
106
+ if (!this.highHighLimit) {
107
+ throw new Error("Alarm do not expose highHighLimit");
108
+ }
109
+ return this.highHighLimit.readValue().value.value;
110
+ }
111
+ /**
112
+ * @method getHighLimit
113
+ * @return {Number}
114
+ */
115
+ getHighLimit() {
116
+ if (!this.highLimit) {
117
+ throw new Error("Alarm do not expose highLimit");
118
+ }
119
+ return this.highLimit.readValue().value.value;
120
+ }
121
+ /**
122
+ * @method getLowLimit
123
+ * @return {Float}
124
+ */
125
+ getLowLimit() {
126
+ if (!this.lowLimit) {
127
+ throw new Error("Alarm do not expose lowLimit");
128
+ }
129
+ return this.lowLimit.readValue().value.value;
130
+ }
131
+ /**
132
+ * @method getLowLowLimit
133
+ * @return {Float}
134
+ */
135
+ getLowLowLimit() {
136
+ if (!this.lowLowLimit) {
137
+ throw new Error("Alarm do not expose lowLowLimit");
138
+ }
139
+ return this.lowLowLimit.readValue().value.value;
140
+ }
141
+ /**
142
+ * @method setHighHighLimit
143
+ * @param value {Float}
144
+ */
145
+ setHighHighLimit(value) {
146
+ if (!this.highHighLimit) {
147
+ throw new Error("LimitAlarm instance must expose the optional HighHighLimit property");
148
+ }
149
+ this.highHighLimit.setValueFromSource({ dataType: this._dataType, value });
150
+ }
151
+ /**
152
+ * @method setHighLimit
153
+ * @param value {Float}
154
+ */
155
+ setHighLimit(value) {
156
+ if (!this.highLimit) {
157
+ throw new Error("LimitAlarm instance must expose the optional HighLimit property");
158
+ }
159
+ this.highLimit.setValueFromSource({ dataType: this._dataType, value });
160
+ }
161
+ /**
162
+ * @method setLowLimit
163
+ * @param value {Float}
164
+ */
165
+ setLowLimit(value) {
166
+ if (!this.lowLimit) {
167
+ throw new Error("LimitAlarm instance must expose the optional LowLimit property");
168
+ }
169
+ this.lowLimit.setValueFromSource({ dataType: this._dataType, value });
170
+ }
171
+ /**
172
+ * @method setLowLowLimit
173
+ * @param value {Float}
174
+ */
175
+ setLowLowLimit(value) {
176
+ if (!this.lowLowLimit) {
177
+ throw new Error("LimitAlarm instance must expose the optional LowLowLimit property");
178
+ }
179
+ this.lowLowLimit.setValueFromSource({ dataType: this._dataType, value });
180
+ }
181
+ _onInputDataValueChange(dataValue) {
182
+ (0, node_opcua_assert_1.assert)(dataValue instanceof node_opcua_data_value_1.DataValue);
183
+ if (dataValue.statusCode === node_opcua_status_code_1.StatusCodes.BadWaitingForInitialData &&
184
+ dataValue.statusCode === node_opcua_status_code_1.StatusCodes.UncertainInitialValue) {
185
+ // we are not ready yet to use the input node value
186
+ return;
187
+ }
188
+ if (dataValue.statusCode !== node_opcua_status_code_1.StatusCodes.Good) {
189
+ // what shall we do ?
190
+ this._signalNewCondition(null);
191
+ return;
192
+ }
193
+ if (dataValue.value.dataType === node_opcua_variant_1.DataType.Null) {
194
+ // what shall we do ?
195
+ this._signalNewCondition(null);
196
+ return;
197
+ }
198
+ const value = dataValue.value.value;
199
+ this._setStateBasedOnInputValue(value);
200
+ }
201
+ _setStateBasedOnInputValue(value) {
202
+ throw new Error("_setStateBasedOnInputValue must be overriden");
203
+ }
204
+ _watchLimits() {
205
+ /// ----------------------------------------------------------------------
206
+ /// Installing Limits monitored
207
+ const _updateState = () => this.updateState();
208
+ if (this.highHighLimit) {
209
+ this.highHighLimit.on("value_changed", _updateState);
210
+ }
211
+ if (this.highLimit) {
212
+ this.highLimit.on("value_changed", _updateState);
213
+ }
214
+ if (this.lowLimit) {
215
+ this.lowLimit.on("value_changed", _updateState);
216
+ }
217
+ if (this.lowLowLimit) {
218
+ this.lowLowLimit.on("value_changed", _updateState);
219
+ }
220
+ }
221
+ evaluateConditionsAfterEnabled() {
222
+ (0, node_opcua_assert_1.assert)(this.getEnabledState() === true);
223
+ // simulate input value event
224
+ const input = this.getInputNodeNode();
225
+ if (!input) {
226
+ return;
227
+ }
228
+ const dataValue = input.readValue();
229
+ this._onInputDataValueChange(dataValue);
230
+ }
231
+ }
232
+ exports.UALimitAlarmImpl = UALimitAlarmImpl;
233
+ //# sourceMappingURL=ua_limit_alarm_impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ua_limit_alarm_impl.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/ua_limit_alarm_impl.ts"],"names":[],"mappings":";;;AAKA,yDAA2C;AAC3C,iEAAkD;AAClD,iEAAkD;AAGlD,mEAAqD;AACrD,2DAA8C;AAK9C,uEAA6G;AA+B7G,MAAa,gBAAiB,S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C,CAAC;SACxD;QACD,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;SACpD;QACD,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;SACnD;QACD,IAAI,IAAI,CAAC,WAAW,EAAE;YAClB,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;SACtD;IACL,CAAC;IAES,8BAA8B;QACpC,IAAA,0BAAM,EAAC,IAAI,CAAC,eAAe,EAAE,KAAK,IAAI,CAAC,CAAC;QACxC,6BAA6B;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtC,IAAI,CAAC,KAAK,EAAE;YACR,OAAO;SACV;QACD,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QACpC,IAAI,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;CACJ;AAjQD,4CAiQC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @module node-opcua-address-space.AlarmsAndConditions
3
+ */
4
+ import { DataValue } from "node-opcua-data-value";
5
+ import { NodeId } from "node-opcua-nodeid";
6
+ import { DataType } from "node-opcua-variant";
7
+ import { UAVariable, UAVariableT } from "../../source";
8
+ import { NamespacePrivate } from "../namespace_private";
9
+ import { DeviationStuff } from "./deviation_alarm_helper";
10
+ import { UANonExclusiveLimitAlarm } from "./ua_non_exclusive_limit_alarm";
11
+ export interface UANonExclusiveDeviationAlarm extends UANonExclusiveLimitAlarm {
12
+ setpointNode: UAVariableT<NodeId, DataType.NodeId>;
13
+ setpointNodeNode: UAVariable;
14
+ }
15
+ /**
16
+ * @class UANonExclusiveDeviationAlarm
17
+ * @extends UANonExclusiveLimitAlarm
18
+ * @constructor
19
+ */
20
+ export declare class UANonExclusiveDeviationAlarm extends UANonExclusiveLimitAlarm implements DeviationStuff {
21
+ static instantiate(namespace: NamespacePrivate, type: string | NodeId, options: any, data: any): UANonExclusiveDeviationAlarm;
22
+ _setStateBasedOnInputValue(value: number): void;
23
+ getSetpointNodeNode(): UAVariable;
24
+ getSetpointValue(): number | null;
25
+ _onSetpointDataValueChange(dataValue: DataValue): void;
26
+ _install_setpoint(options: any): any;
27
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /**
3
+ * @module node-opcua-address-space.AlarmsAndConditions
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UANonExclusiveDeviationAlarm = void 0;
7
+ const node_opcua_assert_1 = require("node-opcua-assert");
8
+ const deviation_alarm_helper_1 = require("./deviation_alarm_helper");
9
+ const ua_limit_alarm_1 = require("./ua_limit_alarm");
10
+ const ua_non_exclusive_limit_alarm_1 = require("./ua_non_exclusive_limit_alarm");
11
+ /**
12
+ * @class UANonExclusiveDeviationAlarm
13
+ * @extends UANonExclusiveLimitAlarm
14
+ * @constructor
15
+ */
16
+ class UANonExclusiveDeviationAlarm extends ua_non_exclusive_limit_alarm_1.UANonExclusiveLimitAlarm {
17
+ static instantiate(namespace, type, options, data) {
18
+ const addressSpace = namespace.addressSpace;
19
+ const nonExclusiveDeviationAlarmType = addressSpace.findEventType("NonExclusiveDeviationAlarmType");
20
+ /* istanbul ignore next */
21
+ if (!nonExclusiveDeviationAlarmType) {
22
+ throw new Error("cannot find ExclusiveDeviationAlarmType");
23
+ }
24
+ (0, node_opcua_assert_1.assert)(type === nonExclusiveDeviationAlarmType.browseName.toString());
25
+ const alarm = ua_non_exclusive_limit_alarm_1.UANonExclusiveLimitAlarm.instantiate(namespace, type, options, data);
26
+ Object.setPrototypeOf(alarm, UANonExclusiveDeviationAlarm.prototype);
27
+ (0, node_opcua_assert_1.assert)(alarm instanceof UANonExclusiveDeviationAlarm);
28
+ (0, node_opcua_assert_1.assert)(alarm instanceof ua_non_exclusive_limit_alarm_1.UANonExclusiveLimitAlarm);
29
+ (0, node_opcua_assert_1.assert)(alarm instanceof ua_limit_alarm_1.UALimitAlarm);
30
+ alarm._install_setpoint(options);
31
+ return alarm;
32
+ }
33
+ _setStateBasedOnInputValue(value) {
34
+ const setpointValue = this.getSetpointValue();
35
+ if (setpointValue === null) {
36
+ throw new Error("Cannot access setpoint Value");
37
+ }
38
+ (0, node_opcua_assert_1.assert)(isFinite(setpointValue), "expecting a valid setpoint value");
39
+ // call base class implementation
40
+ super._setStateBasedOnInputValue(value - setpointValue);
41
+ }
42
+ getSetpointNodeNode() {
43
+ return deviation_alarm_helper_1.DeviationAlarmHelper_getSetpointNodeNode.call(this);
44
+ }
45
+ getSetpointValue() {
46
+ return deviation_alarm_helper_1.DeviationAlarmHelper_getSetpointValue.call(this);
47
+ }
48
+ _onSetpointDataValueChange(dataValue) {
49
+ deviation_alarm_helper_1.DeviationAlarmHelper_onSetpointDataValueChange.call(this, dataValue);
50
+ }
51
+ _install_setpoint(options) {
52
+ return deviation_alarm_helper_1.DeviationAlarmHelper_install_setpoint.call(this, options);
53
+ }
54
+ }
55
+ exports.UANonExclusiveDeviationAlarm = UANonExclusiveDeviationAlarm;
56
+ /*
57
+ UANonExclusiveDeviationAlarm.prototype.getSetpointNodeNode = DeviationAlarmHelper.getSetpointNodeNode;
58
+ UANonExclusiveDeviationAlarm.prototype.getSetpointValue = DeviationAlarmHelper.getSetpointValue;
59
+ UANonExclusiveDeviationAlarm.prototype._onSetpointDataValueChange = DeviationAlarmHelper._onSetpointDataValueChange;
60
+ UANonExclusiveDeviationAlarm.prototype._install_setpoint = DeviationAlarmHelper._install_setpoint;
61
+ */
62
+ //# sourceMappingURL=ua_non_exclusive_deviation_alarm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ua_non_exclusive_deviation_alarm.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.ts"],"names":[],"mappings":";AAAA;;GAEG;;;A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AA0B,CAAC,KAAK,GAAG,aAAa,CAAC,CAAC;IAC5D,CAAC;IAEM,mBAAmB;QACtB,OAAO,iEAAwC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/D,CAAC;IAEM,gBAAgB;QACnB,OAAO,8DAAqC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAEM,0BAA0B,CAAC,SAAoB;QAClD,uEAA8C,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACzE,CAAC;IAEM,iBAAiB,CAAC,OAAY;QACjC,OAAO,8DAAqC,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACJ;AArDD,oEAqDC;AAED;;;;;EAKE"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @module node-opcua-address-space.AlarmsAndConditions
3
+ */
4
+ import { DataValue } from "node-opcua-data-value";
5
+ import { NodeId } from "node-opcua-nodeid";
6
+ import { DataType } from "node-opcua-variant";
7
+ import { UANonExclusiveDeviationAlarm_Base } from "node-opcua-nodeset-ua";
8
+ import { UAVariable, UAVariableT } from "../../source";
9
+ import { NamespacePrivate } from "../namespace_private";
10
+ import { AddressSpace } from "../address_space";
11
+ import { DeviationStuff } from "./deviation_alarm_helper";
12
+ import { UANonExclusiveLimitAlarmEx, UANonExclusiveLimitAlarmImpl } from "./ua_non_exclusive_limit_alarm_impl";
13
+ export interface UANonExclusiveDeviationAlarmEx extends Omit<UANonExclusiveDeviationAlarm_Base, "ackedState" | "activeState" | "confirmedState" | "enabledState" | "latchedState" | "limitState" | "outOfServiceState" | "shelvingState" | "silenceState" | "suppressedState" | "highHighState" | "highState" | "lowState" | "lowLowState">, UANonExclusiveLimitAlarmEx, DeviationStuff {
14
+ setpointNode: UAVariableT<NodeId, DataType.NodeId>;
15
+ setpointNodeNode: UAVariable;
16
+ }
17
+ export declare interface UANonExclusiveDeviationAlarmImpl extends UANonExclusiveLimitAlarmImpl, UANonExclusiveDeviationAlarmEx {
18
+ on(eventName: string, eventHandler: any): this;
19
+ get addressSpace(): AddressSpace;
20
+ }
21
+ export declare class UANonExclusiveDeviationAlarmImpl extends UANonExclusiveLimitAlarmImpl implements UANonExclusiveDeviationAlarmEx {
22
+ static instantiate(namespace: NamespacePrivate, type: string | NodeId, options: any, data: any): UANonExclusiveDeviationAlarmImpl;
23
+ _setStateBasedOnInputValue(value: number): void;
24
+ getSetpointNodeNode(): UAVariable;
25
+ getSetpointValue(): number | null;
26
+ _onSetpointDataValueChange(dataValue: DataValue): void;
27
+ _install_setpoint(options: any): any;
28
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /**
3
+ * @module node-opcua-address-space.AlarmsAndConditions
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UANonExclusiveDeviationAlarmImpl = void 0;
7
+ const node_opcua_assert_1 = require("node-opcua-assert");
8
+ const deviation_alarm_helper_1 = require("./deviation_alarm_helper");
9
+ const ua_limit_alarm_impl_1 = require("./ua_limit_alarm_impl");
10
+ const ua_non_exclusive_limit_alarm_impl_1 = require("./ua_non_exclusive_limit_alarm_impl");
11
+ class UANonExclusiveDeviationAlarmImpl extends ua_non_exclusive_limit_alarm_impl_1.UANonExclusiveLimitAlarmImpl {
12
+ static instantiate(namespace, type, options, data) {
13
+ const addressSpace = namespace.addressSpace;
14
+ const nonExclusiveDeviationAlarmType = addressSpace.findEventType("NonExclusiveDeviationAlarmType");
15
+ /* istanbul ignore next */
16
+ if (!nonExclusiveDeviationAlarmType) {
17
+ throw new Error("cannot find ExclusiveDeviationAlarmType");
18
+ }
19
+ (0, node_opcua_assert_1.assert)(type === nonExclusiveDeviationAlarmType.browseName.toString());
20
+ const alarm = ua_non_exclusive_limit_alarm_impl_1.UANonExclusiveLimitAlarmImpl.instantiate(namespace, type, options, data);
21
+ Object.setPrototypeOf(alarm, UANonExclusiveDeviationAlarmImpl.prototype);
22
+ (0, node_opcua_assert_1.assert)(alarm instanceof UANonExclusiveDeviationAlarmImpl);
23
+ (0, node_opcua_assert_1.assert)(alarm instanceof ua_non_exclusive_limit_alarm_impl_1.UANonExclusiveLimitAlarmImpl);
24
+ (0, node_opcua_assert_1.assert)(alarm instanceof ua_limit_alarm_impl_1.UALimitAlarmImpl);
25
+ alarm._install_setpoint(options);
26
+ return alarm;
27
+ }
28
+ _setStateBasedOnInputValue(value) {
29
+ const setpointValue = this.getSetpointValue();
30
+ if (setpointValue === null) {
31
+ throw new Error("Cannot access setpoint Value");
32
+ }
33
+ (0, node_opcua_assert_1.assert)(isFinite(setpointValue), "expecting a valid setpoint value");
34
+ // call base class implementation
35
+ super._setStateBasedOnInputValue(value - setpointValue);
36
+ }
37
+ getSetpointNodeNode() {
38
+ return deviation_alarm_helper_1.DeviationAlarmHelper_getSetpointNodeNode.call(this);
39
+ }
40
+ getSetpointValue() {
41
+ return deviation_alarm_helper_1.DeviationAlarmHelper_getSetpointValue.call(this);
42
+ }
43
+ _onSetpointDataValueChange(dataValue) {
44
+ deviation_alarm_helper_1.DeviationAlarmHelper_onSetpointDataValueChange.call(this, dataValue);
45
+ }
46
+ _install_setpoint(options) {
47
+ return deviation_alarm_helper_1.DeviationAlarmHelper_install_setpoint.call(this, options);
48
+ }
49
+ }
50
+ exports.UANonExclusiveDeviationAlarmImpl = UANonExclusiveDeviationAlarmImpl;
51
+ //# sourceMappingURL=ua_non_exclusive_deviation_alarm_impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ua_non_exclusive_deviation_alarm_impl.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,yDAA2C;AAU3C,qEAMkC;AAClC,+DAAyD;AACzD,2FAA+G;AAgC/G,MAAa,gCAAiC,SAAQ,gEAA4B;IACvE,MAAM,CAAC,WAAW,CACrB,SAA2B,EAC3B,IAAqB,EACrB,OAAY,EACZ,IAAS;QAET,MAAM,YAAY,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AAC,CAAC;IAC5D,CAAC;IAEM,0BAA0B,CAAC,SAAoB;QAClD,uEAA8C,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACzE,CAAC;IAEM,iBAAiB,CAAC,OAAY;QACjC,OAAO,8DAAqC,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACJ;AArDD,4EAqDC"}
@@ -0,0 +1,49 @@
1
+ import { NodeId } from "node-opcua-nodeid";
2
+ import { UAEventType } from "../../source";
3
+ import { NamespacePrivate } from "../namespace_private";
4
+ import { UATwoStateVariable } from "../state_machine/ua_two_state_variable";
5
+ import { ConditionInfo } from "./condition_info";
6
+ import { UALimitAlarm } from "./ua_limit_alarm";
7
+ export interface UANonExclusiveLimitAlarm {
8
+ /**
9
+ * @property lowLowState
10
+ * @type UATwoStateVariable
11
+ */
12
+ lowLowState: UATwoStateVariable;
13
+ /**
14
+ * @property lowState
15
+ * @type UATwoStateVariable
16
+ */
17
+ lowState: UATwoStateVariable;
18
+ /**
19
+ * @property highState
20
+ * @type UATwoStateVariable
21
+ */
22
+ highState: UATwoStateVariable;
23
+ /**
24
+ * @property highHighState
25
+ * @type UATwoStateVariable
26
+ */
27
+ highHighState: UATwoStateVariable;
28
+ }
29
+ /***
30
+ * @class UANonExclusiveLimitAlarm
31
+ * @extends UALimitAlarm
32
+ * @constructor
33
+ */
34
+ export declare class UANonExclusiveLimitAlarm extends UALimitAlarm {
35
+ /**
36
+ * @method (static)instantiate
37
+ * @param namespace {Namespace}
38
+ * @param type
39
+ * @param options
40
+ * @param data
41
+ * @return {UANonExclusiveLimitAlarm}
42
+ */
43
+ static instantiate(namespace: NamespacePrivate, type: UAEventType | NodeId | string, options: any, data: any): UANonExclusiveLimitAlarm;
44
+ _calculateConditionInfo(states: string | null, isActive: boolean, value: string, oldConditionInfo: ConditionInfo): ConditionInfo;
45
+ _signalNewCondition2(states: {
46
+ [key: string]: string;
47
+ }, isActive: boolean, value: string): void;
48
+ protected _setStateBasedOnInputValue(value: number): void;
49
+ }
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UANonExclusiveLimitAlarm = void 0;
4
+ /**
5
+ * @module node-opcua-address-space.AlarmsAndConditions
6
+ */
7
+ const node_opcua_assert_1 = require("node-opcua-assert");
8
+ const node_opcua_status_code_1 = require("node-opcua-status-code");
9
+ const ua_two_state_variable_1 = require("../state_machine/ua_two_state_variable");
10
+ const condition_info_1 = require("./condition_info");
11
+ const ua_limit_alarm_1 = require("./ua_limit_alarm");
12
+ /***
13
+ * @class UANonExclusiveLimitAlarm
14
+ * @extends UALimitAlarm
15
+ * @constructor
16
+ */
17
+ class UANonExclusiveLimitAlarm extends ua_limit_alarm_1.UALimitAlarm {
18
+ /**
19
+ * @method (static)instantiate
20
+ * @param namespace {Namespace}
21
+ * @param type
22
+ * @param options
23
+ * @param data
24
+ * @return {UANonExclusiveLimitAlarm}
25
+ */
26
+ static instantiate(namespace, type, options, data) {
27
+ const addressSpace = namespace.addressSpace;
28
+ options.optionals = options.optionals || [];
29
+ if (options.hasOwnProperty("lowLowLimit")) {
30
+ options.optionals.push("LowLowLimit");
31
+ options.optionals.push("LowLowState");
32
+ }
33
+ if (options.hasOwnProperty("lowLimit")) {
34
+ options.optionals.push("LowLimit");
35
+ options.optionals.push("LowState");
36
+ }
37
+ if (options.hasOwnProperty("highLimit")) {
38
+ options.optionals.push("HighLimit");
39
+ options.optionals.push("HighState");
40
+ }
41
+ if (options.hasOwnProperty("highHighLimit")) {
42
+ options.optionals.push("HighHighLimit");
43
+ options.optionals.push("HighHighState");
44
+ }
45
+ const nonExclusiveAlarmType = addressSpace.findEventType(type);
46
+ /* istanbul ignore next */
47
+ if (!nonExclusiveAlarmType) {
48
+ throw new Error(" cannot find Alarm Condition Type for " + type);
49
+ }
50
+ const nonExclusiveLimitAlarmType = addressSpace.findEventType("NonExclusiveLimitAlarmType");
51
+ /* istanbul ignore next */
52
+ if (!nonExclusiveLimitAlarmType) {
53
+ throw new Error("cannot find NonExclusiveLimitAlarmType");
54
+ }
55
+ // assert(type nonExclusiveLimitAlarmType.browseName.toString());
56
+ const alarm = ua_limit_alarm_1.UALimitAlarm.instantiate(namespace, type, options, data);
57
+ Object.setPrototypeOf(alarm, UANonExclusiveLimitAlarm.prototype);
58
+ (0, node_opcua_assert_1.assert)(alarm instanceof ua_limit_alarm_1.UALimitAlarm);
59
+ (0, node_opcua_assert_1.assert)(alarm instanceof UANonExclusiveLimitAlarm);
60
+ // ---------------- install States
61
+ if (alarm.lowLowState) {
62
+ (0, ua_two_state_variable_1._install_TwoStateVariable_machinery)(alarm.lowLowState, {
63
+ falseState: "LowLow inactive",
64
+ trueState: "LowLow active"
65
+ });
66
+ alarm.lowLowState.setValue(false);
67
+ (0, node_opcua_assert_1.assert)(alarm.hasOwnProperty("lowLowLimit"));
68
+ }
69
+ if (alarm.lowState) {
70
+ (0, ua_two_state_variable_1._install_TwoStateVariable_machinery)(alarm.lowState, {
71
+ falseState: "Low inactive",
72
+ trueState: "Low active"
73
+ });
74
+ alarm.lowState.setValue(false);
75
+ (0, node_opcua_assert_1.assert)(alarm.hasOwnProperty("lowLimit"));
76
+ }
77
+ if (alarm.highState) {
78
+ (0, ua_two_state_variable_1._install_TwoStateVariable_machinery)(alarm.highState, {
79
+ falseState: "High inactive",
80
+ trueState: "High active"
81
+ });
82
+ alarm.highState.setValue(false);
83
+ (0, node_opcua_assert_1.assert)(alarm.hasOwnProperty("highLimit"));
84
+ }
85
+ if (alarm.highHighState) {
86
+ (0, ua_two_state_variable_1._install_TwoStateVariable_machinery)(alarm.highHighState, {
87
+ falseState: "HighHigh inactive",
88
+ trueState: "HighHigh active"
89
+ });
90
+ alarm.highHighState.setValue(false);
91
+ (0, node_opcua_assert_1.assert)(alarm.hasOwnProperty("highHighLimit"));
92
+ }
93
+ alarm.activeState.setValue(false);
94
+ alarm.updateState();
95
+ return alarm;
96
+ }
97
+ _calculateConditionInfo(states, isActive, value, oldConditionInfo) {
98
+ if (!isActive) {
99
+ return new condition_info_1.ConditionInfo({
100
+ message: "Back to normal",
101
+ quality: node_opcua_status_code_1.StatusCodes.Good,
102
+ retain: true,
103
+ severity: 0
104
+ });
105
+ }
106
+ else {
107
+ return new condition_info_1.ConditionInfo({
108
+ message: "Condition value is " + value + " and state is " + states,
109
+ quality: node_opcua_status_code_1.StatusCodes.Good,
110
+ retain: true,
111
+ severity: 150
112
+ });
113
+ }
114
+ }
115
+ _signalNewCondition2(states, isActive, value) {
116
+ const alarm = this;
117
+ if (typeof states === "string") {
118
+ return;
119
+ }
120
+ function _install(name) {
121
+ if (states[name] !== "unset") {
122
+ alarm[name + "State"].setValue(states[name]);
123
+ }
124
+ }
125
+ _install("highHigh");
126
+ _install("high");
127
+ _install("low");
128
+ _install("lowLow");
129
+ // build-up state string
130
+ let state_str = Object.keys(states)
131
+ .map((s) => (states[s] ? s : null))
132
+ .filter((a) => a !== null)
133
+ .join(";"); //
134
+ state_str = JSON.stringify(states);
135
+ ua_limit_alarm_1.UALimitAlarm.prototype._signalNewCondition.call(this, state_str, isActive, value);
136
+ }
137
+ _setStateBasedOnInputValue(value) {
138
+ (0, node_opcua_assert_1.assert)(isFinite(value), "expecting a valid value here");
139
+ const alarm = this;
140
+ let isActive = false;
141
+ const states = {
142
+ highHigh: alarm.highHighState ? alarm.highHighState.getValue() : "unset",
143
+ high: alarm.highState ? alarm.highState.getValue() : "unset",
144
+ low: alarm.lowState ? alarm.lowState.getValue() : "unset",
145
+ lowLow: alarm.lowLowState ? alarm.lowLowState.getValue() : "unset"
146
+ };
147
+ let count = 0;
148
+ function ___p(stateName, func_value) {
149
+ if (states[stateName] !== "unset") {
150
+ const val = func_value();
151
+ isActive = isActive || val;
152
+ if (states[stateName] !== val) {
153
+ states[stateName] = val;
154
+ count += 1;
155
+ }
156
+ }
157
+ }
158
+ ___p("highHigh", () => {
159
+ return alarm.getHighHighLimit() < value;
160
+ });
161
+ ___p("high", () => {
162
+ return alarm.getHighLimit() < value;
163
+ });
164
+ ___p("low", () => {
165
+ return alarm.getLowLimit() > value;
166
+ });
167
+ ___p("lowLow", () => {
168
+ return alarm.getLowLowLimit() > value;
169
+ });
170
+ if (count > 0) {
171
+ alarm._signalNewCondition2(states, isActive, value.toString());
172
+ }
173
+ }
174
+ }
175
+ exports.UANonExclusiveLimitAlarm = UANonExclusiveLimitAlarm;
176
+ //# sourceMappingURL=ua_non_exclusive_limit_alarm.js.map