WIP: Added Linux command executor #457
No reviewers
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#457
Loading…
Reference in New Issue
No description provided.
Delete Branch "mueller/linux-command-executor"
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?
The CommandExecutor helper class can execute shell commands in blocking and non-blocking mode
This class is able to execute processes by using the Linux
popen
call. It also has the capability of writing the read output of a process into a provided ring buffer.The executor works by first loading the command which should be executed and specifying whether it should be executed blocking or non-blocking. After that, execution can be started with the
execute
call.Using non-blocking mode allows to execute commands which might take a longer time in the background, and allowing the user thread to check completion status with the
check
functionMarked WIP because I still need to test the printout functionality and the ring buffer functionality. I might add a unit test for that
I think this would be better located in hal, as it is not portable at all, while OSAL is an abstraction layer which should be ingnorant of the underlying OS.
Will be moved and then supplied with unittests
Pull request closed