Setup the model

Setup the model

import room.basic.service.timing.* from "../../org.eclipse.etrice.modellib/models/TimingService.room" 

The [GuiAdapter] represents the interface to the external code. It registers its [ControlPort] by the external code.

Visit the initial transition to understand the registration. The actor handles the incoming messages as usual and controls the traffic lights as known from blinky.

The [Controller] receives the [start] message and controls the timing of the lights. Note that the [start] message will be sent from the external code whenever the [REQUEST] button is pressed.

  1. PedControlProtocol => notice that the start message is defined as usual

  2. Initial transition of the [GuiAdapter] => see the registration

  3. The [Controller] => notice that the [Controller] receives the external message (not the [GuiAdapter]). The [GuiAdapter] just provides its port and handles the incoming messages.

  4. Visit the hand written code => see the import statement of the protocol class and the usage of the port.