This commit is contained in:
@ -2,6 +2,7 @@
|
||||
#define LINUX_BOARDTEST_UARTTESTCLASS_H_
|
||||
|
||||
#include <fsfw/globalfunctions/DleEncoder.h>
|
||||
#include <fsfw_hal/linux/uart/UartCookie.h>
|
||||
#include <termios.h> // Contains POSIX terminal control definitions
|
||||
|
||||
#include <array>
|
||||
@ -9,9 +10,11 @@
|
||||
#include "lwgps/lwgps.h"
|
||||
#include "test/testtasks/TestTask.h"
|
||||
|
||||
class ScexUartReader;
|
||||
|
||||
class UartTestClass : public TestTask {
|
||||
public:
|
||||
UartTestClass(object_id_t objectId);
|
||||
UartTestClass(object_id_t objectId, ScexUartReader* reader);
|
||||
|
||||
ReturnValue_t initialize() override;
|
||||
ReturnValue_t performOneShotAction() override;
|
||||
@ -24,14 +27,17 @@ class UartTestClass : public TestTask {
|
||||
SCEX
|
||||
};
|
||||
|
||||
enum ScexModes { SIMPLE, READER_TASK } scexMode;
|
||||
|
||||
void gpsInit();
|
||||
void gpsPeriodic();
|
||||
|
||||
void scexInit();
|
||||
void scexPeriodic();
|
||||
int prepareScexPing();
|
||||
int prepareScexPing(uint8_t* cmdBuf, size_t* len);
|
||||
TestModes mode = TestModes::GPS;
|
||||
DleEncoder dleEncoder = DleEncoder();
|
||||
UartCookie* uartCookie = nullptr;
|
||||
size_t encodedLen = 0;
|
||||
lwgps_t gpsData = {};
|
||||
struct termios tty = {};
|
||||
@ -39,6 +45,7 @@ class UartTestClass : public TestTask {
|
||||
std::array<uint8_t, 64> cmdBuf = {};
|
||||
std::array<uint8_t, 4096> recBuf = {};
|
||||
uint8_t recvCnt = 0;
|
||||
ScexUartReader* reader = nullptr;
|
||||
};
|
||||
|
||||
#endif /* LINUX_BOARDTEST_UARTTESTCLASS_H_ */
|
||||
|
Reference in New Issue
Block a user