This project is part of DES_03_Head-Unit and DES_04_PDC to provide instrument cluster feature. Flutter was used to implement front end application. It uses CommonAPI and SOME/IP binding as IPC
- Speedometer
- Current Gear
- Battery Info
- Clock
- Now Playing
- Turn Indicator
- Dark Mode
- Proximity Indicator
All these applications should be installed in your build host to build this project
- vSOME/IP v3.4.10
- CommonAPI Core Runtime v3.2.3
- CommonAPI SOME/IP Runtime v3.2.3
This application uses CommonAPI plugin to communicate with other applications.
Each of the applications listed above provide proxy which will make it possible to subscribe to it's attributes. Since flutter does not have CommonAPI related libraries like dbus, I had to make a workaround using Foreign Function Interface(FFI). I created my own wrapper code to use CommonAPI proxies and modified CMakeLists.txt so that my flutter app will generate ffi shared object and include it in the bundle. Now, flutter can use proxies and will subscribes to all of the attributes from each applications listed on the diagram by using ffi plugin in ffi folder. Once subscribed, ChangeNotifier will check for new values and update flutter widgets.
sequenceDiagram
title: Communication Scheme
Dashboard->>libmyffi.so: Open Dynamic Library<br/>Function Lookup
Note left of libmyffi.so: Proxy instance is created
libmyffi.so->>Other CommonAPI Apps: Subscribe
Other CommonAPI Apps-->>libmyffi.so: Notify Events
Dashboard->>libmyffi.so: Method Call
libmyffi.so->>Other CommonAPI Apps: Method Call
Other CommonAPI Apps-->>libmyffi.so: Response
libmyffi.so-->>Dashboard: Response
Other CommonAPI Apps-->>libmyffi.so: Notify Events