equal
deleted
inserted
replaced
18 XSD = """<?xml version="1.0" encoding="ISO-8859-1" ?> |
18 XSD = """<?xml version="1.0" encoding="ISO-8859-1" ?> |
19 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
19 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
20 <xsd:element name="CanFestivalNode"> |
20 <xsd:element name="CanFestivalNode"> |
21 <xsd:complexType> |
21 <xsd:complexType> |
22 <xsd:attribute name="CAN_Device" type="xsd:string" use="required" /> |
22 <xsd:attribute name="CAN_Device" type="xsd:string" use="required" /> |
|
23 <xsd:attribute name="Sync_TPDOs" type="xsd:boolean" use="required" default="true"/> |
23 </xsd:complexType> |
24 </xsd:complexType> |
24 </xsd:element> |
25 </xsd:element> |
25 </xsd:schema> |
26 </xsd:schema> |
26 """ |
27 """ |
27 |
28 |
74 current_location = self.GetCurrentLocation() |
75 current_location = self.GetCurrentLocation() |
75 # define a unique name for the generated C file |
76 # define a unique name for the generated C file |
76 prefix = "_".join(map(lambda x:str(x), current_location)) |
77 prefix = "_".join(map(lambda x:str(x), current_location)) |
77 Gen_OD_path = os.path.join(buildpath, prefix + "_OD.c" ) |
78 Gen_OD_path = os.path.join(buildpath, prefix + "_OD.c" ) |
78 # Create a new copy of the model with DCF loaded with PDO mappings for desired location |
79 # Create a new copy of the model with DCF loaded with PDO mappings for desired location |
79 master = config_utils.GenerateConciseDCF(locations, current_location, self) |
80 master = config_utils.GenerateConciseDCF(locations, current_location, self, self.CanFestivalNode.getSync_TPDOs()) |
80 res = gen_cfile.GenerateFile(Gen_OD_path, master) |
81 res = gen_cfile.GenerateFile(Gen_OD_path, master) |
81 if res : |
82 if res : |
82 raise Exception, res |
83 raise Exception, res |
83 |
84 |
84 return [(Gen_OD_path,"")],"" |
85 return [(Gen_OD_path,"")],"" |