Asynchronous ServiceInterfacePrinter #65
Reference in New Issue
Block a user
Delete Branch "ritzmannc/fsfw:ritzmann/sif-async-print"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This makes the ServiceInterfacePrinter asynchronous, writing log messages into a buffer which are later printed by a dedicated print task.
This is needed in SOURCE as multiple tasks printing at the same time can interrupt each other leading to mangled log messages.
@@ -41,0 +70,4 @@}size_t len = 0;// char *bufferPosition = printBuffers[bufferIdx];can this be removed?
how was this tested? I'd like to especially avoid buffer overflow crashes/issues, adn there is a test suite in place.
The code was tested by hand on both FlatSat and Hosted (Linux).
All the formatting concerned with user input utilizes bounds checking so there shouldn't be any possibility for an out of bounds write.
A proper test suite may be complicated with the current version of the code but can be done with a slight refactoring if desired.
FSFW_PRINT_BUFFER_AMOUNTto FSFW template config 7692e598d6