17 emit "preamble:hmi-tree" { |
19 emit "preamble:hmi-tree" { |
18 | var hmi_hash = [«$hmitree/@hash»]; |
20 | var hmi_hash = [«$hmitree/@hash»]; |
19 | |
21 | |
20 | var heartbeat_index = «$indexed_hmitree/*[@hmipath = '/HEARTBEAT']/@index»; |
22 | var heartbeat_index = «$indexed_hmitree/*[@hmipath = '/HEARTBEAT']/@index»; |
21 | |
23 | |
|
24 | var current_page_var_index = «$indexed_hmitree/*[@hmipath = concat('/CURRENT_PAGE_', $instance_name)]/@index»; |
|
25 | |
22 | var hmitree_types = [ |
26 | var hmitree_types = [ |
23 |
27 |
24 foreach "$indexed_hmitree/*" |
28 foreach "$indexed_hmitree/*" |
25 | /* «@index» */ "«substring(local-name(), 5)»"`if "position()!=last()" > ,` |
29 | "«substring(local-name(), 5)»"`if "position()!=last()" > ,` |
26 |
30 |
27 | ]; |
31 | ]; |
28 | |
32 | |
29 | var hmitree_paths = [ |
33 | var hmitree_paths = [ |
30 |
34 |
31 foreach "$indexed_hmitree/*" |
35 foreach "$indexed_hmitree/*" |
32 | /* «@index» */ "«@hmipath»"`if "position()!=last()" > ,` |
36 | "«@hmipath»"`if "position()!=last()" > ,` |
33 |
37 |
34 | ]; |
38 | ]; |
|
39 | |
|
40 | var hmitree_nodes = { |
|
41 |
|
42 foreach "$indexed_hmitree/*[local-name() = 'HMI_NODE']" |
|
43 | "«@hmipath»" : [«@index», "«@class»"]`if "position()!=last()" > ,` |
|
44 | }; |
35 | |
45 | |
36 } |
46 } |
37 |
47 |
38 template "*", mode="index" { |
48 template "*", mode="index" { |
39 param "index", "0"; |
49 param "index", "0"; |