svghmi/hmi_tree.ysl2
changeset 3381 3a0908b0319d
parent 3221 3d307ad803ea
child 3579 c5070b6973ba
equal deleted inserted replaced
3376:83ed4ea362db 3381:3a0908b0319d
     1 // hmi_tree.ysl2
     1 // hmi_tree.ysl2
     2 
     2 
       
     3 // Location identifies uniquely SVGHMI instance
       
     4 param "instance_name";
     3 
     5 
     4 // HMI Tree computed from VARIABLES.CSV in svghmi.py
     6 // HMI Tree computed from VARIABLES.CSV in svghmi.py
     5 const "hmitree", "ns:GetHMITree()";
     7 const "hmitree", "ns:GetHMITree()";
     6 
     8 
     7 const "_categories" {
     9 const "_categories" {
    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";