huge progress
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Irini Kosmidou
2022-04-08 19:12:21 +02:00
parent 35f2d2cb9c
commit 01d86a0c7b
7 changed files with 339 additions and 105 deletions

View File

@ -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_ */