61 from plcopen.structures import IEC_KEYWORDS |
61 from plcopen.structures import IEC_KEYWORDS |
62 from plcopen.types_enums import ComputeConfigurationResourceName, ITEM_CONFNODE |
62 from plcopen.types_enums import ComputeConfigurationResourceName, ITEM_CONFNODE |
63 import targets |
63 import targets |
64 from runtime.typemapping import DebugTypesSize, UnpackDebugBuffer |
64 from runtime.typemapping import DebugTypesSize, UnpackDebugBuffer |
65 from runtime import PlcStatus |
65 from runtime import PlcStatus |
66 from ConfigTreeNode import ConfigTreeNode, XSDSchemaErrorMessage, UserAddressedException |
66 from ConfigTreeNode import ConfigTreeNode, XSDSchemaErrorMessage |
|
67 from POULibrary import UserAddressedException |
67 |
68 |
68 base_folder = paths.AbsParentDir(__file__) |
69 base_folder = paths.AbsParentDir(__file__) |
69 |
70 |
70 MATIEC_ERROR_MODEL = re.compile( |
71 MATIEC_ERROR_MODEL = re.compile( |
71 r".*\.st:(\d+)-(\d+)\.\.(\d+)-(\d+): (?:error)|(?:warning) : (.*)$") |
72 r".*\.st:(\d+)-(\d+)\.\.(\d+)-(\d+): (?:error)|(?:warning) : (.*)$") |
1439 "_Connect": False, |
1440 "_Connect": False, |
1440 "_Disconnect": True}, |
1441 "_Disconnect": True}, |
1441 PlcStatus.Stopped: {"_Run": True, |
1442 PlcStatus.Stopped: {"_Run": True, |
1442 "_Transfer": True, |
1443 "_Transfer": True, |
1443 "_Connect": False, |
1444 "_Connect": False, |
1444 "_Disconnect": True}, |
1445 "_Disconnect": True, |
|
1446 "_Repair": True}, |
1445 PlcStatus.Empty: {"_Transfer": True, |
1447 PlcStatus.Empty: {"_Transfer": True, |
1446 "_Connect": False, |
1448 "_Connect": False, |
1447 "_Disconnect": True}, |
1449 "_Disconnect": True}, |
1448 PlcStatus.Broken: {"_Connect": False, |
1450 PlcStatus.Broken: {"_Connect": False, |
1449 "_Repair": True, |
1451 "_Repair": True, |
1976 "tooltip": _("Transfer PLC"), |
1978 "tooltip": _("Transfer PLC"), |
1977 "method": "_Transfer", |
1979 "method": "_Transfer", |
1978 "shown": False, |
1980 "shown": False, |
1979 }, |
1981 }, |
1980 { |
1982 { |
|
1983 "bitmap": "Disconnect", |
|
1984 "name": _("Disconnect"), |
|
1985 "tooltip": _("Disconnect from PLC"), |
|
1986 "method": "_Disconnect", |
|
1987 "shown": False, |
|
1988 }, |
|
1989 { |
1981 "bitmap": "Repair", |
1990 "bitmap": "Repair", |
1982 "name": _("Repair"), |
1991 "name": _("Repair"), |
1983 "tooltip": _("Repair broken PLC"), |
1992 "tooltip": _("Repair broken PLC"), |
1984 "method": "_Repair", |
1993 "method": "_Repair", |
1985 "shown": False, |
|
1986 }, |
|
1987 { |
|
1988 "bitmap": "Disconnect", |
|
1989 "name": _("Disconnect"), |
|
1990 "tooltip": _("Disconnect from PLC"), |
|
1991 "method": "_Disconnect", |
|
1992 "shown": False, |
1994 "shown": False, |
1993 }, |
1995 }, |
1994 { |
1996 { |
1995 "bitmap": "IDManager", |
1997 "bitmap": "IDManager", |
1996 "name": _("ID Manager"), |
1998 "name": _("ID Manager"), |