Switching on and off the LED is timing controlled. The timing service is provided from the model library and must be imported before it can be used from the model.
This is the first time you use an element from the modellib. Make sure that your Java Build Path has the appropriate entry to the modellib. Otherwise the jave code, which will be generated from the modellib, can not be referenced. (right click to Blinky and select properties. Select the Java Build Path tab)
After the build path is set up return to the model and navigate the cursor at the beginning of the model and import the timing service:
RoomModel Blinky {
import room.basic.service.timing.* from "../../org.eclipse.etrice.modellib/models/TimingService.room"
LogicalSystem System_Blinky {
SubSystemRef subsystem: SubSystem_Blinky
}
}
...
Make sure that the path fits to your folder structure.
Now it can be used within the model. Right click to SubSystem_Blinky within the outline view. Select Edit Structure. The application is already referenced in the subsystem. Drag and Drop an ActorRef to the SubSystem_Blinky and name it timingService. From the actor class drop down list select room.basic.service.timing.ATimingService. Draw a LayerConnection from application to each service provision point (SPP) of the timingService. The resulting structure should look like this:
The current version of eTrice does not provide a graphical element for a service access point (SAP). Therefore the SAPs to access the timing service must be added in the .room file. Open the Blinky.room file and navigate to the Blinky actor. Add the following line to the structure of the actor:
SAP timer: room.basic.service.timing.PTimeout
Do the same thing for BlinkyController.
The resulting code should look like this: