fsfw/src/fsfw/FSFW.h.in
Robin Mueller 371ff931bf
Linux CommandExecutor
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

Moved to HAL like requested in code review and unit tested with failing commands as well.
Also, Linux HAL components are compiled by default now unless explicitely disabled.
2022-01-26 12:11:52 +01:00

69 lines
1.7 KiB
C

#ifndef FSFW_FSFW_H_
#define FSFW_FSFW_H_
#include "FSFWConfig.h"
#cmakedefine FSFW_OSAL_RTEMS
#cmakedefine FSFW_OSAL_FREERTOS
#cmakedefine FSFW_OSAL_LINUX
#cmakedefine FSFW_OSAL_HOST
#cmakedefine FSFW_ADD_RMAP
#cmakedefine FSFW_ADD_DATALINKLAYER
#cmakedefine FSFW_ADD_TMSTORAGE
#cmakedefine FSFW_ADD_COORDINATES
#cmakedefine FSFW_ADD_PUS
#cmakedefine FSFW_ADD_MONITORING
#cmakedefine FSFW_ADD_SGP4_PROPAGATOR
// FSFW core defines
#ifndef FSFW_TCP_RECV_WIRETAPPING_ENABLED
#define FSFW_TCP_RECV_WIRETAPPING_ENABLED 0
#endif
#ifndef FSFW_CPP_OSTREAM_ENABLED
#define FSFW_CPP_OSTREAM_ENABLED 1
#endif /* FSFW_CPP_OSTREAM_ENABLED */
#ifndef FSFW_VERBOSE_LEVEL
#define FSFW_VERBOSE_LEVEL 1
#endif /* FSFW_VERBOSE_LEVEL */
#ifndef FSFW_USE_REALTIME_FOR_LINUX
#define FSFW_USE_REALTIME_FOR_LINUX 0
#endif /* FSFW_USE_REALTIME_FOR_LINUX */
#ifndef FSFW_NO_C99_IO
#define FSFW_NO_C99_IO 0
#endif /* FSFW_NO_C99_IO */
#ifndef FSFW_USE_PUS_C_TELEMETRY
#define FSFW_USE_PUS_C_TELEMETRY 1
#endif /* FSFW_USE_PUS_C_TELEMETRY */
#ifndef FSFW_USE_PUS_C_TELECOMMANDS
#define FSFW_USE_PUS_C_TELECOMMANDS 1
#endif
// FSFW HAL defines
// Can be used for low-level debugging of the SPI bus
#ifndef FSFW_HAL_SPI_WIRETAPPING
#define FSFW_HAL_SPI_WIRETAPPING 0
#endif
#ifndef FSFW_HAL_L3GD20_GYRO_DEBUG
#define FSFW_HAL_L3GD20_GYRO_DEBUG 0
#endif /* FSFW_HAL_L3GD20_GYRO_DEBUG */
#ifndef FSFW_HAL_RM3100_MGM_DEBUG
#define FSFW_HAL_RM3100_MGM_DEBUG 0
#endif /* FSFW_HAL_RM3100_MGM_DEBUG */
#ifndef FSFW_HAL_LIS3MDL_MGM_DEBUG
#define FSFW_HAL_LIS3MDL_MGM_DEBUG 0
#endif /* FSFW_HAL_LIS3MDL_MGM_DEBUG */
#endif /* FSFW_FSFW_H_ */