# HG changeset patch # User Edouard Tisserant # Date 1336817502 -7200 # Node ID 25054c592dc40dd2be18f943e2aaa9026f3d67eb # Parent e0424e96e3fd654c29517a0a6601840d1ac731e3 refactoring - c_ext stripped first stage diff -r e0424e96e3fd -r 25054c592dc4 c_ext/c_ext.py --- a/c_ext/c_ext.py Sat May 12 11:21:10 2012 +0200 +++ b/c_ext/c_ext.py Sat May 12 12:11:42 2012 +0200 @@ -1,13 +1,11 @@ -import wx import os from xml.dom import minidom import cPickle from xmlclass import * -from ConfigTreeNode import ConfigTreeNode, opjimg from CFileEditor import CFileEditor -from PLCControler import PLCControler, UndoBuffer, LOCATION_CONFNODE, LOCATION_MODULE, LOCATION_GROUP, LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT, LOCATION_VAR_MEMORY +from PLCControler import UndoBuffer, LOCATION_CONFNODE, LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT CFileClasses = GenerateClassesFromXSD(os.path.join(os.path.dirname(__file__), "cext_xsd.xsd")) @@ -15,7 +13,7 @@ "USINT" : "B", "UINT" : "W", "UDINT" : "D", "ULINT" : "L", "REAL" : "D", "LREAL" : "L", "STRING" : "B", "BYTE" : "B", "WORD" : "W", "DWORD" : "D", "LWORD" : "L", "WSTRING" : "W"} -class _Cfile: +class CFile: XSD = """ @@ -305,11 +303,3 @@ last = self.CFileBuffer.IsLast() return not first, not last -class RootClass: - - CTNChildrenTypes = [("C_File",_Cfile, "C file")] - - def CTNGenerate_C(self, buildpath, locations): - return [],"",False - - diff -r e0424e96e3fd -r 25054c592dc4 features.py --- a/features.py Sat May 12 11:21:10 2012 +0200 +++ b/features.py Sat May 12 12:11:42 2012 +0200 @@ -3,7 +3,7 @@ catalog = [ ('canfestival', _('CANopen support'), _('Map located variables over CANopen'), 'canfestival.canfestival.RootClass'), - ('c_ext', _('C extention'), _('Add C code accessing located variables synchronously'), 'c_ext.c_ext.RootClass'), + ('c_ext', _('C extention'), _('Add C code accessing located variables synchronously'), 'c_ext.CFile'), ('py_ext', _('Python file'), _('Add Python code executed asynchronously'), 'py_ext.PythonFile'), ('wxglade_hmi', _('WxGlade GUI'), _('Add a simple WxGlade based GUI.'), 'wxglade_hmi.WxGladeHMI'), ('svgui', _('SVGUI'), _('Experimental web based HMI'), 'svgui.SVGUI')] diff -r e0424e96e3fd -r 25054c592dc4 tests/python/beremiz.xml --- a/tests/python/beremiz.xml Sat May 12 11:21:10 2012 +0200 +++ b/tests/python/beremiz.xml Sat May 12 12:11:42 2012 +0200 @@ -1,4 +1,4 @@ - + diff -r e0424e96e3fd -r 25054c592dc4 tests/python/plc.xml --- a/tests/python/plc.xml Sat May 12 11:21:10 2012 +0200 +++ b/tests/python/plc.xml Sat May 12 12:11:42 2012 +0200 @@ -8,7 +8,7 @@ productVersion="0.0" creationDateTime="2008-12-14T16:21:19"/> + modificationDateTime="2012-05-12T11:55:53">