TOSUN-Shanghai / TSMaster

A powerful open environment for automotive bus monitoring, simulation, testing, diagnostics, calibration and so on. It supports all kinds of mainstream hardware such as TOSUN, Vector, IXXAT, PEAK, Kvaser, Intrepidcs, ZLG, CANable, CandleLight, cantact and so on. Free for research and education purpose for some features.
http://www.tosunai.cn/
GNU Lesser General Public License v2.1
276 stars 43 forks source link

[Feature] enum type handling from dbc #87

Open totocaca123 opened 1 year ago

totocaca123 commented 1 year ago

I dbc file we have enum types for signals (kind of constants). It would be good to have access to these values somewhere (importing value tables from dbc into global constants or internal data types)

freshhope commented 1 year ago

Thanks for suggestion, I will add this feature in system constants

totocaca123 commented 1 year ago

Is it possible to have a better structured constant. For example:

Type1.Value0 (or Type1_Value0) Type1.Value1

Because we can have multiple enum with value 0, and we dont know which type it is

freshhope commented 1 year ago

upg. to new version, you can control generation of constant defs.

image