--- a/PLCControler.py Wed Aug 16 12:53:23 2017 +0300
+++ b/PLCControler.py Wed Aug 16 12:57:52 2017 +0300
@@ -155,9 +155,11 @@
class _VariableInfos(object):
__slots__ = ["Name", "Class", "Option", "Location", "InitialValue",
"Edit", "Documentation", "Type", "Tree", "Number"]
def __init__(self, *args):
for attr, value in zip(self.__slots__, args):
setattr(self, attr, value if value is not None else "")
return _VariableInfos(*[getattr(self, attr) for attr in self.__slots__])
@@ -226,9 +228,11 @@
class _VariablesTreeItemInfos(object):
__slots__ = ["name", "var_class", "type", "edit", "debug", "variables"]
def __init__(self, *args):
for attr, value in zip(self.__slots__, args):
setattr(self, attr, value if value is not None else "")
return _VariableTreeItem(*[getattr(self, attr) for attr in self.__slots__])
@@ -372,9 +376,11 @@
class _ActionInfos(object):
__slots__ = ["qualifier", "type", "value", "duration", "indicator"]
def __init__(self, *args):
for attr, value in zip(self.__slots__, args):
setattr(self, attr, value if value is not None else "")
return _ActionInfos(*[getattr(self, attr) for attr in self.__slots__])
--- a/ProjectController.py Wed Aug 16 12:53:23 2017 +0300
+++ b/ProjectController.py Wed Aug 16 12:57:52 2017 +0300
@@ -1180,18 +1180,22 @@
self.AppFrame.ShowError(infos, start, end)
self._OpenView("IEC code")
def _editIECrawcode(self):
self._OpenView("IEC raw code")
def _OpenProjectFiles(self):
self._OpenView("Project Files")
def _OpenFileEditor(self, filepath):
--- a/canfestival/canfestival.py Wed Aug 16 12:53:23 2017 +0300
+++ b/canfestival/canfestival.py Wed Aug 16 12:57:52 2017 +0300
@@ -365,6 +365,7 @@
_GeneratedMasterView = None
def _ShowGeneratedMaster(self):
self._OpenView("Generated master")
@@ -482,6 +483,7 @@
CTNChildrenTypes = [("CanOpenNode", _NodeListCTN, "CanOpen Master"),
("CanOpenSlave", _SlaveCTN, "CanOpen Slave")]
def GetParamsAttributes(self, path=None):
infos = ConfigTreeNode.GetParamsAttributes(self, path=path)
--- a/plcopen/plcopen.py Wed Aug 16 12:53:23 2017 +0300
+++ b/plcopen/plcopen.py Wed Aug 16 12:57:52 2017 +0300
@@ -435,6 +435,7 @@
datatypes_xpath = PLCOpen_XPath("ppx:types/ppx:dataTypes/ppx:dataType")
filtered_datatypes_xpath = PLCOpen_XPath(
"ppx:types/ppx:dataTypes/ppx:dataType[@name!=$exclude]")
def getdataTypes(self, exclude=None):
return filtered_datatypes_xpath(self, exclude=exclude)
@@ -483,12 +484,14 @@
configurations_xpath = PLCOpen_XPath(
"ppx:instances/ppx:configurations/ppx:configuration")
def getconfigurations(self):
return configurations_xpath(self)
setattr(cls, "getconfigurations", getconfigurations)
configuration_xpath = PLCOpen_XPath(
"ppx:instances/ppx:configurations/ppx:configuration[@name=$name]")
def getconfiguration(self, name):
configurations = configuration_xpath(self, name=name)
if len(configurations) == 1:
@@ -513,6 +516,7 @@
resources_xpath = PLCOpen_XPath(
"ppx:instances/ppx:configurations/ppx:configuration[@name=$configname]/ppx:resource[@name=$name]")
def getconfigurationResource(self, config_name, name):
resources = resources_xpath(self, configname=config_name, name=name)
@@ -578,6 +582,7 @@
enumerated_values_xpath = PLCOpen_XPath(
"ppx:types/ppx:dataTypes/ppx:dataType/ppx:baseType/ppx:enum/ppx:values/ppx:value")
def GetEnumeratedDataTypeValues(self):
return [value.getname() for value in enumerated_values_xpath(self)]
setattr(cls, "GetEnumeratedDataTypeValues", GetEnumeratedDataTypeValues)
@@ -1070,6 +1075,7 @@
setattr(cls, "updateElementName", updateElementName)
enumerated_datatype_values_xpath = PLCOpen_XPath("ppx:values/ppx:value")
def Search(self, criteria, parent_infos=[]):
for i, value in enumerate(enumerated_datatype_values_xpath(self)):
@@ -1094,6 +1100,7 @@
"ppx:interface/*[self::ppx:inputVars or self::ppx:inOutVars]/ppx:variable")
block_outputs_xpath = PLCOpen_XPath(
"ppx:interface/*[self::ppx:outputVars or self::ppx:inOutVars]/ppx:variable")
@@ -1626,6 +1633,7 @@
cls.currentExecutionOrderId = 0
cls.checkedBlocksDict = {}
def resetcurrentExecutionOrderId(self):
object.__setattr__(self, "currentExecutionOrderId", 0)
setattr(cls, "resetcurrentExecutionOrderId", resetcurrentExecutionOrderId)
@@ -1717,6 +1725,7 @@
instance_by_id_xpath = PLCOpen_XPath("*[@localId=$localId]")
instance_by_name_xpath = PLCOpen_XPath("ppx:block[@instanceName=$name]")
def getcontentInstance(self, local_id):
if self.content.getLocalTag() in ["LD", "FBD", "SFC"]:
instance = instance_by_id_xpath(self.content, localId=local_id)
@@ -2413,6 +2422,7 @@
connection_xpath = PLCOpen_XPath("ppx:connection")
connection_by_position_xpath = PLCOpen_XPath("ppx:connection[position()=$pos]")
def getconnections(self):
return connection_xpath(self)
setattr(cls, "getconnections", getconnections)
--- a/runtime/WampClient.py Wed Aug 16 12:53:23 2017 +0300
+++ b/runtime/WampClient.py Wed Aug 16 12:57:52 2017 +0300
@@ -88,6 +88,7 @@
def clientConnectionFailed(self, connector, reason):
print("WAMP Client connection failed .. retrying ..")
def clientConnectionLost(self, connector, reason):
print("WAMP Client connection lost .. retrying ..")
--- a/svgui/pyjs/jsonrpc/jsonrpc.py Wed Aug 16 12:53:23 2017 +0300
+++ b/svgui/pyjs/jsonrpc/jsonrpc.py Wed Aug 16 12:57:52 2017 +0300
@@ -11,6 +11,7 @@
def response(self, id, result):
return simplejson.dumps({'version': '1.1', 'id': id,
'result': result, 'error': None})
def error(self, id, code, message):
return simplejson.dumps({'id': id,
--- a/targets/Linux/__init__.py Wed Aug 16 12:53:23 2017 +0300
+++ b/targets/Linux/__init__.py Wed Aug 16 12:57:52 2017 +0300
@@ -28,7 +28,9 @@
class Linux_target(toolchain_gcc):
def getBuilderCFLAGS(self):
return toolchain_gcc.getBuilderCFLAGS(self) + ["-fPIC"]
def getBuilderLDFLAGS(self):
return toolchain_gcc.getBuilderLDFLAGS(self) + ["-shared", "-lrt"]