Persistent TM Store #320

Merged
muellerr merged 109 commits from mueller/pus-15-tm-storage into develop 2023-02-24 19:03:39 +01:00
4 changed files with 38 additions and 6 deletions
Showing only changes of commit 74f116f2fa - Show all commits

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;
}

View File

@ -181,3 +181,9 @@ void TmStore::addServiceSubservice(uint8_t service, uint8_t subservice) {
}
filter.serviceSubservices.value().push_back({service, subservice});
}
void TmStore::deleteUpTo(uint32_t unixSeconds) {}
void TmStore::dumpFromUpTo(uint32_t fromUnixSeconds, uint32_t upToUnixSeconds,
std::vector<std::pair<MessageQueueId_t, uint8_t>>& destinations,
MessageQueueIF* tmQueue) {}

View File

@ -27,6 +27,11 @@ class TmStore : public SystemObject {
void addService(uint8_t service);
void addServiceSubservice(uint8_t service, uint8_t subservice);
void deleteUpTo(uint32_t unixSeconds);
void dumpFromUpTo(uint32_t fromUnixSeconds, uint32_t upToUnixSeconds,
std::vector<std::pair<MessageQueueId_t, uint8_t>>& destinations,
MessageQueueIF* tmQueue);
void updateBaseDir();
ReturnValue_t passPacket(PusTmReader& reader);

2
tmtc

@ -1 +1 @@
Subproject commit 30cf47365fec68a4b78395de03ecb2ae95af4e7e
Subproject commit 383b32141c8c382b84c587d6814fe9252dde0b4a