Open Trunk Standalone Application#
Note
Note
The Complex Service will run in its own process, therefore we need the Proxy & Stub code of the Interface of the Basic Service.
In the Standalone Application we have access to all Interface s including the signals in in the dispatch service.
As the Complex Service should prevent the opening of the trunk it can be seen as an ASIL A component.
Demonstration of Open Trunk Example Code#
To simplify the code of this example we did not include the code processing the TX signal as it is not important here. The TX signals are included in all other examples. This example should visualize only a safety aspect and introduce the view about Mixed-Criticality .
- Initialization
When user runs the executable ./open_trunk_example 0 , then the application will run as standalone application.
At first, it will check whether the SDV_FRAMEWORK_RUNTIME environment variable exists or not. If it was not set, then we need to set it manually by giving the location of framework headerfiles and binaries.
From the given application configuration, the core services will be loaded in order to start the application.
Now, we need to set to config mode for loading the required configuration files.
- Data communication
The Vehicle Speed (Rx) signal will be subscribed via Data Dispatch Service, so when there is a change in signal value, the callback function will be called.
Register the event in Vehicle Device on signal change.
Register callback function in Basic Service for signal change update.
Get the interfaces of Basic Service and Complex Service for opening the trunk.
Now, we will set to running mode in which we can no longer load any more config files later.
- Shutdown
Unregister the signals and events from the Basic and Complex services.
Shutdown the application.

The Speed signal is coming via CAN bus by using the VAPI Component can_com_sim.sdv
from the framework. The VAPI Component reads the CAN messages from a text file and sends these messages to the Data Link The Data Link component is created from a dbc file with the help of the helper tool sdv_bcd_util
.
Attention
For safety reason the red connection in the picture must be prevented as the connection bypasses the validation against vehicle movement.
