that should do the job
EIVE/eive-obsw/pipeline/pr-develop This commit looks good Details

This commit is contained in:
Robin Müller 2022-12-14 15:41:20 +01:00
parent 62b3e16ac4
commit b6522c9fb3
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
1 changed files with 24 additions and 1 deletions

View File

@ -4,6 +4,7 @@
#include <fsfw/tmstorage/TmStoreFrontendSimpleIF.h>
#include "eive/objects.h"
#include "fsfw/tmstorage/TmStoreMessage.h"
using namespace returnvalue;
@ -48,7 +49,29 @@ ReturnValue_t Service15TmStorage::getMessageQueueAndObject(uint8_t subservice,
ReturnValue_t Service15TmStorage::prepareCommand(CommandMessage *message, uint8_t subservice,
const uint8_t *tcData, size_t tcDataLen,
uint32_t *state, object_id_t objectId) {
if (subservice == Subservices::START_BY_TIME_RANGE_RETRIEVAL) {
if (tcDataLen != 12) {
return INVALID_TC;
}
store_address_t storeId;
ReturnValue_t result = ipcStore->addData(&storeId, tcData, tcDataLen);
if (result != OK) {
return result;
}
// Store timestamps
TmStoreMessage::setDownlinkContentTimeMessage(message, storeId);
} else if (subservice == Subservices::DELETE_UP_TO) {
if (tcDataLen != 8) {
return INVALID_TC;
}
store_address_t storeId;
ReturnValue_t result = ipcStore->addData(&storeId, tcData, tcDataLen);
if (result != OK) {
return result;
}
// Store timestamps
TmStoreMessage::setDeleteContentTimeMessage(message, storeId);
}
return OK;
}