DLE FRAM packets can be read now
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
2022-04-09 14:43:06 +02:00
parent 44c8f5f730
commit 808e01dfd3
13 changed files with 176 additions and 93 deletions

View File

@ -1,6 +1,7 @@
#ifndef LINUX_BOARDTEST_UARTTESTCLASS_H_
#define LINUX_BOARDTEST_UARTTESTCLASS_H_
#include <fsfw/container/SimpleRingBuffer.h>
#include <fsfw/globalfunctions/DleEncoder.h>
#include <fsfw_hal/linux/uart/UartCookie.h>
#include <termios.h> // Contains POSIX terminal control definitions
@ -8,10 +9,11 @@
#include <array>
#include "lwgps/lwgps.h"
#include "mission/devices/devicedefinitions/SCEXDefinitions.h"
#include "mission/devices/devicedefinitions/ScexDefinitions.h"
#include "test/testtasks/TestTask.h"
class ScexUartReader;
class ScexDleParser;
class UartTestClass : public TestTask {
public:
@ -40,6 +42,11 @@ class UartTestClass : public TestTask {
void scexSimplePeriodic();
void scexSimpleInit();
static void foundDlePacketHandler(uint8_t* packet, size_t len, void* args);
void handleFoundDlePacket(uint8_t* packet, size_t len);
bool cmdSent = false;
bool cmdDone = false;
scex::ScexCmds currCmd = scex::ScexCmds::PING;
TestModes mode = TestModes::GPS;
DleEncoder dleEncoder = DleEncoder();
@ -48,10 +55,15 @@ class UartTestClass : public TestTask {
lwgps_t gpsData = {};
struct termios tty = {};
int serialPort = 0;
std::array<uint8_t, 64> cmdBuf = {};
std::array<uint8_t, 4096> recBuf = {};
uint8_t recvCnt = 0;
bool startFound = false;
ScexUartReader* reader = nullptr;
SimpleRingBuffer decodeRingBuf;
std::array<uint8_t, 64> cmdBuf = {};
std::array<uint8_t, 524> recBuf = {};
std::array<uint8_t, 4096> encodedBuf = {};
std::array<uint8_t, 4096> decodedBuf = {};
ScexDleParser* dleParser;
uint8_t recvCnt = 0;
};
#endif /* LINUX_BOARDTEST_UARTTESTCLASS_H_ */