WIP: Added Linux command executor #457

Closed
muellerr wants to merge 3 commits from mueller/linux-command-executor into mueller/restructuring
Owner

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 function

Marked WIP because I still need to test the printout functionality and the ring buffer functionality. I might add a unit test for that

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` function Marked WIP because I still need to test the printout functionality and the ring buffer functionality. I might add a unit test for that
muellerr added 1 commit 2021-08-06 11:33:42 +02:00
c8bde71a20
Added Linux command executor
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 theexecute call.
muellerr added the
feature
label 2021-08-06 11:33:59 +02:00
muellerr added this to the v2.0.0 milestone 2021-08-06 11:47:48 +02:00
muellerr added 1 commit 2021-08-09 15:38:35 +02:00
muellerr added 1 commit 2021-08-16 10:35:26 +02:00
Owner

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.

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.
muellerr closed this pull request 2021-09-23 17:54:30 +02:00
Author
Owner

Will be moved and then supplied with unittests

Will be moved and then supplied with unittests

Pull request closed

Sign in to join this conversation.
No description provided.