Android, AUTOSAR and Xpand

Xtext 1.0.0 is scheduled for the Helios release and while I think that it is a great tool we shouldn’t miss the other apects of a toolchain that are crucial for MDSD: M2T, especially code generation. It is only with M2M and M2T that models show their full potential, since we can use automation. The front end does not necessarily have to be Xtext – In this example we are generating code for several platforms from Artop, the community source tool platform of AUTOSAR. Artop provides an EMF based implementation of the AUTOSAR metamodel (and much more) and is a perfect source for code generation.

In the AUTOSAR methodology, as described by the standard, a Run Time Environment (RTE) is generated from the model. The specification defines a C API that represents the RTE and all commercially availalbe tools implement this C specification. However, we use the AUTOSAR models to generate Java code for Android and specifications for business applications, too!

This is our showcase, that we present on fairs etc: A RC car chassis contains several ECUs. A sensor transmits data to a Gateway ECU. This ECU forwards the data both to a display (like your infotainment), but it also forwards this data to a server running a webserver from which it is transferred to mobile devices, like android phones. This is typical for the future challenges in automotive systems: The convergence of technologies from different domains.

Showcase - ECUs communicating with Web Services and Android

With manual coding, the code for accessing and transmitting the data would have been written several times independently, and changes would have been integrated the same way too. However, we have written Xpand templates for code generation, that not only generate to different RTEs for the in-car ECUs, but also generate code fragment for the Web-Service and the Android application. Adding new data (like rpm) to the transmitted information is supported by code generation, resulting in less manual changes and in higher quality at shorter development cycles.

Using Xpand to generate more than C from Artop

Eclipse technologies provide a great set of tools for leaving the trodden path of monolithic tools and implement efficient solutions for customer requirements.

Android application - basic data API is generate from AUTOSAR model

Leave a Reply

Your email address will not be published. Required fields are marked *