-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Messages property of the DBC class to Dictionary #14
Comments
Sounds interesting. I din't use Dictionary in C# yet, so if you are willing to help I would be more than happy |
I guess this also somewhat ties into issue #15 making message a dictionary would help in solving this issue as well. |
@EFeru For the messages and the nodes you can just change Dbc properties to Dictionaries since the builder already uses a Dictionary to populate them. For the ValueTable lookup for a signal I've made a workaround in https://github.com/hakwes/DbcParser/blob/currentinternalrelease/DbcParserLib/DbcBuilder.cs#:~:text=%7D-,public%20void%20LinkTableValuesToSignal(uint%20messageId%2C%20string%20signalName%2C%20string,%7D,-private%20bool%20CheckExtID This fix also solves #13 . I attempted to put that in the ValueTableLineParser but it broke to many tests so i opted for the quickfix above. |
@hakwes Are you willing to support on converting to Dictionary? Especially the Value Tables would be really nice to have them as Dictionary. |
Sure, I'll have a go at it @EFeru |
Hi, Why I would not change Node and Message container type to
|
I fear the two things are unrelated A |
Hi @Adhara3 , thanks for your detailed answer. Is very good to have both advantages and disadvantages in our overview. |
So just to recap:
Cheers |
@Adhara3 I don't really understand your concerns about exposing the Message property as a Dictionary. The TryGet method is fine but I don't think you need to indexDbc class to implement that. |
I would like to see the Messages property of the DBC class to be set as a Dictionary to improve lookup.
Another option would be to add a Get method that would use an internal dictionary.
Another suggestions is to add the ValueTable as a dictionary as a complement to the string. That would simplify mapping values to descriptions.
The text was updated successfully, but these errors were encountered: