consistency changes

This commit is contained in:
Robin Müller 2021-01-13 12:41:24 +01:00
parent fdef8bc22b
commit a4e0f15dac
17 changed files with 1099 additions and 1094 deletions

View File

@ -41,7 +41,8 @@ class PeriodicHousekeepingHelper;
* *
* @ingroup data_pool * @ingroup data_pool
*/ */
class LocalPoolDataSetBase: public PoolDataSetBase, class LocalPoolDataSetBase:
public PoolDataSetBase,
public MarkChangedIF { public MarkChangedIF {
friend class LocalPoolDataSetAttorney; friend class LocalPoolDataSetAttorney;
friend class PeriodicHousekeepingHelper; friend class PeriodicHousekeepingHelper;

View File

@ -1,5 +1,5 @@
#include "LocalDataPoolManager.h"
#include "LocalPoolObjectBase.h" #include "LocalPoolObjectBase.h"
#include "LocalDataPoolManager.h"
#include "internal/HasLocalDpIFUserAttorney.h" #include "internal/HasLocalDpIFUserAttorney.h"
#include "HasLocalDataPoolIF.h" #include "HasLocalDataPoolIF.h"
@ -47,10 +47,12 @@ LocalPoolObjectBase::LocalPoolObjectBase(object_id_t poolOwner, lp_id_t poolId,
#endif #endif
return; return;
} }
//hkManager = hkOwner->getHkManagerHandle();
AccessPoolManagerIF* poolManAccessor = HasLocalDpIFUserAttorney::getAccessorHandle(hkOwner); AccessPoolManagerIF* accessor = HasLocalDpIFUserAttorney::getAccessorHandle(hkOwner);
//hkManager = HasLocalDpIFUserAttorney::getHkManagerHandle(hkOwner); if(accessor != nullptr) {
hkManager = poolManAccessor->getHkManagerHandle(); hkManager = accessor->getHkManagerHandle();
}
if(dataSet != nullptr) { if(dataSet != nullptr) {
dataSet->registerVariable(this); dataSet->registerVariable(this);
} }

View File

@ -1,8 +1,9 @@
#ifndef FSFW_DATAPOOLLOCAL_LOCALPOOLOBJECTBASE_H_ #ifndef FSFW_DATAPOOLLOCAL_LOCALPOOLOBJECTBASE_H_
#define FSFW_DATAPOOLLOCAL_LOCALPOOLOBJECTBASE_H_ #define FSFW_DATAPOOLLOCAL_LOCALPOOLOBJECTBASE_H_
#include <fsfw/datapoollocal/localPoolDefinitions.h>
#include "MarkChangedIF.h" #include "MarkChangedIF.h"
#include "localPoolDefinitions.h"
#include "../objectmanager/SystemObjectIF.h" #include "../objectmanager/SystemObjectIF.h"
#include "../datapool/PoolVariableIF.h" #include "../datapool/PoolVariableIF.h"
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
@ -11,6 +12,10 @@ class LocalDataPoolManager;
class DataSetIF; class DataSetIF;
class HasLocalDataPoolIF; class HasLocalDataPoolIF;
/**
* @brief This class serves as a non-template base for pool objects like pool variables
* or pool vectors.
*/
class LocalPoolObjectBase: public PoolVariableIF, class LocalPoolObjectBase: public PoolVariableIF,
public HasReturnvaluesIF, public HasReturnvaluesIF,
public MarkChangedIF { public MarkChangedIF {
@ -65,6 +70,4 @@ protected:
ReturnValue_t error, bool read, object_id_t objectId, lp_id_t lpId); ReturnValue_t error, bool read, object_id_t objectId, lp_id_t lpId);
}; };
#endif /* FSFW_DATAPOOLLOCAL_LOCALPOOLOBJECTBASE_H_ */ #endif /* FSFW_DATAPOOLLOCAL_LOCALPOOLOBJECTBASE_H_ */

View File

@ -13,7 +13,8 @@
* *
* TODO: override and protect read, commit and some other calls used by pool manager. * TODO: override and protect read, commit and some other calls used by pool manager.
*/ */
class SharedLocalDataSet: public SystemObject, class SharedLocalDataSet:
public SystemObject,
public LocalPoolDataSetBase, public LocalPoolDataSetBase,
public SharedDataSetIF { public SharedDataSetIF {
public: public:

View File

@ -27,9 +27,8 @@ public:
* @param hkOwner * @param hkOwner
* @param setId * @param setId
*/ */
StaticLocalDataSet(HasLocalDataPoolIF* hkOwner, StaticLocalDataSet(HasLocalDataPoolIF* hkOwner, uint32_t setId):
uint32_t setId): LocalPoolDataSetBase(hkOwner, setId, nullptr, LocalPoolDataSetBase(hkOwner, setId, nullptr, NUM_VARIABLES) {
NUM_VARIABLES) {
this->setContainer(poolVarList.data()); this->setContainer(poolVarList.data());
} }
@ -38,8 +37,7 @@ public:
* @param hkOwner * @param hkOwner
* @param setId * @param setId
*/ */
StaticLocalDataSet(sid_t sid): LocalPoolDataSetBase(sid, nullptr, StaticLocalDataSet(sid_t sid): LocalPoolDataSetBase(sid, nullptr, NUM_VARIABLES) {
NUM_VARIABLES) {
this->setContainer(poolVarList.data()); this->setContainer(poolVarList.data());
} }