Peter Vranken - 2015-11-17

The new release of comFramework brings some new powerful features for
the code generator, which is now available in revision 1.6. The CAN interface
and the sample applications don't have been changed:

The code generator's DBC parser has been made more tolerant against typical
mistakes:

  • Attribute names may use the actually forbidden hyphen. The parser
    replaces the hyphens with underscores, emits a warning only and
    continues
  • Missing attribute default values are now worth a warning only if all
    affected objects got an individual value
  • Invalid CAN IDs are now reported only once, not at every occurrence

The environmental part of the data model, StringTemplate V4 attribute
info, has two new elements:

  • The StringTemplate V4 template engine has been connected to the Log4j
    application logger. A template can emit messages on debug, info, warn
    and error level. The latter two are counted and code generation won't
    take place if there are errors. This way, a template can report invalid
    states and hinder the template engine to regardless generate code
  • A numeric scratch pad is available. Numeric operations, including
    comparisons and binary operations, can be applied to numeric fields of
    the data model. This means a new level of conditional code generation
    and opens some new structural possibilities

A new sample, scratchPad, demonstrates the capabilities and the usage of
the new scratch pad. Please have a look at the generated output to get a
first impression and see the Javadoc documentation of the data model
(class Info, fields calc, error, warn, info and debug) for a detailed description
of the new features.

 

Last edit: Peter Vranken 2015-11-17