Skip to content

Commit

Permalink
Hotfix_ARXML_Ethernet_Decode_Transmitters_Receivers (#828)
Browse files Browse the repository at this point in the history
  • Loading branch information
xRowe authored Jan 2, 2025
1 parent 44d3121 commit 9a70a85
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/canmatrix/formats/arxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1960,18 +1960,20 @@ def decode_ethernet_helper(ea, float_factory):
try:
target_frame.header_id = int(pdu_triggering_header_id_map[ipdu_triggering], 0)
except:
target_frame.header_id = 0
# continue

pass

# In Case Neither transmitter Nor receiver
if comm_direction.text == "OUT":
target_frame.add_transmitter(ecu.name)
else:
elif comm_direction.text == "IN":
target_frame.add_receiver(ecu.name)
else:
pass

pdu_sig_mapping = ea.findall("I-SIGNAL-TO-I-PDU-MAPPING", ipdu)

get_signals(pdu_sig_mapping, target_frame, ea, None, float_factory)
target_frame.update_receiver()
# target_frame.update_receiver() # It will make transmitter and receiver worse
db.add_frame(target_frame)

return found_matrixes
Expand Down Expand Up @@ -2089,10 +2091,14 @@ def decode_can_helper(ea, float_factory, ignore_cluster_info):
else:
ecu = process_ecu(ecu_elem, ea)
nodes[ecu_elem] = ecu

# In Case Neither transmitter Nor receiver
if comm_direction.text == "OUT":
frame.add_transmitter(ecu.name)
else:
elif comm_direction.text == "IN":
frame.add_receiver(ecu.name)
else:
pass
db.add_ecu(ecu)
db.add_frame(frame)
for frame in db.frames:
Expand Down

0 comments on commit 9a70a85

Please sign in to comment.