equal
deleted
inserted
replaced
142 f.write("/* Header generated by Beremiz c_ext plugin */\n") |
142 f.write("/* Header generated by Beremiz c_ext plugin */\n") |
143 f.write("#include \"iec_std_lib.h\"\n") |
143 f.write("#include \"iec_std_lib.h\"\n") |
144 f.write("#define EXT_C_INIT __init_%s\n"%location_str) |
144 f.write("#define EXT_C_INIT __init_%s\n"%location_str) |
145 f.write("#define EXT_C_CLEANUP __init_%s\n"%location_str) |
145 f.write("#define EXT_C_CLEANUP __init_%s\n"%location_str) |
146 f.write("#define EXT_C_PUBLISH __init_%s\n"%location_str) |
146 f.write("#define EXT_C_PUBLISH __init_%s\n"%location_str) |
147 f.write("#define EXT_C_RETRIVE __init_%s\n"%location_str) |
147 f.write("#define EXT_C_RETRIEVE __init_%s\n"%location_str) |
148 for loc in locations: |
148 for loc in locations: |
149 f.write(loc["IEC_TYPE"]+" "+loc["NAME"]+";\n") |
149 f.write(loc["IEC_TYPE"]+" "+loc["NAME"]+";\n") |
150 f.write("/* End of header generated by Beremiz c_ext plugin */\n\n") |
150 f.write("/* End of header generated by Beremiz c_ext plugin */\n\n") |
151 src_file = open(self.CFileName(CFile),'r') |
151 src_file = open(self.CFileName(CFile),'r') |
152 f.write(src_file.read()) |
152 f.write(src_file.read()) |