store accessor small changes

This commit is contained in:
Robin Müller 2020-09-29 14:42:48 +02:00
parent cef84b13d9
commit 1ff85c88b2
9 changed files with 41 additions and 33 deletions

View File

@ -1,6 +1,7 @@
#include "ConstStorageAccessor.h"
#include "StorageManagerIF.h"
#include "../serviceinterface/ServiceInterfaceStream.h" #include "../serviceinterface/ServiceInterfaceStream.h"
#include "../storagemanager/ConstStorageAccessor.h"
#include "../storagemanager/StorageManagerIF.h"
#include "../globalfunctions/arrayprinter.h" #include "../globalfunctions/arrayprinter.h"
ConstStorageAccessor::ConstStorageAccessor(store_address_t storeId): ConstStorageAccessor::ConstStorageAccessor(store_address_t storeId):

View File

@ -1,7 +1,7 @@
#ifndef FRAMEWORK_STORAGEMANAGER_CONSTSTORAGEACCESSOR_H_ #ifndef FSFW_STORAGEMANAGER_CONSTSTORAGEACCESSOR_H_
#define FRAMEWORK_STORAGEMANAGER_CONSTSTORAGEACCESSOR_H_ #define FSFW_STORAGEMANAGER_CONSTSTORAGEACCESSOR_H_
#include "../storagemanager/storeAddress.h" #include "storeAddress.h"
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include <cstddef> #include <cstddef>
@ -113,4 +113,4 @@ protected:
}; };
#endif /* FRAMEWORK_STORAGEMANAGER_CONSTSTORAGEACCESSOR_H_ */ #endif /* FSFW_STORAGEMANAGER_CONSTSTORAGEACCESSOR_H_ */

View File

@ -1,5 +1,5 @@
#ifndef FRAMEWORK_STORAGEMANAGER_LOCALPOOL_H_ #ifndef FSFW_STORAGEMANAGER_LOCALPOOL_H_
#define FRAMEWORK_STORAGEMANAGER_LOCALPOOL_H_ #define FSFW_STORAGEMANAGER_LOCALPOOL_H_
#include "StorageManagerIF.h" #include "StorageManagerIF.h"
#include "../objectmanager/SystemObject.h" #include "../objectmanager/SystemObject.h"
@ -187,4 +187,4 @@ private:
#include "LocalPool.tpp" #include "LocalPool.tpp"
#endif /* FRAMEWORK_STORAGEMANAGER_LOCALPOOL_H_ */ #endif /* FSFW_STORAGEMANAGER_LOCALPOOL_H_ */

View File

@ -1,7 +1,7 @@
#ifndef FRAMEWORK_STORAGEMANAGER_LOCALPOOL_TPP_ #ifndef FSFW_STORAGEMANAGER_LOCALPOOL_TPP_
#define FRAMEWORK_STORAGEMANAGER_LOCALPOOL_TPP_ #define FSFW_STORAGEMANAGER_LOCALPOOL_TPP_
#ifndef FRAMEWORK_STORAGEMANAGER_LOCALPOOL_H_ #ifndef FSFW_STORAGEMANAGER_LOCALPOOL_H_
#error Include LocalPool.h before LocalPool.tpp! #error Include LocalPool.h before LocalPool.tpp!
#endif #endif
@ -301,4 +301,4 @@ inline ReturnValue_t LocalPool<NUMBER_OF_POOLS>::initialize() {
return RETURN_OK; return RETURN_OK;
} }
#endif #endif /* FSFW_STORAGEMANAGER_LOCALPOOL_TPP_ */

View File

@ -1,9 +1,9 @@
#ifndef FRAMEWORK_STORAGEMANAGER_POOLMANAGER_H_ #ifndef FSFW_STORAGEMANAGER_POOLMANAGER_H_
#define FRAMEWORK_STORAGEMANAGER_POOLMANAGER_H_ #define FSFW_STORAGEMANAGER_POOLMANAGER_H_
#include "LocalPool.h" #include "LocalPool.h"
#include "StorageAccessor.h"
#include "../ipc/MutexHelper.h" #include "../ipc/MutexHelper.h"
#include "../storagemanager/StorageAccessor.h"
/** /**
@ -20,11 +20,16 @@ public:
const uint16_t element_sizes[NUMBER_OF_POOLS], const uint16_t element_sizes[NUMBER_OF_POOLS],
const uint16_t n_elements[NUMBER_OF_POOLS]); const uint16_t n_elements[NUMBER_OF_POOLS]);
//! @brief In the PoolManager's destructor all allocated memory is freed. /**
* @brief In the PoolManager's destructor all allocated memory
* is freed.
*/
virtual ~PoolManager(); virtual ~PoolManager();
//! @brief LocalPool overrides for thread-safety. Decorator function which /**
//! wraps LocalPool calls with a mutex protection. * @brief LocalPool overrides for thread-safety. Decorator function
* which wraps LocalPool calls with a mutex protection.
*/
ReturnValue_t deleteData(store_address_t) override; ReturnValue_t deleteData(store_address_t) override;
ReturnValue_t deleteData(uint8_t* buffer, size_t size, ReturnValue_t deleteData(uint8_t* buffer, size_t size,
store_address_t* storeId = nullptr) override; store_address_t* storeId = nullptr) override;
@ -47,4 +52,4 @@ protected:
#include "PoolManager.tpp" #include "PoolManager.tpp"
#endif /* POOLMANAGER_H_ */ #endif /* FSFW_STORAGEMANAGER_POOLMANAGER_H_ */

View File

@ -1,7 +1,7 @@
#ifndef FRAMEWORK_STORAGEMANAGER_POOLMANAGER_TPP_ #ifndef FRAMEWORK_STORAGEMANAGER_POOLMANAGER_TPP_
#define FRAMEWORK_STORAGEMANAGER_POOLMANAGER_TPP_ #define FRAMEWORK_STORAGEMANAGER_POOLMANAGER_TPP_
#ifndef FRAMEWORK_STORAGEMANAGER_POOLMANAGER_H_ #ifndef FSFW_STORAGEMANAGER_POOLMANAGER_H_
#error Include PoolManager.h before PoolManager.tpp! #error Include PoolManager.h before PoolManager.tpp!
#endif #endif
@ -48,4 +48,4 @@ inline ReturnValue_t PoolManager<NUMBER_OF_POOLS>::deleteData(uint8_t* buffer,
} }
#endif #endif /* FRAMEWORK_STORAGEMANAGER_POOLMANAGER_TPP_ */

View File

@ -1,5 +1,5 @@
#include "../storagemanager/StorageAccessor.h" #include "StorageAccessor.h"
#include "../storagemanager/StorageManagerIF.h" #include "StorageManagerIF.h"
#include "../serviceinterface/ServiceInterfaceStream.h" #include "../serviceinterface/ServiceInterfaceStream.h"
StorageAccessor::StorageAccessor(store_address_t storeId): StorageAccessor::StorageAccessor(store_address_t storeId):

View File

@ -1,7 +1,7 @@
#ifndef FRAMEWORK_STORAGEMANAGER_STORAGEACCESSOR_H_ #ifndef FSFW_STORAGEMANAGER_STORAGEACCESSOR_H_
#define FRAMEWORK_STORAGEMANAGER_STORAGEACCESSOR_H_ #define FSFW_STORAGEMANAGER_STORAGEACCESSOR_H_
#include "../storagemanager/ConstStorageAccessor.h" #include "ConstStorageAccessor.h"
class StorageManagerIF; class StorageManagerIF;
@ -42,4 +42,4 @@ private:
void assignConstPointer(); void assignConstPointer();
}; };
#endif /* TEST_PROTOTYPES_STORAGEACCESSOR_H_ */ #endif /* FSFW_STORAGEMANAGER_STORAGEACCESSOR_H_ */

View File

@ -1,10 +1,12 @@
#ifndef STORAGEMANAGERIF_H_H #ifndef FSFW_STORAGEMANAGER_STORAGEMANAGERIF_H_
#define STORAGEMANAGERIF_H_H #define FSFW_STORAGEMANAGER_STORAGEMANAGERIF_H_
#include "StorageAccessor.h"
#include "storeAddress.h"
#include "../events/Event.h" #include "../events/Event.h"
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include "../storagemanager/StorageAccessor.h"
#include "../storagemanager/storeAddress.h"
#include <utility> #include <utility>
#include <cstddef> #include <cstddef>
@ -164,4 +166,4 @@ public:
virtual void clearStore() = 0; virtual void clearStore() = 0;
}; };
#endif /* STORAGEMANAGERIF_H_ */ #endif /* FSFW_STORAGEMANAGER_STORAGEMANAGERIF_H_ */