added basic unittests for hdlc encoder
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2023-02-15 19:58:32 +01:00
parent 655e01c2d1
commit 9fdb41506b
8 changed files with 95 additions and 63 deletions

View File

@ -48,8 +48,6 @@ class RwPollingTask : public SystemObject, public ExecutableObjectIF, public Dev
std::array<uint8_t, rws::MAX_CMD_SIZE * 2> encodedBuffer;
size_t writeLen = 0;
//! This is the end and start marker of the frame datalinklayer
static constexpr uint8_t FLAG_BYTE = 0x7E;
static constexpr MutexIF::TimeoutType TIMEOUT_TYPE = MutexIF::TimeoutType::WAITING;
static constexpr uint32_t TIMEOUT_MS = 20;
static constexpr uint8_t MAX_RETRIES_REPLY = 5;
@ -75,7 +73,6 @@ class RwPollingTask : public SystemObject, public ExecutableObjectIF, public Dev
ReturnValue_t prepareSetSpeedCmd(uint8_t rwIdx);
size_t idAndIdxToReadBuffer(DeviceCommandId_t id, uint8_t rwIdx, uint8_t** readPtr);
void encodeHdlc(const uint8_t* sourceBuf, size_t sourceLen, size_t& encodedLen);
void pullCsHigh(gpioId_t gpioId, GpioIF& gpioIF);
void closeSpi(int);