rework/restructuring

This commit is contained in:
Robin Müller 2020-09-06 14:57:05 +02:00
parent 50ae50d286
commit 673af26472
9 changed files with 29 additions and 24 deletions

View File

@ -1,5 +1,5 @@
#ifndef DATASETIF_H_ #ifndef FSFW_DATAPOOL_DATASETIF_H_
#define DATASETIF_H_ #define FSFW_DATAPOOL_DATASETIF_H_
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include "../timemanager/Clock.h" #include "../timemanager/Clock.h"
@ -34,7 +34,6 @@ public:
*/ */
virtual ~DataSetIF() {} virtual ~DataSetIF() {}
/** /**
* @brief This operation provides a method to register local data pool * @brief This operation provides a method to register local data pool
* variables to register in a data set by passing itself * variables to register in a data set by passing itself
@ -45,4 +44,4 @@ public:
virtual uint16_t getFillCount() const = 0; virtual uint16_t getFillCount() const = 0;
}; };
#endif /* FRAMEWORK_DATAPOOL_DATASETIF_H_ */ #endif /* FSFW_DATAPOOL_DATASETIF_H_ */

View File

@ -3,6 +3,10 @@
#include "DataSetIF.h" #include "DataSetIF.h"
/**
* @brief Extendes the DataSetIF by adding abstract functions to lock
* and unlock a data pool and read/commit semantics.
*/
class PoolDataSetIF: public DataSetIF { class PoolDataSetIF: public DataSetIF {
public: public:
virtual~ PoolDataSetIF() {}; virtual~ PoolDataSetIF() {};

View File

@ -1,5 +1,5 @@
#ifndef POOLVARLIST_H_ #ifndef FSFW_DATAPOOL_POOLVARLIST_H_
#define POOLVARLIST_H_ #define FSFW_DATAPOOL_POOLVARLIST_H_
#include "../datapool/PoolVariableIF.h" #include "../datapool/PoolVariableIF.h"
#include "../datapoolglob/GlobalPoolVariable.h" #include "../datapoolglob/GlobalPoolVariable.h"
@ -8,7 +8,8 @@ class PoolVarList {
private: private:
GlobPoolVar<T> variables[n_var]; GlobPoolVar<T> variables[n_var];
public: public:
PoolVarList( const uint32_t set_id[n_var], DataSetIF* dataSet, PoolVariableIF::ReadWriteMode_t setReadWriteMode ) { PoolVarList( const uint32_t set_id[n_var], DataSetIF* dataSet,
PoolVariableIF::ReadWriteMode_t setReadWriteMode ) {
//I really should have a look at the new init list c++ syntax. //I really should have a look at the new init list c++ syntax.
if (dataSet == NULL) { if (dataSet == NULL) {
return; return;
@ -25,4 +26,4 @@ public:
#endif /* POOLVARLIST_H_ */ #endif /* FSFW_DATAPOOL_POOLVARLIST_H_ */

View File

@ -1,5 +1,5 @@
#ifndef FRAMEWORK_DATAPOOL_POOLVARIABLEIF_H_ #ifndef FSFW_DATAPOOL_POOLVARIABLEIF_H_
#define FRAMEWORK_DATAPOOL_POOLVARIABLEIF_H_ #define FSFW_DATAPOOL_POOLVARIABLEIF_H_
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include "../serialize/SerializeIF.h" #include "../serialize/SerializeIF.h"
@ -96,4 +96,4 @@ protected:
using pool_rwm_t = PoolVariableIF::ReadWriteMode_t; using pool_rwm_t = PoolVariableIF::ReadWriteMode_t;
#endif /* POOLVARIABLEIF_H_ */ #endif /* FSFW_DATAPOOL_POOLVARIABLEIF_H_ */

View File

@ -1,4 +1,4 @@
#include "../datapool/ControllerSet.h" #include <fsfw/datapoolglob/ControllerSet.h>
ControllerSet::ControllerSet() { ControllerSet::ControllerSet() {

View File

@ -1,5 +1,5 @@
#ifndef CONTROLLERSET_H_ #ifndef FSFW_DATAPOOLGLOB_CONTROLLERSET_H_
#define CONTROLLERSET_H_ #define FSFW_DATAPOOLGLOB_CONTROLLERSET_H_
#include "../datapoolglob/GlobalDataSet.h" #include "../datapoolglob/GlobalDataSet.h"
@ -12,4 +12,4 @@ public:
void setInvalid(); void setInvalid();
}; };
#endif /* CONTROLLERSET_H_ */ #endif /* FSFW_DATAPOOLGLOB_CONTROLLERSET_H_ */

View File

@ -1,5 +1,5 @@
#include "../datapoollocal/LocalDataPoolManager.h" #include "LocalDataPoolManager.h"
#include "../datapoollocal/LocalDataSet.h" #include "LocalPoolDataSetBase.h"
#include "../housekeeping/AcceptsHkPacketsIF.h" #include "../housekeeping/AcceptsHkPacketsIF.h"
#include "../ipc/MutexFactory.h" #include "../ipc/MutexFactory.h"
#include "../ipc/MutexHelper.h" #include "../ipc/MutexHelper.h"
@ -185,7 +185,7 @@ ReturnValue_t LocalDataPoolManager::generateHousekeepingPacket(sid_t sid,
" Set ID not found or dataset not assigned!" << std::endl; " Set ID not found or dataset not assigned!" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;
} }
sif::info << "hk gen called" << std::endl;
store_address_t storeId; store_address_t storeId;
HousekeepingPacketDownlink hkPacket(sid, collectionInterval, HousekeepingPacketDownlink hkPacket(sid, collectionInterval,
dataSetToSerialize->getFillCount(), dataSetToSerialize); dataSetToSerialize->getFillCount(), dataSetToSerialize);

View File

@ -1,14 +1,14 @@
#ifndef FRAMEWORK_DATAPOOLLOCAL_LOCALDATAPOOLMANAGER_H_ #ifndef FRAMEWORK_DATAPOOLLOCAL_LOCALDATAPOOLMANAGER_H_
#define FRAMEWORK_DATAPOOLLOCAL_LOCALDATAPOOLMANAGER_H_ #define FRAMEWORK_DATAPOOLLOCAL_LOCALDATAPOOLMANAGER_H_
#include "HasLocalDataPoolIF.h"
#include "../housekeeping/HousekeepingPacketDownlink.h" #include "../housekeeping/HousekeepingPacketDownlink.h"
#include "../housekeeping/HousekeepingMessage.h"
#include "../datapool/DataSetIF.h" #include "../datapool/DataSetIF.h"
#include "../datapool/PoolEntry.h"
#include "../objectmanager/SystemObjectIF.h" #include "../objectmanager/SystemObjectIF.h"
#include "../ipc/MutexIF.h" #include "../ipc/MutexIF.h"
#include "../housekeeping/HousekeepingMessage.h"
#include "../datapool/PoolEntry.h"
#include "../datapoollocal/HasLocalDataPoolIF.h"
#include "../ipc/CommandMessage.h" #include "../ipc/CommandMessage.h"
#include "../ipc/MessageQueueIF.h" #include "../ipc/MessageQueueIF.h"
#include "../ipc/MutexHelper.h" #include "../ipc/MutexHelper.h"

View File

@ -1,7 +1,8 @@
#ifndef FRAMEWORK_HOUSEKEEPING_HOUSEKEEPINGPACKETDOWNLINK_H_ #ifndef FSFW_HOUSEKEEPING_HOUSEKEEPINGPACKETDOWNLINK_H_
#define FRAMEWORK_HOUSEKEEPING_HOUSEKEEPINGPACKETDOWNLINK_H_ #define FSFW_HOUSEKEEPING_HOUSEKEEPINGPACKETDOWNLINK_H_
#include "../datapoollocal/LocalPoolDataSetBase.h" #include "../datapoollocal/LocalPoolDataSetBase.h"
#include "../housekeeping/HousekeepingMessage.h" #include "../housekeeping/HousekeepingMessage.h"
#include "../serialize/SerialLinkedListAdapter.h" #include "../serialize/SerialLinkedListAdapter.h"
#include "../storagemanager/StorageManagerIF.h" #include "../storagemanager/StorageManagerIF.h"