Pyrrha-Platform / Pyrrha-Z

Next-generation firmware built on the Zephyr RTOS.
Apache License 2.0
2 stars 0 forks source link

storage: refactor log storage #11

Open bpbradley opened 2 years ago

bpbradley commented 2 years ago

Currently (as of #8) new data (when notification to a client fails) is appended to a flash circular buffer, and then when the client becomes available it is pulled out from the front in a FIFO format and sent to the client. #8 details a number of issues with this implementation, but it is the best way to meet the current requirements (i.e. all the data is sent through a notification the same way that new samples are).

I propose a different system where data is simply appended to a file on a littlefs mount, and the client will download it when needed, possibly leveraging mcumgr to handle this. This comes with some additional corner cases, but it will be a much more scalable solution.

New data can still be sent through the notification when the client is available.