Skip to content

DES-Team-02/InstrumentCluster

Repository files navigation

Flutter Dashboard

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

Table of Contents

Features

Layout

  • Speedometer
  • Current Gear
  • Battery Info
  • Clock
  • Now Playing
  • Turn Indicator
  • Dark Mode
  • Proximity Indicator

Dendencies

All these applications should be installed in your build host to build this project

How it works

This application uses CommonAPI plugin to communicate with other applications. image

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
Loading

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published