So I came up with this simple flow of the program that could be done without RTOS but I'm using it for the sake of learning.
The generic idea is to get the user input over UART, and if it's something regarding data query, the data query task wakes up, reads the sensor data, wakes up the other task to transfer the data over to RX module.
In other words, I have
ulTaskNotifyTake() in, say, a Data Task which waits on a notification from a UART task. Upon receiving an input over the UART regarding the query of this data, the UART task would call
xTaskNotifyFromISR() from the UART's ISR waking up the Data Task, which would query the sensor data...and so on.
Does the generic flow sound OK? I'm still going through a bunch of FreeRTOS docs on APIs but that's a raw image that I thought of. Any suggestions are appreciated.