mardi 19 février 2019

Embedded System Architecture Design - How Should I be Thinking About Segmentation of Program Execution/Responsibilties

Preamble

I am working on a personal hardware/software project. I am building a scanning device that has RGB/Thermal cameras, Lidar, Temp/Humidity Sensors, Arduino that controls a stepper motor to spin the device in a circle and a Nvidia Jetson to interface all of those and do some data processing. The device will be controlled with via a tablet over Bluetooth.

OS: Linux Ubuntu 16.04 with Jetpack from Nvidia

Language: C++11

Use Case Example

Let's say I want to do a 360 panoramic scan. I send a command via Bluetooth to the device. The device then spins in a circle stopping every 45 degrees to take thermal and rgb images. It then does another full rotation capturing just Lidar point data. During that entire scanning process, the device is reporting back to the user its progress and then notifies the user when the scan is completed. The device then does some processing on the data and uploads it to a server. Those steps more concisely and in order are as follows:

  1. User: Send Scan Command
  2. Device: Receive and Parse Command
  3. Device: Initiate Scan
    1. Send Scan Start Signal to User
    2. Initialize cameras - begin rotation sequence - capture images - notify user of progress
    3. Take Lidar Scan - notify user of progress
  4. Device: Notify User Scan Completed
  5. Device: Process Data - notify user
  6. Device: Upload Data - notify user

The Question

I am working on designing the Software Architecture that will control all of those features. Currently there are two models that I am trying to weigh the pros and cons:

  1. Multi-Process
  2. Single-Process Multi-Threaded

I have included a graphic to illustrate a map of the intended modules: Module Map of the System. The question I have is really:

  • Should the System controller be a single process with threads to execute the User-Device-Interface and Device-Hardware-Interface logic.

  • Or should all three be their own process executed independently?

And of course, if you have any comments or pointers about what I have shared, I am all ears for your input! Thanks everyone!

Aucun commentaire:

Enregistrer un commentaire