now its getting tricky
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-11-04 11:38:21 +01:00
parent d254331b8e
commit 6350dbe0e9
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,8 @@
using namespace returnvalue;
PlocSupvHelper::PlocSupvHelper(object_id_t objectId) : SystemObject(objectId), ringBuf(4096, true) {
PlocSupvHelper::PlocSupvHelper(object_id_t objectId)
: SystemObject(objectId), recRingBuf(4096, true) {
spParams.maxSize = sizeof(commandBuffer);
resetSpParams();
semaphore = SemaphoreFactory::instance()->createBinarySemaphore();
@ -79,6 +80,7 @@ ReturnValue_t PlocSupvHelper::performOperation(uint8_t operationCode) {
sif::info << "Received " << bytesRead
<< " bytes from the Solar Cell Experiment:" << std::endl;
}
recRingBuf.writeData(recBuf.data(), bytesRead);
// insert buffer into ring buffer here
// ReturnValue_t result = dleParser.passData(recBuf.data(), bytesRead);
// TODO: Parse ring buffer here

View File

@ -216,6 +216,7 @@ class PlocSupvHelper : public DeviceCommunicationIF,
SdCardManager* sdcMan = nullptr;
#endif
std::array<uint8_t, 2048> recBuf = {};
SimpleRingBuffer recRingBuf;
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE]{};
SpacePacketCreator creator;
ploc::SpTcParams spParams = ploc::SpTcParams(creator);
@ -224,8 +225,6 @@ class PlocSupvHelper : public DeviceCommunicationIF,
bool terminate = false;
bool debugMode = false;
SimpleRingBuffer ringBuf;
/**
* Communication interface responsible for data transactions between OBC and Supervisor.
*/