updates for new dle parser API
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
@ -290,9 +290,13 @@ int UartTestClass::prepareScexCmd(scex::ScexCmds cmd, bool tempCheck, uint8_t* c
|
||||
return 0;
|
||||
}
|
||||
|
||||
void UartTestClass::foundDlePacketHandler(uint8_t* packet, size_t len, void* args) {
|
||||
UartTestClass* obj = reinterpret_cast<UartTestClass*>(args);
|
||||
obj->handleFoundDlePacket(packet, len);
|
||||
void UartTestClass::foundDlePacketHandler(const DleParser::Context& ctx) {
|
||||
UartTestClass* obj = reinterpret_cast<UartTestClass*>(ctx.userArgs);
|
||||
if (ctx.getType() == DleParser::ContextType::PACKET_FOUND) {
|
||||
obj->handleFoundDlePacket(ctx.decodedPacket.first, ctx.decodedPacket.second);
|
||||
} else {
|
||||
DleParser::defaultErrorHandler(ctx.error.first, ctx.error.second);
|
||||
}
|
||||
}
|
||||
|
||||
void UartTestClass::handleFoundDlePacket(uint8_t* packet, size_t len) {
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <fsfw/container/SimpleRingBuffer.h>
|
||||
#include <fsfw/globalfunctions/DleEncoder.h>
|
||||
#include <fsfw/globalfunctions/DleParser.h>
|
||||
#include <fsfw_hal/linux/uart/UartCookie.h>
|
||||
#include <termios.h> // Contains POSIX terminal control definitions
|
||||
|
||||
@ -42,7 +43,7 @@ class UartTestClass : public TestTask {
|
||||
void scexSimplePeriodic();
|
||||
void scexSimpleInit();
|
||||
|
||||
static void foundDlePacketHandler(uint8_t* packet, size_t len, void* args);
|
||||
static void foundDlePacketHandler(const DleParser::Context& ctx);
|
||||
void handleFoundDlePacket(uint8_t* packet, size_t len);
|
||||
|
||||
bool cmdSent = false;
|
||||
|
Reference in New Issue
Block a user