--- a/plugger.py Tue Aug 28 07:57:36 2007 +0200
+++ b/plugger.py Tue Aug 28 15:00:52 2007 +0200
@@ -238,12 +238,12 @@
if os.path.isdir(_self.PlugPath(PlugName)) and os.path.isfile(_self.PluginXmlFilePath(PlugName)):
#Load the plugin.xml file into parameters members
+ # Check that IEC_Channel is not already in use. + self.FindNewIEC_Channel(self.BaseParams.getIEC_Channel()) # Call the plugin real __init__
PlugClass.__init__(_self)
#Load and init all the childs
- # Check that IEC_Channel is not already in use.
- self.FindNewIEC_Channel(self.BaseParams.getIEC_Channel())
# If plugin do not have corresponding file/dirs - they will be created on Save
--- a/plugins/canfestival/canfestival.py Tue Aug 28 07:57:36 2007 +0200
+++ b/plugins/canfestival/canfestival.py Tue Aug 28 15:00:52 2007 +0200
@@ -48,21 +48,22 @@
- def Generate_C(self, dirpath, locations):
+ def PlugGenerate_C(self, buildpath, current_location, locations): - return C code for network dictionnary
+ @param current_location: Tupple containing plugin IEC location : %I0.0.4.5 => (0,0,4,5) + @param locations: List of complete variables locations \ + [(IEC_loc, IEC_Direction IEC_Type, Name)]\ + ex: [((0,0,4,5),'I','X','__IX_0_0_4_5'),...] - filepath = os.path.join(dirpath, "master.c")
- master = config_utils.GenerateConciseDCF(locations, self)
- res = gen_cfile.GenerateFile(filepath, master)
- s = str(self.BaseParams.BusId)+"_IN(){}\n"
- s += "CanOpen(\""+self.CanFestivalNode.CAN_Device+"\")"
- f = file(filepath, 'a')
- return {"headers":["master.h"],"sources":["master.c"]}
+ prefix = "_".join(map(lambda x:str(x), current_location)) + Gen_OD_path = os.path.join(buildpath, prefix + "_OD.c" ) + master = config_utils.GenerateConciseDCF(locations, current_location, self) + res = gen_cfile.GenerateFile(Gen_OD_path, master) + return [(Gen_OD_path,CanFestival_OD_CFLAGS)],"" XSD = """<?xml version="1.0" encoding="ISO-8859-1" ?>
@@ -77,12 +78,18 @@
PlugChildsTypes = [("CanOpenNode",_NodeListPlug)]
- def Generate_C(self, filepath, locations):
+ def PlugGenerate_C(self, buildpath, current_location, locations): - return C code for network dictionnary
+ @param current_location: Tupple containing plugin IEC location : %I0.0.4.5 => (0,0,4,5) + @param locations: List of complete variables locations \ + [(IEC_loc, IEC_Direction IEC_Type, Name)]\ + ex: [((0,0,4,5),'I','X','__IX_0_0_4_5'),...] + prefix = "_".join(map(lambda x:str(x), current_location)) + Gen_OD_path = os.path.join(buildpath, prefix + "_OD.c" ) master = config_utils.GenerateConciseDCF(locations, self)
- res = gen_cfile.GenerateFile(filepath, master)
+ res = gen_cfile.GenerateFile(Gen_OD_path, master) s = str(self.BaseParams.BusId)+"_IN(){}\n"
s += "CanOpen(str(\""+self.CanFestivalNode.CAN_Device+"\")"
@@ -90,4 +97,7 @@