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
3 changed files with 21 additions and 2 deletions
Showing only changes of commit 5431dfc9bd - Show all commits

View File

@ -149,7 +149,8 @@ enum commonObjects : uint32_t {
MISC_TM_STORE = 0x73020001, MISC_TM_STORE = 0x73020001,
OK_TM_STORE = 0x73020002, OK_TM_STORE = 0x73020002,
NOT_OK_TM_STORE = 0x73020003, NOT_OK_TM_STORE = 0x73020003,
HK_TM_STORE = 0x73020004 HK_TM_STORE = 0x73020004,
CFDP_TM_STORE = 0x73030000
}; };
} }

2
fsfw

@ -1 +1 @@
Subproject commit 75fc7a056db2a4aee8c20c225fd3c2b79fce8ce3 Subproject commit 2aa4af69742d932f09ec2a1d3d29b648295035d1

View File

@ -1,5 +1,10 @@
#include "Service15TmStorage.h" #include "Service15TmStorage.h"
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/tmstorage/TmStoreFrontendSimpleIF.h>
#include "eive/objects.h"
using namespace returnvalue; using namespace returnvalue;
Service15TmStorage::Service15TmStorage(object_id_t objectId, uint16_t apid, Service15TmStorage::Service15TmStorage(object_id_t objectId, uint16_t apid,
@ -24,6 +29,19 @@ ReturnValue_t Service15TmStorage::getMessageQueueAndObject(uint8_t subservice,
const uint8_t *tcData, size_t tcDataLen, const uint8_t *tcData, size_t tcDataLen,
MessageQueueId_t *id, MessageQueueId_t *id,
object_id_t *objectId) { object_id_t *objectId) {
object_id_t targetObjectId;
SerializeAdapter::deSerialize(&targetObjectId, &tcData, &tcDataLen,
SerializeIF::Endianness::NETWORK);
if (targetObjectId == objects::CFDP_TM_STORE) {
*objectId = objects::CFDP_TM_FUNNEL;
} else {
*objectId = objects::PUS_TM_FUNNEL;
}
muellerr marked this conversation as resolved Outdated

I think there is an Error code for unknown object. (CommandingServiceBase::INVALID_OBJECT)

I think there is an Error code for unknown object. (CommandingServiceBase::INVALID_OBJECT)
auto *frontendIF = ObjectManager::instance()->get<TmStoreFrontendSimpleIF>(*objectId);
if (frontendIF == nullptr) {
return FAILED;
}
*id = frontendIF->getCommandQueue();
return OK; return OK;
} }