ni / nixnet-python

NI-XNET Python API
https://nixnet.readthedocs.io/en/latest/
MIT License
25 stars 22 forks source link

Should values of DBC value tables be integers? #229

Closed d-bohls closed 6 years ago

d-bohls commented 6 years ago

Currently, we treat the values of DBC value tables as strings. We have some evidence that they may be restricted to ints. We should verify whether or not the values are always of type integer.

jashnani commented 6 years ago

We tested this by hardcoding a signal value table in DBC file where values were of type string and float. In both cases, the driver seems to be converting them to an int and returning it back as a string.

Also, we noticed that if a DBC signal value table has an odd number of items, the driver ignores the last item and returns the rest; giving you an even item list for creating key-value pairings.

d-bohls commented 6 years ago

I discussed this with Waldemar M. He said if a DBC contains a signal value in the DBC signal value table that is not an integer, then that DBC is not a "well formed" file as defined by Vector.

Thus, we can expect that signal values in DBC signal value tables are always integers.