@@ -101,7 +101,7 @@ def dump(db, f, **options):
101
101
cluster .set ('ID' , 'canCluster1' )
102
102
create_short_name_desc (cluster , "clusterShort" , "clusterDesc" )
103
103
create_sub_element_fx (cluster , "SPEED" , "500" )
104
- create_sub_element_fx (cluster , "IS-HIGH-LOW-BIT-ORDER" , "false " )
104
+ create_sub_element_fx (cluster , "IS-HIGH-LOW-BIT-ORDER" , "true " )
105
105
create_sub_element_fx (cluster , "BIT-COUNTING-POLICY" , "MONOTONE" )
106
106
protocol = create_sub_element_fx (cluster , "PROTOCOL" , "CAN" )
107
107
protocol .attrib ['{{{pre}}}type' .format (pre = xsi )] = "can:PROTOCOL-TYPE"
@@ -117,6 +117,7 @@ def dump(db, f, **options):
117
117
channels = create_sub_element_fx (elements , "CHANNELS" )
118
118
channel = create_sub_element_fx (channels , "CHANNEL" )
119
119
# for each channel
120
+ channel .set ('ID' , 'CANCHANNEL01' )
120
121
create_short_name_desc (channel , "CANCHANNEL01" , "Can Channel Description" )
121
122
122
123
# for pdu triggerings
@@ -156,10 +157,19 @@ def dump(db, f, **options):
156
157
function_refs = create_sub_element_fx (ecu , "FUNCTION-REFS" )
157
158
func_ref = create_sub_element_fx (function_refs , "FUNCTION-REF" )
158
159
func_ref .set ("ID-REF" , "FCT_" + bu .name )
159
-
160
+
161
+ controllers = create_sub_element_fx (ecu , "CONTROLLERS" )
162
+ controller = create_sub_element_fx (controllers , "CONTROLLER" )
163
+ create_short_name_desc (controller , bu .name , bu .comment )
164
+ controller .set ('ID' , 'Controller_' + bu .name )
165
+
160
166
connectors = create_sub_element_fx (ecu , "CONNECTORS" )
161
167
connector = create_sub_element_fx (connectors , "CONNECTOR" )
162
-
168
+ connector .set ('ID' , 'Connector' + bu .name )
169
+ channel_ref = create_sub_element_fx (connector , "CHANNEL-REF" )
170
+ channel_ref .set ("ID-REF" , "CANCHANNEL01" )
171
+ controller_ref = create_sub_element_fx (connector , "CONTROLLER-REF" )
172
+ controller_ref .set ("ID-REF" , 'Controller_' + bu .name )
163
173
inputs = create_sub_element_fx (connector , "INPUTS" )
164
174
for frame in db .frames :
165
175
if bu .name in frame .receivers :
@@ -169,6 +179,7 @@ def dump(db, f, **options):
169
179
# Reference to PDUs
170
180
included_pdus = create_sub_element_fx (input_port , "INCLUDED-PDUS" )
171
181
included_pdu = create_sub_element_fx (included_pdus , "INCLUDED-PDU" )
182
+ included_pdu .set ('ID' , 'input_included_pdu_' + frame .name )
172
183
pdu_triggering_ref = create_sub_element_fx (included_pdu , "PDU-TRIGGERING-REF" )
173
184
pdu_triggering_ref .set ("ID-REF" , "PDU_" + frame .name )
174
185
@@ -182,6 +193,7 @@ def dump(db, f, **options):
182
193
# Reference to PDUs
183
194
included_pdus = create_sub_element_fx (input_port , "INCLUDED-PDUS" )
184
195
included_pdu = create_sub_element_fx (included_pdus , "INCLUDED-PDU" )
196
+ included_pdu .set ('ID' , 'output_included_pdu_' + frame .name )
185
197
pdu_triggering_ref = create_sub_element_fx (included_pdu , "PDU-TRIGGERING-REF" )
186
198
pdu_triggering_ref .set ("ID-REF" , "PDU_" + frame .name )
187
199
0 commit comments