consistency changes
This commit is contained in:
parent
fdef8bc22b
commit
a4e0f15dac
@ -41,7 +41,8 @@ class PeriodicHousekeepingHelper;
|
||||
*
|
||||
* @ingroup data_pool
|
||||
*/
|
||||
class LocalPoolDataSetBase: public PoolDataSetBase,
|
||||
class LocalPoolDataSetBase:
|
||||
public PoolDataSetBase,
|
||||
public MarkChangedIF {
|
||||
friend class LocalPoolDataSetAttorney;
|
||||
friend class PeriodicHousekeepingHelper;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "LocalDataPoolManager.h"
|
||||
#include "LocalPoolObjectBase.h"
|
||||
#include "LocalDataPoolManager.h"
|
||||
#include "internal/HasLocalDpIFUserAttorney.h"
|
||||
#include "HasLocalDataPoolIF.h"
|
||||
|
||||
@ -47,10 +47,12 @@ LocalPoolObjectBase::LocalPoolObjectBase(object_id_t poolOwner, lp_id_t poolId,
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
//hkManager = hkOwner->getHkManagerHandle();
|
||||
AccessPoolManagerIF* poolManAccessor = HasLocalDpIFUserAttorney::getAccessorHandle(hkOwner);
|
||||
//hkManager = HasLocalDpIFUserAttorney::getHkManagerHandle(hkOwner);
|
||||
hkManager = poolManAccessor->getHkManagerHandle();
|
||||
|
||||
AccessPoolManagerIF* accessor = HasLocalDpIFUserAttorney::getAccessorHandle(hkOwner);
|
||||
if(accessor != nullptr) {
|
||||
hkManager = accessor->getHkManagerHandle();
|
||||
}
|
||||
|
||||
if(dataSet != nullptr) {
|
||||
dataSet->registerVariable(this);
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
#ifndef FSFW_DATAPOOLLOCAL_LOCALPOOLOBJECTBASE_H_
|
||||
#define FSFW_DATAPOOLLOCAL_LOCALPOOLOBJECTBASE_H_
|
||||
|
||||
#include <fsfw/datapoollocal/localPoolDefinitions.h>
|
||||
#include "MarkChangedIF.h"
|
||||
#include "localPoolDefinitions.h"
|
||||
|
||||
#include "../objectmanager/SystemObjectIF.h"
|
||||
#include "../datapool/PoolVariableIF.h"
|
||||
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||
@ -11,9 +12,13 @@ class LocalDataPoolManager;
|
||||
class DataSetIF;
|
||||
class HasLocalDataPoolIF;
|
||||
|
||||
/**
|
||||
* @brief This class serves as a non-template base for pool objects like pool variables
|
||||
* or pool vectors.
|
||||
*/
|
||||
class LocalPoolObjectBase: public PoolVariableIF,
|
||||
public HasReturnvaluesIF,
|
||||
public MarkChangedIF {
|
||||
public HasReturnvaluesIF,
|
||||
public MarkChangedIF {
|
||||
public:
|
||||
LocalPoolObjectBase(lp_id_t poolId,
|
||||
HasLocalDataPoolIF* hkOwner, DataSetIF* dataSet,
|
||||
@ -65,6 +70,4 @@ protected:
|
||||
ReturnValue_t error, bool read, object_id_t objectId, lp_id_t lpId);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* FSFW_DATAPOOLLOCAL_LOCALPOOLOBJECTBASE_H_ */
|
||||
|
@ -52,13 +52,13 @@ inline ReturnValue_t LocalPoolVariable<T>::readWithoutLock() {
|
||||
}
|
||||
|
||||
// Actually this should never happen..
|
||||
// if(poolEntry->address == nullptr) {
|
||||
// result = PoolVariableIF::INVALID_POOL_ENTRY;
|
||||
// object_id_t ownerObjectId = hkManager->getOwner()->getObjectId();
|
||||
// reportReadCommitError("LocalPoolVariable", result,
|
||||
// false, ownerObjectId, localPoolId);
|
||||
// return result;
|
||||
// }
|
||||
// if(poolEntry->address == nullptr) {
|
||||
// result = PoolVariableIF::INVALID_POOL_ENTRY;
|
||||
// object_id_t ownerObjectId = hkManager->getOwner()->getObjectId();
|
||||
// reportReadCommitError("LocalPoolVariable", result,
|
||||
// false, ownerObjectId, localPoolId);
|
||||
// return result;
|
||||
// }
|
||||
|
||||
this->value = *(poolEntry->getDataPtr());
|
||||
this->valid = poolEntry->getValid();
|
||||
|
@ -13,7 +13,8 @@
|
||||
*
|
||||
* 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 SharedDataSetIF {
|
||||
public:
|
||||
|
@ -27,9 +27,8 @@ public:
|
||||
* @param hkOwner
|
||||
* @param setId
|
||||
*/
|
||||
StaticLocalDataSet(HasLocalDataPoolIF* hkOwner,
|
||||
uint32_t setId): LocalPoolDataSetBase(hkOwner, setId, nullptr,
|
||||
NUM_VARIABLES) {
|
||||
StaticLocalDataSet(HasLocalDataPoolIF* hkOwner, uint32_t setId):
|
||||
LocalPoolDataSetBase(hkOwner, setId, nullptr, NUM_VARIABLES) {
|
||||
this->setContainer(poolVarList.data());
|
||||
}
|
||||
|
||||
@ -38,8 +37,7 @@ public:
|
||||
* @param hkOwner
|
||||
* @param setId
|
||||
*/
|
||||
StaticLocalDataSet(sid_t sid): LocalPoolDataSetBase(sid, nullptr,
|
||||
NUM_VARIABLES) {
|
||||
StaticLocalDataSet(sid_t sid): LocalPoolDataSetBase(sid, nullptr, NUM_VARIABLES) {
|
||||
this->setContainer(poolVarList.data());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user