Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Fix J1939Reader #140

Merged
merged 1 commit into from
Sep 12, 2023
Merged

Conversation

sophokles73
Copy link
Contributor

The reader erroneously referred to a non-existing (private) member of
the DBCReader. This has been fixed.

Also added some tests for verifying the J1939Reader's functionality.

Copy link
Contributor

@lukasmittag lukasmittag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codewise it looks good to me, but couldn't test it @erikbosch can you do it?

@@ -1,5 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<NetworkDefinition xmlns="http://kayak.2codeornot2code.org/1.0">
<!--
Copyright (c) 2023 Robert Bosch GmbH
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SebastianSchildt - for new files, do we want this form or the more generic "Copyright (c) 2023 Contributors to the Eclipse Foundation"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point 👍

the other Eclipse projects I am involved in usually take the more generic approach and let contributors add their affiliation to the NOTES.md file ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have for some time now been using the generic "Copyright (c) 2023 Contributors to the Eclipse Foundation" for all new files, as that seems to be the current best practice.
It is however currently neither enforced nor written down as a decision somewhere, we just went where the river took us.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will adapt the PR accordingly.

@erikbosch
Copy link
Contributor

Codewise it looks good to me, but couldn't test it @erikbosch can you do it?

That is part of our current problem for J1939 - we do not have any "real" (or a faked) public log file or signal definitions, so we need to rely on unit tests and on that the contributor has performed more exhaustive end-to-end testing. So we have problems doing end-to-end tests.

@sophokles73
Copy link
Contributor Author

Well, I tried to start alleviating the situation by adding some unit tests for the j1939 processing. For verifying the correctness of the code, IMHO it should make no difference if we use real SAE J1939 message/signal definitions or synthetic ones.

I agree, however, that the test suite could be a little more thorough ;-)

The reader erroneously referred to a non-existing (private) member of
the DBCReader. This has been fixed.

Also added some tests for verifying the J1939Reader's functionality.
@sophokles73
Copy link
Contributor Author

@erikbosch anything else I need to change?

@erikbosch
Copy link
Contributor

@erikbosch anything else I need to change?

No, looks good to me. I like that you add unit tests.

Concerning testing, it is true that it does not matter if it is real data or faked data, but it would be good to have a j1939 log file + message definition so that we could do a real end-to-end test as part of release testing sanity checks, similar to how we do for the regular included log file for dbcfeeder. Like start dbcfeeder in j1939 mode with a j1939 log file as input and verify that expected values actually are sent to Databroker. But that is more of a long term goal :-)

@erikbosch erikbosch merged commit b929265 into eclipse-kuksa:main Sep 12, 2023
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants