231 current_location = self.GetCurrentLocation() |
231 current_location = self.GetCurrentLocation() |
232 # define a unique name for the generated C file |
232 # define a unique name for the generated C file |
233 prefix = "_".join(map(str, current_location)) |
233 prefix = "_".join(map(str, current_location)) |
234 Gen_OD_path = os.path.join(buildpath, "OD_%s.c"%prefix ) |
234 Gen_OD_path = os.path.join(buildpath, "OD_%s.c"%prefix ) |
235 # Create a new copy of the model with DCF loaded with PDO mappings for desired location |
235 # Create a new copy of the model with DCF loaded with PDO mappings for desired location |
236 master, pointers = config_utils.GenerateConciseDCF(locations, current_location, self, self.CanFestivalNode.getSync_TPDOs(),"OD_%s"%prefix) |
236 try: |
|
237 master, pointers = config_utils.GenerateConciseDCF(locations, current_location, self, self.CanFestivalNode.getSync_TPDOs(),"OD_%s"%prefix) |
|
238 except config_utils.PDOmappingException, e: |
|
239 raise Exception, e.message |
237 # Do generate C file. |
240 # Do generate C file. |
238 res = gen_cfile.GenerateFile(Gen_OD_path, master, pointers) |
241 res = gen_cfile.GenerateFile(Gen_OD_path, master, pointers) |
239 if res : |
242 if res : |
240 raise Exception, res |
243 raise Exception, res |
241 |
244 |