Check out Thingml . It provides text syntax (regardless of C) for UML-like states. Something like:
import "../hardware/bricks/led.thingml" thing Blink includes LedMsgs, TimerMsgs { required port HW { sends led_toggle, timer_start receives timer_timeout } statechart BlinkImpl init Blinking { state Blinking { on entry HW!timer_start (1000) transition -> Blinking event HW?timer_timeout action HW!led_toggle () } } }
ThingML can generate C code that can be easily integrated into C ++ programs. It can generate more than cigarette butts. We really can generate fully working code. Of course, when it comes to low-level implementation details, we provide an average for combining ThingML code with C.
Please note that we also target Java and JavaScript.
bmorin
source share