Add a new feature to a model (whitebox)
PRESENTATION
This tutorial is based on the previous tutorial: Add a new feature to a model (blackbox).
Prerequisites
Have done the previous tutorials Start to use Sim4Sys with a simple model (whitebox) and Add a new feature to a model (blackbox).
News skills that you will acquire
On Designer:
- Create imbricated states in a State Machine,
- Concept on entries,
- Use MinGW.
Duration
2h
START THE TUTORIAL
We can go into further details by splitting the service Turn Signal into more specific functions, as introduced in in the second tutorial for acceleration and braking. There are several ways of doing this according to your future project's needs. Here is an example of what functions can constitute our service. Here is an example:

Keep in mind that the functions (White Box) and the service (Black Box) should keep the same logic, and the same mappings when simulating. The White Box gives more details about how the Black Box works but should not change its behavior. However, don't go into too much details! In the function part, you should never use component related terms (example: light, steering wheel, comodo). In this part, we only talk about the functionalities, not how they should be applied.
In this example, the functions are the following:
- Get Turn Requests: to take into account all user's requests to activate or deactivate a turn signal.
- Get Warnings Requests: to take into account all user's requests related to warning activation.
- Restitute Left Indication: to handle the restitution of the left indication in any way (activation of external indication or feedback for the driver).
- Restitute Right Indication: to handle the restitution of the right indication in any way (activation of external indication or feedback for the driver).
- Restitute Warnings Indication: to handle the restitution of the warnings indication in any way (activation of external indication or feedback for the driver).