-
Notifications
You must be signed in to change notification settings - Fork 30
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
Custom properties and default value association #93
Comments
Hi, "User defined attributes are a means to extend the object properties of the DBC In particular: If a specific obejct could store a unique custom property this means we should have a DBC-Keyword that allows to assign a custom attribute definition to a specific object, but looking at BA_DEF_ and BA_ sintaxes:
So there is no a DBC-keyword that allows a specific object-attribute linking. I mean, the documentation is not clear about this points, these are my thoughts and reasoning about that but it's my own interpretation. |
So basically
is interpreted the following way:
This looks fine and coherent to me. See also #43 Please note that the underlying implementation on how to propagate properties to items is going to change in version 2. No change in behaviour, just implementation detail. Cheers |
Hi, okay I understand. Thank you for taking the time to explain, appreciate it. |
Implémentation wise, the current one is a bit messy especially the
The reading process will then be something like (psudocode) // Imagine we are in a message
foreach(var globalProperty in m_globalProperties[Object type.Message])
{
if(m_explicitProperties.Contains(globalProperty))
{
// The explicit wins, return it
}
else
{
// Return the global one with the default value
}
} This should help understand what's going on, be less error prone and be more efficient |
Looks good. Will be looking forward to the updates. |
Hello,
I have a question regarding
.CustomProperties
property. From what I can tell, it is meant to store custom properties individually for a message/signal/node based on names/IDs, but when printing out these values, for example:foreach (var message in dbc.Messages) { foreach (var kvp in message.CustomProperties) { var key = kvp.Key; Console.WriteLine(key); } Console.WriteLine(string.Empty); }
, I would get all of the attribute names existent in the dbc file for each message, repeatedly. It does not appear that the custom properties they store are unique to them, but just generally present in the dbc. I have checked the dbc file I am parsing, and it does not have all of these properties assigned to every message. The same problem appears with signals and nodes.I am trying to avoid opening a new issue on this because it might just be my misunderstanding. Could somebody explain please? Thank you in advance
Originally posted by @sToman967 in #91 (comment)
The text was updated successfully, but these errors were encountered: