diff -r 0ae5a15efa18 -r fdc12f7d27c8 svghmi/hmi_tree.ysl2 --- a/svghmi/hmi_tree.ysl2 Tue Nov 30 18:43:10 2021 +0100 +++ b/svghmi/hmi_tree.ysl2 Sun Jan 16 17:00:58 2022 +0100 @@ -1,5 +1,7 @@ // hmi_tree.ysl2 +// Location identifies uniquely SVGHMI instance +param "instance_name"; // HMI Tree computed from VARIABLES.CSV in svghmi.py const "hmitree", "ns:GetHMITree()"; @@ -19,20 +21,28 @@ | | var heartbeat_index = «$indexed_hmitree/*[@hmipath = '/HEARTBEAT']/@index»; | + | var current_page_var_index = «$indexed_hmitree/*[@hmipath = concat('/CURRENT_PAGE_', $instance_name)]/@index»; + | | var hmitree_types = [ foreach "$indexed_hmitree/*" - | /* «@index» */ "«substring(local-name(), 5)»"`if "position()!=last()" > ,` + | "«substring(local-name(), 5)»"`if "position()!=last()" > ,` | ]; | | var hmitree_paths = [ foreach "$indexed_hmitree/*" - | /* «@index» */ "«@hmipath»"`if "position()!=last()" > ,` + | "«@hmipath»"`if "position()!=last()" > ,` | ]; | + | var hmitree_nodes = { + + foreach "$indexed_hmitree/*[local-name() = 'HMI_NODE']" + | "«@hmipath»" : [«@index», "«@class»"]`if "position()!=last()" > ,` + | }; + | } template "*", mode="index" {