enseDSL: Automating the Integration of Sensors for MCU-based Robots and Cyber-Physical Systems
Paper i proceeding, 2014

Context: Cyber-physical systems like robotic platforms use sensors to perceive their surroundings. Multiple sensors like infrared, ultrasonic, and incremental encoders help these robots to orient act safely in their environment. Objective: However, finding a valid setup how to connect all sensors to a microcontroller (MCU) and to configure the embedded operating system correctly is hard because a constraint-satisfaction problem (CSP) needs to be solved. Here, a domain-specific language and an accompanying workflow are of great help for users to focus on algorithms instead of solving the CSP over and over again whenever a sensor con- figuration is adapted. Method: In our previous work, we have focused on modeling the CSP of the aforementioned problem appropriately. In this work, we are presenting SenseDSL, a simple, intuitive, and compact DSL to describe what shall be perceived by an MCU but letting the how to the tooling that processes the DSL’s instances. Results: The workflow is realized by using Xtext and Xtend to process DSL artifacts, Prolog to solve the CSP, and a lean layer on top of ChibiOS/RT to interface with the hardware and to enable code reuse for a large variety of MCUs. Conclusion: Features of an embedded system are described in a compact tabular representation in combination with a textual description of the desired sensors to be connected. The model transformation and code generation process verifies the setup, finds automatically the best connection plan for the given sensors, and generates the required code for ChibiOS/RT and an accompanying host application to read and handle the data.

Code Generation

Cyber-Physical Systems




Christian Berger

Göteborgs universitet

Proceedings of the 14th Workshop on Domain-Specific Modeling