SD Card Parameters/Logger Architecture
I/O text driver in boardfiles
Logger and parametrization/config uses this driver
I/O text driver assumes a folder/file structure, can implement this as see fit for non “file” type i/o text like swdio or flash memory
config controller: Lives in the non-board files so you can use c++ strings as long as you make sure that its not using the heap (LOOK INTO IT) or just use something else (immutable strings)
has a private class member config table
an array of key value pairs (key, value, boolean representing if it requires a system restart on change)
init function reads in values from sd card into config table
update function takes key and value and upates the specific key
updates internal config table and I/O (only updates config table if I/O is successful
read/get function that takes the enum value for the key and returns the value from the private config table
could send signal to AM saying value changed
AM:
in the beginning of it’s control loop
On startup:
main.cpp inits SD card driver
main.cpp
main.cpp inits SM
main.cpp leverages SM to get SD card parameters such that it can init all relevant managers
main.cpp also creates drivers and queues and everything
runtime:
SM
To do: | In Progress: | Done: |
---|---|---|
TextIO
| TextIO
ZP
|
TextIO
ZP
|