that should be the basic interface
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2022-12-19 13:25:45 +01:00
parent bbf0def3ff
commit 74f116f2fa
4 changed files with 38 additions and 6 deletions

View File

@ -2,8 +2,10 @@
#include "eive/definitions.h"
#include "eive/objects.h"
#include "fsfw/ipc/CommandMessage.h"
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/objectmanager.h"
#include "fsfw/tmstorage/TmStoreMessage.h"
#include "fsfw/tmtcpacket/pus/tm/PusTmZcWriter.h"
PusTmFunnel::PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, StorageManagerIF &tmStore,
@ -46,8 +48,31 @@ PusTmFunnel::PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, Storage
PusTmFunnel::~PusTmFunnel() = default;
ReturnValue_t PusTmFunnel::performOperation(uint8_t) {
CommandMessage cmdMessage;
ReturnValue_t status = tcQueue->receiveMessage(&cmdMessage);
while (status == returnvalue::OK) {
if (cmdMessage.getCommand() == messagetypes::TM_STORE) {
object_id_t objectId = TmStoreMessage::getObjectId(&cmdMessage);
switch (objectId) {
case (objects::HK_TM_STORE): {
break;
}
case (objects::OK_TM_STORE): {
break;
}
case (objects::NOT_OK_TM_STORE): {
break;
}
case (objects::MISC_TM_STORE): {
break;
}
default: {
}
}
}
}
TmTcMessage currentMessage;
ReturnValue_t status = tmQueue->receiveMessage(&currentMessage);
status = tmQueue->receiveMessage(&currentMessage);
while (status == returnvalue::OK) {
status = handlePacket(currentMessage);
if (status != returnvalue::OK) {
@ -56,10 +81,6 @@ ReturnValue_t PusTmFunnel::performOperation(uint8_t) {
}
status = tmQueue->receiveMessage(&currentMessage);
}
if (status == MessageQueueIF::EMPTY) {
return returnvalue::OK;
}
return status;
}