add IPC ring buf and buffer
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-11-04 12:45:20 +01:00
parent b5cd873f6d
commit 74837753bf
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 10 additions and 2 deletions

View File

@ -27,7 +27,9 @@
using namespace returnvalue; using namespace returnvalue;
PlocSupvHelper::PlocSupvHelper(object_id_t objectId) PlocSupvHelper::PlocSupvHelper(object_id_t objectId)
: SystemObject(objectId), recRingBuf(4096, true) { : SystemObject(objectId),
recRingBuf(4096, true),
ipcRingBuf(1200 * MAX_STORED_DECODED_PACKETS, true) {
spParams.maxSize = sizeof(commandBuffer); spParams.maxSize = sizeof(commandBuffer);
resetSpParams(); resetSpParams();
semaphore = SemaphoreFactory::instance()->createBinarySemaphore(); semaphore = SemaphoreFactory::instance()->createBinarySemaphore();

View File

@ -7,6 +7,7 @@
#include <string> #include <string>
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "fsfw/container/FIFO.h"
#include "fsfw/devicehandlers/CookieIF.h" #include "fsfw/devicehandlers/CookieIF.h"
#include "fsfw/objectmanager/SystemObject.h" #include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/osal/linux/BinarySemaphore.h" #include "fsfw/osal/linux/BinarySemaphore.h"
@ -172,6 +173,7 @@ class PlocSupvHelper : public DeviceCommunicationIF,
static const uint32_t CRC_EXECUTION_TIMEOUT = 60000; static const uint32_t CRC_EXECUTION_TIMEOUT = 60000;
static const uint32_t PREPARE_UPDATE_EXECUTION_REPORT = 2000; static const uint32_t PREPARE_UPDATE_EXECUTION_REPORT = 2000;
static constexpr uint8_t MAX_STORED_DECODED_PACKETS = 4;
static constexpr uint8_t HDLC_START_MARKER = 0x7C; static constexpr uint8_t HDLC_START_MARKER = 0x7C;
static constexpr uint8_t HDLC_END_MARKER = 0x7E; static constexpr uint8_t HDLC_END_MARKER = 0x7E;
@ -224,10 +226,14 @@ class PlocSupvHelper : public DeviceCommunicationIF,
#ifdef XIPHOS_Q7S #ifdef XIPHOS_Q7S
SdCardManager* sdcMan = nullptr; SdCardManager* sdcMan = nullptr;
#endif #endif
SimpleRingBuffer recRingBuf;
std::array<uint8_t, 2048> recBuf = {}; std::array<uint8_t, 2048> recBuf = {};
std::array<uint8_t, 2048> encodedBuf = {}; std::array<uint8_t, 2048> encodedBuf = {};
std::array<uint8_t, 1200> decodedBuf = {}; std::array<uint8_t, 1200> decodedBuf = {};
SimpleRingBuffer recRingBuf; std::array<uint8_t, 1200> ipcBuffer = {};
SimpleRingBuffer ipcRingBuf;
FIFO<size_t, MAX_STORED_DECODED_PACKETS> ipcQueue;
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE]{}; uint8_t commandBuffer[supv::MAX_COMMAND_SIZE]{};
SpacePacketCreator creator; SpacePacketCreator creator;
ploc::SpTcParams spParams = ploc::SpTcParams(creator); ploc::SpTcParams spParams = ploc::SpTcParams(creator);