Processes/Threads:
Each of the following represents a thread/process: and each process will be running indefinitely using a while loop until program stops.
- Receiving message from ANDROID
- Receiving message from ALGO
- Receiving message from STM
- Sending message to ANDROID
- Sending message to ALGO
- Sending message to STM
- Taking picture for Image Rec
We will use four queues for storing the messages, in general, we receive message from the different external devices, determine what and who the message is for and store it in the designated team's queue. The 4 queues are: toAndroidQueue, toAlgoQueue, toImgQueue, toSTMQueue
E.g. We receive message from android and realised the message is for ALGO, so we just push the message into ALGO's queue Since all processes run at the same time, process (5) will see that the ALGO queue is not empty, and then send the message to ALGO.
below messages excludes like the statuses such as checking when STM32, ImageRec etc... are ready. below are only for task 1 image rec, task 2 movement that include sensors etc are not included for now..
- Android to Algo (obstacles and start message) - these messages might be seperate to allow time for calculation?
- Android to STM (manually move)
- Android to RPI (take picture?) then RPI take picture and send to Image Rec for processing.
- init
- connect
- disconnect
- send
- receive
- Algo to STM (movements for robot to take) e.g. STM, FW10, FR00, FW20, BL20... etc
- Algo to Android (paths? like coordinates of robot so algo can simulate the run)
- init
- connect
- disconnect
- send
- receive
- Reach designed location, ask RPI to take picture? Then RPI take pic and send to Image Rec to process before sending to Android the identified obstacle ID. (im not sure how this works)
- Send message to say task completed
- init
- connect
- disconnect
- send
- receive