eclipse / kuksa.val.feeders

kuksa.val.feeders
Apache License 2.0
8 stars 22 forks source link

Bugfix Mapper not iterable #114

Closed mikehaller closed 1 year ago

mikehaller commented 1 year ago

j1939reader is using the Mapper as a Iterable, but the functions were missing:

The fix makes the Mapper iterable, same change as in vss2ddsmapper.py (see https://github.com/eclipse/kuksa.val.feeders/blob/main/dds2val/ddsproviderlib/vss2ddsmapper.py#L117)

2023-06-30 06:36:56,452 WARNING dbcfeederlib.j1939reader: Error decoding message [PGN: CCVS]
Traceback (most recent call last):
  File "/workspaces/leda-example-applications-fork/canbus-j1939/kuksa.val.feeders/dbc2val/dbcfeederlib/j1939reader.py", line 76, in on_message
    if k in self.mapper:
TypeError: argument of type 'Mapper' is not iterable
erikbosch commented 1 year ago

This is likely a regression from a refactoring, unfortunately we do not have any "public" J1939 test files (dump) that can be run as part of regression tests.

This works, an alternative solution would be to useself.mapper.get_dbc2val_mappings(k) like in dbcreader.py