refactoring - c_ext stripped first stage
authorEdouard Tisserant
Sat, 12 May 2012 12:11:42 +0200
changeset 729 25054c592dc4
parent 728 e0424e96e3fd
child 730 4480b7da6bea
refactoring - c_ext stripped first stage
c_ext/c_ext.py
features.py
tests/python/beremiz.xml
tests/python/plc.xml
--- 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 = """<?xml version="1.0" encoding="ISO-8859-1" ?>
     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <xsd:element name="CExtension">
@@ -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
-
-
--- 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')]
--- 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 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<BeremizRoot URI_location="LOCAL://" Enable_SVGUILibrary="false">
+<BeremizRoot URI_location="LOCAL://">
   <TargetType/>
 </BeremizRoot>
--- 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"/>
   <contentHeader name="Beremiz Python Support Tests"
-                 modificationDateTime="2012-05-12T10:42:17">
+                 modificationDateTime="2012-05-12T11:55:53">
     <coordinateInfo>
       <pageSize x="1024" y="1024"/>
       <fbd>