Now things are getting a little bit more complex. We will develop the next evolution of the light control:
Start with the statechart model included in this project.
As detecting double clicks is somehow independent from switching power it makes sense to make use of a new top-level region.
Use the simulation to check the behavior.
Change the states of the region light control to process click events in the way described above.
Hint: Be aware that the region that detects click events should be executed before the light control region. You can change the priority of the regions in the properties view.
Make use of named interfaces and internal declarations to properly structure the your definitions.