eive-obsw/linux/boardtest/UartTestClass.h

28 lines
653 B
C
Raw Normal View History

2021-03-04 18:29:28 +01:00
#ifndef LINUX_BOARDTEST_UARTTESTCLASS_H_
#define LINUX_BOARDTEST_UARTTESTCLASS_H_
2022-01-17 13:48:55 +01:00
#include <termios.h> // Contains POSIX terminal control definitions
2021-06-16 18:38:06 +02:00
#include <array>
2021-03-04 18:29:28 +01:00
2022-01-17 13:48:55 +01:00
#include "lwgps/lwgps.h"
#include "test/testtasks/TestTask.h"
2021-03-04 18:29:28 +01:00
2022-01-17 13:48:55 +01:00
class UartTestClass : public TestTask {
public:
UartTestClass(object_id_t objectId);
2021-03-04 18:29:28 +01:00
2022-01-17 13:48:55 +01:00
ReturnValue_t initialize() override;
ReturnValue_t performOneShotAction() override;
ReturnValue_t performPeriodicAction() override;
2021-06-16 18:38:06 +02:00
2022-01-17 13:48:55 +01:00
private:
lwgps_t gpsData = {};
struct termios tty = {};
int serialPort = 0;
std::array<uint8_t, 512> recBuf;
uint8_t recvCnt = 0;
2021-03-04 18:29:28 +01:00
};
#endif /* LINUX_BOARDTEST_UARTTESTCLASS_H_ */