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:
Robin Müller 2022-12-19 13:25:45 +01:00
parent bbf0def3ff
commit 74f116f2fa
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
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;
}

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