Closed simoneruffini closed 3 years ago
You should use enums for that, this feature is too specific for the scope of this project.
No, because if I have two errors at the same time then I need to have every possible combination of error encoded in a specific enum. Let's say I have 8 possible errors, then I need to write 2^8 enum values to accomodate all possible outcomes and permutations.
I see. Unfortunately the scope of can cicd is not how to use the data you receive but rather make sure that you receive the correct data with the correct format, I don't see space for that in the project. As an alternative you can use the message's description to give hints on how to use a specific field.
Add a field in the network.json where constants can be defined, e.g.:
so that this constants can be used internally in the network.json and will be generated in the appropriate header-file. This constants as usual will be in the form of defines.
This is needed to encode error messages on canBUS, e.g.
When this message will arrive, the receiver can encode the error message by doing: