31 from lxml import etree |
31 from lxml import etree |
32 |
32 |
33 from xmlclass import * |
33 from xmlclass import * |
34 import util.paths as paths |
34 import util.paths as paths |
35 |
35 |
36 """ |
36 |
37 Dictionary that makes the relation between var names in plcopen and displayed values |
37 #: Dictionary that makes the relation between var names |
38 """ |
38 #: in plcopen and displayed values |
|
39 |
39 VarTypes = { |
40 VarTypes = { |
40 "Local": "localVars", |
41 "Local": "localVars", |
41 "Temp": "tempVars", |
42 "Temp": "tempVars", |
42 "Input": "inputVars", |
43 "Input": "inputVars", |
43 "Output": "outputVars", |
44 "Output": "outputVars", |
51 "inputVars": "var_input", |
52 "inputVars": "var_input", |
52 "outputVars": "var_output", |
53 "outputVars": "var_output", |
53 "inOutVars": "var_inout" |
54 "inOutVars": "var_inout" |
54 } |
55 } |
55 |
56 |
56 """ |
57 |
57 Define in which order var types must be displayed |
58 #: Define in which order var types must be displayed |
58 """ |
59 |
59 VarOrder = ["Local", "Temp", "Input", "Output", "InOut", "External", "Global", "Access"] |
60 VarOrder = ["Local", "Temp", "Input", "Output", "InOut", "External", "Global", "Access"] |
60 |
61 |
61 """ |
62 |
62 Define which action qualifier must be associated with a duration |
63 #: Define which action qualifier must be associated with a duration |
63 """ |
64 |
64 QualifierList = OrderedDict([ |
65 QualifierList = OrderedDict([ |
65 ("N", False), ("R", False), ("S", False), |
66 ("N", False), |
66 ("L", True), ("D", True), ("P", False), ("P0", False), |
67 ("R", False), |
67 ("P1", False), ("SD", True), ("DS", True), ("SL", True)]) |
68 ("S", False), |
|
69 ("L", True), |
|
70 ("D", True), |
|
71 ("P", False), |
|
72 ("P0", False), |
|
73 ("P1", False), |
|
74 ("SD", True), |
|
75 ("DS", True), |
|
76 ("SL", True)]) |
68 |
77 |
69 |
78 |
70 FILTER_ADDRESS_MODEL = "(%%[IQM](?:[XBWDL])?)(%s)((?:\.[0-9]+)*)" |
79 FILTER_ADDRESS_MODEL = "(%%[IQM](?:[XBWDL])?)(%s)((?:\.[0-9]+)*)" |
71 |
80 |
72 |
81 |