1
0
forked from fsfw/fsfw

merged changes

This commit is contained in:
2020-09-29 14:49:57 +02:00
parent 224248dfa1
commit 485e96f12f
9 changed files with 66 additions and 55 deletions

View File

@ -1,6 +1,7 @@
#include "ConstStorageAccessor.h"
#include "StorageManagerIF.h"
#include "../serviceinterface/ServiceInterfaceStream.h"
#include "../storagemanager/ConstStorageAccessor.h"
#include "../storagemanager/StorageManagerIF.h"
#include "../globalfunctions/arrayprinter.h"
ConstStorageAccessor::ConstStorageAccessor(store_address_t storeId):
@ -14,12 +15,7 @@ ConstStorageAccessor::ConstStorageAccessor(store_address_t storeId,
ConstStorageAccessor::~ConstStorageAccessor() {
if(deleteData and store != nullptr) {
ReturnValue_t result = store->deleteData(storeId);
if(result != HasReturnvaluesIF::RETURN_OK) {
// Configuration error.
sif::error << "ConstStorageAccessor::~ConstStorageAccessor: "
<< "Could not delete entry!" << std::endl;
}
store->deleteData(storeId);
}
}
@ -62,7 +58,8 @@ ReturnValue_t ConstStorageAccessor::getDataCopy(uint8_t *pointer,
return HasReturnvaluesIF::RETURN_FAILED;
}
if(size_ > maxSize) {
sif::error << "StorageAccessor: Supplied buffer not large enough" << std::endl;
sif::error << "StorageAccessor: Supplied buffer not large enough"
<< std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
std::copy(constDataPointer, constDataPointer + size_, pointer);