node-opcua-address-space 2.72.2 → 2.74.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.
- package/LICENSE +3 -1
- package/dist/source/helpers/argument_list.d.ts +1 -2
- package/dist/source/helpers/argument_list.js +1 -29
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/index.d.ts +22 -4
- package/dist/source/index.js +28 -7
- package/dist/source/index.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +8 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +199 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js +10 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +14 -0
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +6 -0
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +7 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +7 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +9 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +5 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +23 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +32 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +15 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +42 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +7 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +26 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +5 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +20 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +26 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +10 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +10 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +30 -0
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js +3 -0
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +1 -0
- package/dist/source/loader/load_nodeset2.js +6 -13
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/source/namespace_alarm_and_condition.d.ts +9 -9
- package/dist/src/address_space_private.d.ts +1 -1
- package/dist/src/alarms_and_conditions/condition.d.ts +2 -2
- package/dist/src/alarms_and_conditions/condition.js +4 -6
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +26 -0
- package/dist/src/alarms_and_conditions/condition_info_impl.js +55 -0
- package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +231 -0
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +667 -0
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +3 -16
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
- package/dist/src/alarms_and_conditions/index.d.ts +2 -2
- package/dist/src/alarms_and_conditions/index.js +2 -2
- package/dist/src/alarms_and_conditions/index.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +5 -25
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +4 -35
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +5 -5
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +1 -4
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +14 -14
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +5 -2
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +4 -38
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +9 -9
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +3 -7
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +0 -23
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +4 -8
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +3 -20
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +2 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +20 -46
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +13 -13
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +5 -10
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +4 -11
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +3 -3
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +4 -6
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +2 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +51 -0
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +250 -0
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -0
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +25 -0
- package/dist/src/data_access/ua_two_state_discrete_impl.js +154 -0
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -0
- package/dist/src/index_current.d.ts +2 -3
- package/dist/src/index_current.js +3 -5
- package/dist/src/index_current.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +9 -8
- package/dist/src/namespace_impl.js +5 -6
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js +16 -4
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +9 -5
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +5 -5
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/ua_data_type_impl.d.ts +2 -2
- package/dist/src/ua_data_type_impl.js +3 -0
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.d.ts +1 -2
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/package.json +38 -38
- package/source/helpers/argument_list.ts +2 -36
- package/source/index.ts +25 -5
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +9 -1
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +297 -0
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +16 -0
- package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +7 -0
- package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +10 -0
- package/source/interfaces/alarms_and_conditions/instantiate_condition_options.ts +8 -0
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +4 -0
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +10 -0
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +6 -0
- package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +35 -0
- package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +41 -0
- package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +31 -0
- package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +67 -0
- package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +45 -0
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +22 -0
- package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +25 -0
- package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +28 -0
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +31 -0
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +25 -0
- package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +32 -0
- package/source/loader/load_nodeset2.ts +10 -16
- package/source/loader/make_xml_extension_object_parser.ts +2 -2
- package/source/namespace_alarm_and_condition.ts +16 -10
- package/src/address_space_private.ts +1 -1
- package/src/alarms_and_conditions/condition.ts +4 -7
- package/src/alarms_and_conditions/{condition_info.ts → condition_info_impl.ts} +3 -9
- package/src/alarms_and_conditions/{condition_snapshot.ts → condition_snapshot_impl.ts} +6 -9
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +3 -15
- package/src/alarms_and_conditions/index.ts +2 -2
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +10 -33
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +12 -50
- package/src/alarms_and_conditions/ua_base_event_impl.ts +1 -4
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +23 -26
- package/src/alarms_and_conditions/ua_condition_impl.ts +17 -65
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +3 -50
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +7 -22
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +1 -1
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +3 -24
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +2 -1
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +6 -37
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +7 -33
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +7 -28
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +4 -6
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +2 -1
- package/src/data_access/{ua_multistate_value_discrete.ts → ua_multistate_value_discrete_impl.ts} +0 -0
- package/src/data_access/{ua_two_state_discrete.ts → ua_two_state_discrete_impl.ts} +0 -0
- package/src/index_current.ts +2 -4
- package/src/namespace_impl.ts +16 -11
- package/src/nodeset_tools/nodeset_to_xml.ts +18 -6
- package/src/state_machine/ua_shelving_state_machine_ex.ts +21 -26
- package/src/ua_data_type_impl.ts +7 -3
- package/src/ua_variable_impl.ts +3 -11
- package/test_helpers/alarms_and_conditions_demo.ts +3 -3
- package/test_helpers/create_minimalist_address_space_nodeset.ts +2 -2
- package/test_helpers/test_fixtures/datatype_with_allow_subtype.xml +104 -0
- package/test_helpers/test_fixtures/variabletype_with_value.xml +10 -10
package/source/index.ts
CHANGED
|
@@ -7,6 +7,8 @@ export * from "./interfaces/state_machine/ua_state_machine_type";
|
|
|
7
7
|
export * from "./interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex";
|
|
8
8
|
export * from "./interfaces/state_machine/ua_finite_state_machine_type";
|
|
9
9
|
export * from "./interfaces/state_machine/ua_program_state_machine_type";
|
|
10
|
+
export * from "./interfaces/state_machine/ua_shelved_state_machine_ex";
|
|
11
|
+
|
|
10
12
|
export * from "./interfaces/state_machine/ua_transition_ex";
|
|
11
13
|
|
|
12
14
|
export * from "./interfaces/ua_subscription_diagnostics_variable_ex";
|
|
@@ -16,9 +18,28 @@ export * from "./interfaces/data_access/ua_multistate_value_discrete_ex";
|
|
|
16
18
|
export * from "./interfaces/data_access/ua_two_state_discrete_ex";
|
|
17
19
|
export * from "./interfaces/data_access/ua_y_array_item_ex";
|
|
18
20
|
|
|
21
|
+
|
|
22
|
+
export * from "./interfaces/alarms_and_conditions/condition_info_i";
|
|
23
|
+
export * from "./interfaces/alarms_and_conditions/condition_snapshot";
|
|
24
|
+
export * from "./interfaces/alarms_and_conditions/instantiate_alarm_condition_options";
|
|
25
|
+
export * from "./interfaces/alarms_and_conditions/instantiate_condition_options";
|
|
26
|
+
export * from "./interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options";
|
|
27
|
+
export * from "./interfaces/alarms_and_conditions/instantiate_limit_alarm_options";
|
|
28
|
+
export * from "./interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options";
|
|
29
|
+
export * from "./interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex";
|
|
30
|
+
export * from "./interfaces/alarms_and_conditions/ua_alarm_condition_ex";
|
|
31
|
+
export * from "./interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex";
|
|
32
|
+
export * from "./interfaces/alarms_and_conditions/ua_condition_ex";
|
|
33
|
+
export * from "./interfaces/alarms_and_conditions/ua_discrete_alarm_ex";
|
|
34
|
+
export * from "./interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex";
|
|
35
|
+
export * from "./interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex";
|
|
36
|
+
export * from "./interfaces/alarms_and_conditions/ua_limit_alarm_ex";
|
|
37
|
+
export * from "./interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex";
|
|
38
|
+
export * from "./interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex";
|
|
39
|
+
|
|
19
40
|
export { promoteToMultiStateDiscrete } from "../src/data_access/ua_multistate_discrete_impl";
|
|
20
|
-
export { promoteToMultiStateValueDiscrete } from "../src/data_access/
|
|
21
|
-
export { promoteToTwoStateDiscrete } from "../src/data_access/
|
|
41
|
+
export { promoteToMultiStateValueDiscrete } from "../src/data_access/ua_multistate_value_discrete_impl";
|
|
42
|
+
export { promoteToTwoStateDiscrete } from "../src/data_access/ua_two_state_discrete_impl";
|
|
22
43
|
|
|
23
44
|
|
|
24
45
|
export * from "./ua_root_folder";
|
|
@@ -41,9 +62,8 @@ export * from "./loader/generateAddressSpaceRaw";
|
|
|
41
62
|
export * from "./namespace";
|
|
42
63
|
export * from "./namespace_data_access";
|
|
43
64
|
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
|
|
65
|
+
export { extractEventFields,checkWhereClause} from "../src/alarms_and_conditions";
|
|
66
|
+
export { instantiateCertificateExpirationAlarm } from "../src/alarms_and_conditions/ua_certificate_expiration_alarm_impl";
|
|
47
67
|
|
|
48
68
|
export { NodeIdManager, ConstructNodeIdOptions } from "../src/nodeid_manager";
|
|
49
69
|
export * from "../src/event_data";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
4
|
import { UInt16 } from "node-opcua-basic-types";
|
|
5
|
-
import { LocalizedTextLike } from "node-opcua-data-model";
|
|
5
|
+
import { LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
|
|
6
6
|
import { StatusCode } from "node-opcua-status-code";
|
|
7
7
|
|
|
8
8
|
export interface ConditionInfoOptions {
|
|
@@ -11,3 +11,11 @@ export interface ConditionInfoOptions {
|
|
|
11
11
|
severity?: UInt16 | null;
|
|
12
12
|
retain?: boolean | null;
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
export interface ConditionInfo {
|
|
16
|
+
message: LocalizedText | null;
|
|
17
|
+
quality: StatusCode | null;
|
|
18
|
+
severity: UInt16 | null;
|
|
19
|
+
retain: boolean | null;
|
|
20
|
+
isDifferentFrom(otherConditionInfo: ConditionInfo): boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { EventEmitter } from "events";
|
|
2
|
+
import { Variant } from "node-opcua-variant";
|
|
3
|
+
import { IEventData, UAVariable, BaseNode, ISessionContext, UAObject } from "node-opcua-address-space-base";
|
|
4
|
+
import { assert } from "node-opcua-assert";
|
|
5
|
+
import { UInt16 } from "node-opcua-basic-types";
|
|
6
|
+
import { coerceLocalizedText, LocalizedText, LocalizedTextLike, NodeClass } from "node-opcua-data-model";
|
|
7
|
+
import { DataValue } from "node-opcua-data-value";
|
|
8
|
+
import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
9
|
+
import { NodeId, sameNodeId } from "node-opcua-nodeid";
|
|
10
|
+
import { UAAcknowledgeableCondition } from "node-opcua-nodeset-ua";
|
|
11
|
+
import { StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
12
|
+
import { SimpleAttributeOperand, TimeZoneDataType } from "node-opcua-types";
|
|
13
|
+
import * as utils from "node-opcua-utils";
|
|
14
|
+
import { UtcTime } from "../state_machine/ua_state_machine_type";
|
|
15
|
+
|
|
16
|
+
export interface ConditionSnapshot {
|
|
17
|
+
on(eventName: "value_changed", eventHandler: (node: UAVariable, variant: Variant) => void): this;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @module node-opcua-address-space.AlarmsAndConditions
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
function normalizeName(str: string): string {
|
|
24
|
+
return str.split(".").map(utils.lowerFirstLetter).join(".");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface ConditionSnapshot extends EventEmitter {
|
|
28
|
+
// static normalizeName = normalizeName;
|
|
29
|
+
|
|
30
|
+
condition: BaseNode;
|
|
31
|
+
eventData: IEventData| null;
|
|
32
|
+
branchId: NodeId| null;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @method resolveSelectClause
|
|
36
|
+
* @param selectClause {SelectClause}
|
|
37
|
+
*/
|
|
38
|
+
resolveSelectClause(selectClause: SimpleAttributeOperand): NodeId | null;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
readValue(sessionContext: ISessionContext, nodeId: NodeId, selectClause: SimpleAttributeOperand): Variant;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @method getBrandId
|
|
47
|
+
* @return {NodeId}
|
|
48
|
+
*/
|
|
49
|
+
getBranchId(): NodeId;
|
|
50
|
+
/**
|
|
51
|
+
* @method getEventId
|
|
52
|
+
* @return {ByteString}
|
|
53
|
+
*/
|
|
54
|
+
getEventId(): Buffer;
|
|
55
|
+
/**
|
|
56
|
+
* @method getRetain
|
|
57
|
+
* @return {Boolean}
|
|
58
|
+
*/
|
|
59
|
+
getRetain(): boolean;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @method setRetain
|
|
63
|
+
* @param retainFlag {Boolean}
|
|
64
|
+
*/
|
|
65
|
+
setRetain(retainFlag: boolean): void;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @method renewEventId
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
71
|
+
renewEventId(): void;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @method getEnabledState
|
|
75
|
+
* @return {Boolean}
|
|
76
|
+
*/
|
|
77
|
+
getEnabledState(): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* @method setEnabledState
|
|
80
|
+
* @param value {Boolean}
|
|
81
|
+
* @return void
|
|
82
|
+
*/
|
|
83
|
+
setEnabledState(value: boolean): void;
|
|
84
|
+
/**
|
|
85
|
+
* @method getEnabledStateAsString
|
|
86
|
+
* @return {String}
|
|
87
|
+
*/
|
|
88
|
+
getEnabledStateAsString(): string;
|
|
89
|
+
/**
|
|
90
|
+
* @method getComment
|
|
91
|
+
* @return {LocalizedText}
|
|
92
|
+
*/
|
|
93
|
+
getComment(): LocalizedText;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Set condition comment
|
|
97
|
+
*
|
|
98
|
+
* Comment contains the last comment provided for a certain state (ConditionBranch). It may
|
|
99
|
+
* have been provided by an AddComment Method, some other Method or in some other
|
|
100
|
+
* manner. The initial value of this Variable is null, unless it is provided in some other manner. If
|
|
101
|
+
* a Method provides as an option the ability to set a Comment, then the value of this Variable is
|
|
102
|
+
* reset to null if an optional comment is not provided.
|
|
103
|
+
*
|
|
104
|
+
* @method setComment
|
|
105
|
+
* @param txtMessage {LocalizedText}
|
|
106
|
+
*/
|
|
107
|
+
setComment(txtMessage: LocalizedTextLike): void;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @method setMessage
|
|
111
|
+
* @param txtMessage {LocalizedText}
|
|
112
|
+
*/
|
|
113
|
+
setMessage(txtMessage: LocalizedTextLike | LocalizedText): void;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @method setClientUserId
|
|
117
|
+
* @param userIdentity {String}
|
|
118
|
+
*/
|
|
119
|
+
setClientUserId(userIdentity: string): void;
|
|
120
|
+
/*
|
|
121
|
+
*
|
|
122
|
+
*
|
|
123
|
+
* as per spec 1.0.3 - Part 9
|
|
124
|
+
*
|
|
125
|
+
* Quality reveals the status of process values or other resources that this Condition instance is
|
|
126
|
+
* based upon. If, for example, a process value is “Uncertain”, the associated “LevelAlarm”
|
|
127
|
+
* Condition is also questionable. Values for the Quality can be any of the OPC StatusCodes
|
|
128
|
+
* defined in Part 8 as well as Good, Uncertain and Bad as defined in Part 4. These
|
|
129
|
+
* StatusCodes are similar to but slightly more generic than the description of data quality in the
|
|
130
|
+
* various field bus specifications. It is the responsibility of the Server to map internal status
|
|
131
|
+
* information to these codes. A Server which supports no quality information shall return Good.
|
|
132
|
+
* This quality can also reflect the communication status associated with the system that this
|
|
133
|
+
* value or resource is based on and from which this Alarm was received. For communication
|
|
134
|
+
* errors to the underlying system, especially those that result in some unavailable Event fields,
|
|
135
|
+
* the quality shall be BadNoCommunication error.
|
|
136
|
+
*
|
|
137
|
+
* Quality refers to the quality of the data value(s) upon which this Condition is based. Since a
|
|
138
|
+
* Condition is usually based on one or more Variables, the Condition inherits the quality of
|
|
139
|
+
* these Variables. E.g., if the process value is “Uncertain”, the “LevelAlarm” Condition is also
|
|
140
|
+
* questionable. If more than one variable is represented by a given condition or if the condition
|
|
141
|
+
* is from an underlining system and no direct mapping to a variable is available, it is up to the
|
|
142
|
+
* application to determine what quality is displayed as part of the condition.
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* set the condition quality
|
|
147
|
+
* @method setQuality
|
|
148
|
+
* @param quality {StatusCode}
|
|
149
|
+
*/
|
|
150
|
+
setQuality(quality: StatusCode): void;
|
|
151
|
+
/**
|
|
152
|
+
* @method getQuality
|
|
153
|
+
* @return {StatusCode}
|
|
154
|
+
*/
|
|
155
|
+
getQuality(): StatusCode;
|
|
156
|
+
/*
|
|
157
|
+
* as per spec 1.0.3 - Part 9
|
|
158
|
+
* The Severity of a Condition is inherited from the base Event model defined in Part 5. It
|
|
159
|
+
* indicates the urgency of the Condition and is also commonly called ‘priority’, especially in
|
|
160
|
+
* relation to Alarms in the ProcessConditionClass.
|
|
161
|
+
*
|
|
162
|
+
* as per spec 1.0.3 - PArt 5
|
|
163
|
+
* Severity is an indication of the urgency of the Event. This is also commonly called “priority”.
|
|
164
|
+
* Values will range from 1 to 1 000, with 1 being the lowest severity and 1 000 being the highest.
|
|
165
|
+
* Typically, a severity of 1 would indicate an Event which is informational in nature, while a value
|
|
166
|
+
* of 1 000 would indicate an Event of catastrophic nature, which could potentially result in severe
|
|
167
|
+
* financial loss or loss of life.
|
|
168
|
+
* It is expected that very few Server implementations will support 1 000 distinct severity levels.
|
|
169
|
+
* Therefore, Server developers are responsible for distributing their severity levels across the
|
|
170
|
+
* 1 to 1 000 range in such a manner that clients can assume a linear distribution. For example, a
|
|
171
|
+
* client wishing to present five severity levels to a user should be able to do the following
|
|
172
|
+
* mapping:
|
|
173
|
+
* Client Severity OPC Severity
|
|
174
|
+
* HIGH 801 – 1 000
|
|
175
|
+
* MEDIUM HIGH 601 – 800
|
|
176
|
+
* MEDIUM 401 – 600
|
|
177
|
+
* MEDIUM LOW 201 – 400
|
|
178
|
+
* LOW 1 – 200
|
|
179
|
+
* In many cases a strict linear mapping of underlying source severities to the OPC Severity range
|
|
180
|
+
* is not appropriate. The Server developer will instead intelligently map the underlying source
|
|
181
|
+
* severities to the 1 to 1 000 OPC Severity range in some other fashion. In particular, it is
|
|
182
|
+
* recommended that Server developers map Events of high urgency into the OPC severity range
|
|
183
|
+
* of 667 to 1 000, Events of medium urgency into the OPC severity range of 334 to 666 and
|
|
184
|
+
* Events of low urgency into OPC severities of 1 to 333.
|
|
185
|
+
*/
|
|
186
|
+
/**
|
|
187
|
+
* @method setSeverity
|
|
188
|
+
* @param severity {UInt16}
|
|
189
|
+
*/
|
|
190
|
+
setSeverity(severity: UInt16): void;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @method getSeverity
|
|
194
|
+
* @return {UInt16}
|
|
195
|
+
*/
|
|
196
|
+
getSeverity(): UInt16;
|
|
197
|
+
|
|
198
|
+
/*
|
|
199
|
+
* as per spec 1.0.3 - part 9:
|
|
200
|
+
* LastSeverity provides the previous severity of the ConditionBranch. Initially this Variable
|
|
201
|
+
* contains a zero value; it will return a value only after a severity change. The new severity is
|
|
202
|
+
* supplied via the Severity Property which is inherited from the BaseEventType.
|
|
203
|
+
*
|
|
204
|
+
*/
|
|
205
|
+
/**
|
|
206
|
+
* @method setLastSeverity
|
|
207
|
+
* @param severity {UInt16}
|
|
208
|
+
*/
|
|
209
|
+
setLastSeverity(severity: UInt16): void;
|
|
210
|
+
/**
|
|
211
|
+
* @method getLastSeverity
|
|
212
|
+
* @return {UInt16}
|
|
213
|
+
*/
|
|
214
|
+
getLastSeverity(): UInt16;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* setReceiveTime
|
|
218
|
+
*
|
|
219
|
+
* (as per OPCUA 1.0.3 part 5)
|
|
220
|
+
*
|
|
221
|
+
* ReceiveTime provides the time the OPC UA Server received the Event from the underlying
|
|
222
|
+
* device of another Server.
|
|
223
|
+
*
|
|
224
|
+
* ReceiveTime is analogous to ServerTimestamp defined in Part 4, i.e.
|
|
225
|
+
* in the case where the OPC UA Server gets an Event from another OPC UA Server, each Server
|
|
226
|
+
* applies its own ReceiveTime. That implies that a Client may get the same Event, having the
|
|
227
|
+
* same EventId, from different Servers having different values of the ReceiveTime.
|
|
228
|
+
*
|
|
229
|
+
* The ReceiveTime shall always be returned as value and the Server is not allowed to return a
|
|
230
|
+
* StatusCode for the ReceiveTime indicating an error.
|
|
231
|
+
*
|
|
232
|
+
* @method setReceiveTime
|
|
233
|
+
* @param time {Date} : UTCTime
|
|
234
|
+
*/
|
|
235
|
+
setReceiveTime(time: UtcTime): void;
|
|
236
|
+
/**
|
|
237
|
+
* (as per OPCUA 1.0.3 part 5)
|
|
238
|
+
* Time provides the time the Event occurred. This value is set as close to the event generator as
|
|
239
|
+
* possible. It often comes from the underlying system or device. Once set, intermediate OPC UA
|
|
240
|
+
* Servers shall not alter the value.
|
|
241
|
+
*
|
|
242
|
+
* @method setTime
|
|
243
|
+
* @param time {Date}
|
|
244
|
+
*/
|
|
245
|
+
setTime(time: Date): void;
|
|
246
|
+
/**
|
|
247
|
+
* LocalTime is a structure containing the Offset and the DaylightSavingInOffset flag. The Offset
|
|
248
|
+
* specifies the time difference (in minutes) between the Time Property and the time at the location
|
|
249
|
+
* in which the event was issued. If DaylightSavingInOffset is TRUE, then Standard/Daylight
|
|
250
|
+
* savings time (DST) at the originating location is in effect and Offset includes the DST c orrection.
|
|
251
|
+
* If FALSE then the Offset does not include DST correction and DST may or may not have been
|
|
252
|
+
* in effect.
|
|
253
|
+
* @method setLocalTime
|
|
254
|
+
* @param localTime {TimeZone}
|
|
255
|
+
*/
|
|
256
|
+
setLocalTime(localTime: TimeZoneDataType): void;
|
|
257
|
+
|
|
258
|
+
// read only !
|
|
259
|
+
getSourceName(): LocalizedText;
|
|
260
|
+
/**
|
|
261
|
+
* @method getSourceNode
|
|
262
|
+
* return {NodeId}
|
|
263
|
+
*/
|
|
264
|
+
getSourceNode(): NodeId;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* @method getEventType
|
|
268
|
+
* return {NodeId}
|
|
269
|
+
*/
|
|
270
|
+
getEventType(): NodeId;
|
|
271
|
+
getMessage(): LocalizedText;
|
|
272
|
+
isCurrentBranch(): boolean;
|
|
273
|
+
// -- ACKNOWLEDGEABLE -------------------------------------------------------------------
|
|
274
|
+
|
|
275
|
+
getAckedState(): boolean;
|
|
276
|
+
setAckedState(ackedState: boolean): StatusCode;
|
|
277
|
+
getConfirmedState(): boolean;
|
|
278
|
+
|
|
279
|
+
setConfirmedStateIfExists(confirmedState: boolean): void;
|
|
280
|
+
setConfirmedState(confirmedState: boolean): void;
|
|
281
|
+
|
|
282
|
+
// ---- Shelving
|
|
283
|
+
getSuppressedState(): boolean;
|
|
284
|
+
setSuppressedState(suppressed: boolean): void;
|
|
285
|
+
|
|
286
|
+
getActiveState(): boolean;
|
|
287
|
+
|
|
288
|
+
setActiveState(newActiveState: boolean): StatusCode;
|
|
289
|
+
|
|
290
|
+
setShelvingState(): void;
|
|
291
|
+
toString(): string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* @private
|
|
295
|
+
*/
|
|
296
|
+
_constructEventData(): IEventData
|
|
297
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UAVariableT, UAVariable, IAddressSpace } from "node-opcua-address-space-base";
|
|
2
|
+
import { DataType } from "node-opcua-basic-types";
|
|
3
|
+
import { DataValue } from "node-opcua-data-value";
|
|
4
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
5
|
+
|
|
6
|
+
export interface DeviationStuff {
|
|
7
|
+
setpointNode: UAVariableT<NodeId, DataType.NodeId>;
|
|
8
|
+
setpointNodeNode: UAVariable;
|
|
9
|
+
_onSetpointDataValueChange(dataValue: DataValue): void;
|
|
10
|
+
_setStateBasedOnInputValue(value: any): void;
|
|
11
|
+
getSetpointNodeNode(): UAVariable;
|
|
12
|
+
getInputNodeValue(): any;
|
|
13
|
+
getSetpointValue(): number | null;
|
|
14
|
+
|
|
15
|
+
readonly addressSpace: IAddressSpace;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseNode } from "node-opcua-address-space-base";
|
|
2
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
3
|
+
import { InstantiateConditionOptions } from "./instantiate_condition_options";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export interface InstantiateAlarmConditionOptions extends InstantiateConditionOptions {
|
|
8
|
+
maxTimeShelved?: number;
|
|
9
|
+
inputNode: BaseNode | NodeId;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseNode, InstantiateObjectOptions, UAObject } from "node-opcua-address-space-base";
|
|
2
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
3
|
+
|
|
4
|
+
export interface InstantiateConditionOptions extends InstantiateObjectOptions {
|
|
5
|
+
conditionOf?: UAObject | BaseNode | NodeId | null;
|
|
6
|
+
conditionClass?: UAObject | BaseNode | NodeId | null;
|
|
7
|
+
conditionName?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InstallSetPointOptions } from "./install_setpoint_options";
|
|
2
|
+
import { InstantiateLimitAlarmOptions } from "./instantiate_limit_alarm_options";
|
|
3
|
+
|
|
4
|
+
export interface InstantiateExclusiveLimitAlarmOptions extends InstantiateLimitAlarmOptions, InstallSetPointOptions {}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UAVariable } from "node-opcua-address-space-base";
|
|
2
|
+
import { InstantiateAlarmConditionOptions } from "./instantiate_alarm_condition_options";
|
|
3
|
+
|
|
4
|
+
export interface InstantiateLimitAlarmOptions extends InstantiateAlarmConditionOptions {
|
|
5
|
+
highHighLimit: number;
|
|
6
|
+
highLimit: number;
|
|
7
|
+
lowLimit: number;
|
|
8
|
+
lowLowLimit: number;
|
|
9
|
+
inputNode: UAVariable;
|
|
10
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { UAMethod } from "node-opcua-address-space-base";
|
|
2
|
+
import { LocalizedTextLike, LocalizedText } from "node-opcua-data-model";
|
|
3
|
+
import { UAAcknowledgeableCondition_Base } from "node-opcua-nodeset-ua";
|
|
4
|
+
import { UATwoStateVariableEx } from "../../ua_two_state_variable_ex";
|
|
5
|
+
import { ConditionSnapshot } from "./condition_snapshot";
|
|
6
|
+
import { UAConditionEx, UAConditionHelper } from "./ua_condition_ex";
|
|
7
|
+
|
|
8
|
+
export interface UAAcknowledgeableConditionHelper {
|
|
9
|
+
autoConfirmBranch(branch: ConditionSnapshot, comment: LocalizedTextLike): void;
|
|
10
|
+
acknowledgeAndAutoConfirmBranch(branch: ConditionSnapshot, comment: string | LocalizedTextLike | LocalizedText): void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface UAAcknowledgeableConditionHelper extends UAConditionHelper {
|
|
14
|
+
///
|
|
15
|
+
on(eventName: string, eventHandler: (...args: any[]) => void): this;
|
|
16
|
+
|
|
17
|
+
on(
|
|
18
|
+
eventName: "acknowledged" | "confirmed",
|
|
19
|
+
eventHandler: (eventId: Buffer | null, comment: LocalizedText, branch: ConditionSnapshot) => void
|
|
20
|
+
): this;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
export interface UAAcknowledgeableConditionEx
|
|
25
|
+
extends UAAcknowledgeableCondition_Base,
|
|
26
|
+
UAAcknowledgeableConditionHelper,
|
|
27
|
+
UAConditionEx {
|
|
28
|
+
on(eventName: string, eventHandler: any): this;
|
|
29
|
+
|
|
30
|
+
enabledState: UATwoStateVariableEx;
|
|
31
|
+
ackedState: UATwoStateVariableEx;
|
|
32
|
+
confirmedState?: UATwoStateVariableEx;
|
|
33
|
+
acknowledge: UAMethod;
|
|
34
|
+
confirm?: UAMethod;
|
|
35
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BaseNode, UAVariable } from "node-opcua-address-space-base";
|
|
2
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
3
|
+
import { UAAlarmCondition_Base } from "node-opcua-nodeset-ua";
|
|
4
|
+
|
|
5
|
+
import { UATwoStateVariableEx } from "../../ua_two_state_variable_ex";
|
|
6
|
+
import { UAShelvedStateMachineEx } from "../state_machine/ua_shelved_state_machine_ex";
|
|
7
|
+
import { ConditionInfo } from "./condition_info_i";
|
|
8
|
+
import { UAAcknowledgeableConditionEx, UAAcknowledgeableConditionHelper } from "./ua_acknowledgeable_condition_ex";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export interface UAAlarmConditionHelper extends UAAcknowledgeableConditionHelper {
|
|
12
|
+
activateAlarm(): void;
|
|
13
|
+
deactivateAlarm(retain?: boolean): void;
|
|
14
|
+
isSuppressedOrShelved(): boolean;
|
|
15
|
+
getSuppressedOrShelved(): boolean;
|
|
16
|
+
setMaxTimeShelved(duration: number): void;
|
|
17
|
+
getMaxTimeShelved(): number;
|
|
18
|
+
getInputNodeNode(): UAVariable | null;
|
|
19
|
+
getInputNodeValue(): any | null;
|
|
20
|
+
updateState(): void;
|
|
21
|
+
getCurrentConditionInfo(): ConditionInfo;
|
|
22
|
+
|
|
23
|
+
installInputNodeMonitoring(inputNode: BaseNode | NodeId): void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface UAAlarmConditionEx extends UAAlarmConditionHelper, UAAlarmCondition_Base, UAAcknowledgeableConditionEx {
|
|
27
|
+
on(eventName: string, eventHandler: any): this;
|
|
28
|
+
|
|
29
|
+
enabledState: UATwoStateVariableEx;
|
|
30
|
+
activeState: UATwoStateVariableEx;
|
|
31
|
+
ackedState: UATwoStateVariableEx;
|
|
32
|
+
confirmedState?: UATwoStateVariableEx;
|
|
33
|
+
|
|
34
|
+
suppressedState?: UATwoStateVariableEx;
|
|
35
|
+
|
|
36
|
+
outOfServiceState?: UATwoStateVariableEx;
|
|
37
|
+
shelvingState?: UAShelvedStateMachineEx;
|
|
38
|
+
silenceState?: UATwoStateVariableEx;
|
|
39
|
+
latchedState?: UATwoStateVariableEx;
|
|
40
|
+
}
|
|
41
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DateTime } from "node-opcua-basic-types";
|
|
2
|
+
import { Certificate } from "node-opcua-crypto";
|
|
3
|
+
import { UACertificateExpirationAlarm_Base } from "node-opcua-nodeset-ua";
|
|
4
|
+
import { UATwoStateVariableEx } from "../../ua_two_state_variable_ex";
|
|
5
|
+
import { UAAcknowledgeableConditionEx, UAAcknowledgeableConditionHelper } from "./ua_acknowledgeable_condition_ex";
|
|
6
|
+
|
|
7
|
+
export interface UACertificateExpirationAlarmEx
|
|
8
|
+
extends Omit<
|
|
9
|
+
UACertificateExpirationAlarm_Base,
|
|
10
|
+
| "ackedState"
|
|
11
|
+
| "activeState"
|
|
12
|
+
| "confirmedState"
|
|
13
|
+
| "enabledState"
|
|
14
|
+
| "latchedState"
|
|
15
|
+
| "limitState"
|
|
16
|
+
| "outOfServiceState"
|
|
17
|
+
| "shelvingState"
|
|
18
|
+
| "silenceState"
|
|
19
|
+
| "suppressedState"
|
|
20
|
+
>,
|
|
21
|
+
UAAcknowledgeableConditionEx {
|
|
22
|
+
activeState: UATwoStateVariableEx;
|
|
23
|
+
suppressedState?: UATwoStateVariableEx;
|
|
24
|
+
|
|
25
|
+
getExpirationDate(): DateTime;
|
|
26
|
+
setExpirationDate(value: Date): void;
|
|
27
|
+
getExpirationLimit(): number;
|
|
28
|
+
setExpirationLimit(value: number): void;
|
|
29
|
+
setCertificate(certificate: Certificate | null): void;
|
|
30
|
+
getCertificate(): Certificate | null;
|
|
31
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { BaseNode, UAObject, UAVariable } from "node-opcua-address-space-base";
|
|
2
|
+
import { LocalizedText } from "node-opcua-data-model";
|
|
3
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
4
|
+
import { UACondition_Base } from "node-opcua-nodeset-ua";
|
|
5
|
+
import { StatusCode } from "node-opcua-status-code";
|
|
6
|
+
import { TimeZoneDataType } from "node-opcua-types";
|
|
7
|
+
import { UATwoStateVariableEx } from "../../ua_two_state_variable_ex";
|
|
8
|
+
import { ConditionInfoOptions } from "./condition_info_i";
|
|
9
|
+
import { ConditionSnapshot } from "./condition_snapshot";
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export interface UABaseEventHelper {
|
|
14
|
+
setSourceName(name: string): void;
|
|
15
|
+
setSourceNode(node: NodeId | BaseNode): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export type AddCommentEventHandler = (eventId: Buffer | null, comment: LocalizedText, branch: ConditionSnapshot) => void;
|
|
20
|
+
|
|
21
|
+
export interface UAConditionHelper {
|
|
22
|
+
on(eventName: string, eventHandler: (...args: any[]) => void): this;
|
|
23
|
+
// -- Events
|
|
24
|
+
on(eventName: "addComment", eventHandler: AddCommentEventHandler): this;
|
|
25
|
+
on(eventName: "branch_deleted", eventHandler: (branchId: string) => void): this;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface UAConditionHelper extends UABaseEventHelper {
|
|
29
|
+
getBranchCount(): number;
|
|
30
|
+
getBranches(): ConditionSnapshot[];
|
|
31
|
+
getBranchIds(): NodeId[];
|
|
32
|
+
createBranch(): ConditionSnapshot;
|
|
33
|
+
deleteBranch(branch: ConditionSnapshot): void;
|
|
34
|
+
getEnabledState(): boolean;
|
|
35
|
+
getEnabledStateAsString(): string;
|
|
36
|
+
setEnabledState(requestedEnabledState: boolean): StatusCode;
|
|
37
|
+
setReceiveTime(time: Date): void;
|
|
38
|
+
setLocalTime(time: TimeZoneDataType): void;
|
|
39
|
+
setTime(time: Date): void;
|
|
40
|
+
conditionOfNode(): UAObject | UAVariable | null;
|
|
41
|
+
raiseConditionEvent(branch: ConditionSnapshot, renewEventId: boolean): void;
|
|
42
|
+
raiseNewCondition(conditionInfo: ConditionInfoOptions): void;
|
|
43
|
+
raiseNewBranchState(branch: ConditionSnapshot): void;
|
|
44
|
+
currentBranch(): ConditionSnapshot;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface UAConditionEx extends UAObject, UACondition_Base, UAConditionHelper {
|
|
48
|
+
enabledState: UATwoStateVariableEx;
|
|
49
|
+
on(eventName: string, eventHandler: any): this;
|
|
50
|
+
//
|
|
51
|
+
// conditionClassId: UAProperty<NodeId, /*c*/DataType.NodeId>;
|
|
52
|
+
// conditionClassName: UAProperty<LocalizedText, /*c*/DataType.LocalizedText>;
|
|
53
|
+
// conditionSubClassId?: UAProperty<NodeId, /*c*/DataType.NodeId>;
|
|
54
|
+
// conditionSubClassName?: UAProperty<LocalizedText, /*c*/DataType.LocalizedText>;
|
|
55
|
+
// conditionName: UAProperty<UAString, /*c*/DataType.String>;
|
|
56
|
+
// branchId: UAProperty<NodeId, /*c*/DataType.NodeId>;
|
|
57
|
+
// retain: UAProperty<boolean, /*c*/DataType.Boolean>;
|
|
58
|
+
// quality: UAConditionVariable<StatusCode, /*c*/DataType.StatusCode>;
|
|
59
|
+
// lastSeverity: UAConditionVariable<UInt16, /*c*/DataType.UInt16>;
|
|
60
|
+
// comment: UAConditionVariable<LocalizedText, /*c*/DataType.LocalizedText>;
|
|
61
|
+
// clientUserId: UAProperty<UAString, /*c*/DataType.String>;
|
|
62
|
+
// disable: UAMethod;
|
|
63
|
+
// enable: UAMethod;
|
|
64
|
+
// addComment: UAMethod;
|
|
65
|
+
// conditionRefresh: UAMethod;
|
|
66
|
+
// conditionRefresh2: UAMethod;
|
|
67
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { UADiscreteAlarm_Base } from "node-opcua-nodeset-ua";
|
|
2
|
+
import { UAAlarmConditionEx, UAAlarmConditionHelper } from "./ua_alarm_condition_ex";
|
|
3
|
+
|
|
4
|
+
export interface UADiscreteAlarmHelper extends UAAlarmConditionHelper {
|
|
5
|
+
on(eventName: string, eventHandle: any): this;
|
|
6
|
+
}
|
|
7
|
+
export interface UADiscreteAlarmEx
|
|
8
|
+
extends UAAlarmConditionEx,
|
|
9
|
+
Omit<
|
|
10
|
+
UADiscreteAlarm_Base,
|
|
11
|
+
| "suppressedState"
|
|
12
|
+
| "silenceState"
|
|
13
|
+
| "shelvingState"
|
|
14
|
+
| "outOfServiceState"
|
|
15
|
+
| "latchedState"
|
|
16
|
+
| "confirmedState"
|
|
17
|
+
| "ackedState"
|
|
18
|
+
| "comfirmedState"
|
|
19
|
+
| "activeState"
|
|
20
|
+
| "enabledState"
|
|
21
|
+
>,
|
|
22
|
+
UADiscreteAlarmHelper {}
|
|
23
|
+
/*=
|
|
24
|
+
* +----------------------+
|
|
25
|
+
* | UAAlarmCondition |
|
|
26
|
+
* +----------------------+
|
|
27
|
+
* ^
|
|
28
|
+
* |
|
|
29
|
+
* +--------+---------+
|
|
30
|
+
* | UADiscreteAlarm |
|
|
31
|
+
* +------------------+
|
|
32
|
+
* ^
|
|
33
|
+
* |
|
|
34
|
+
* +--------+---------+
|
|
35
|
+
* | UAOffNormalAlarm |
|
|
36
|
+
* +------------------+
|
|
37
|
+
* ^
|
|
38
|
+
* |
|
|
39
|
+
* +--------+---------+
|
|
40
|
+
* | UATripAlarm |
|
|
41
|
+
* +------------------+
|
|
42
|
+
*
|
|
43
|
+
*
|
|
44
|
+
*
|
|
45
|
+
*/
|