consistency changes
This commit is contained in:
parent
fdef8bc22b
commit
a4e0f15dac
@ -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;
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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,9 +12,13 @@ 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 {
|
||||||
public:
|
public:
|
||||||
LocalPoolObjectBase(lp_id_t poolId,
|
LocalPoolObjectBase(lp_id_t poolId,
|
||||||
HasLocalDataPoolIF* hkOwner, DataSetIF* dataSet,
|
HasLocalDataPoolIF* hkOwner, DataSetIF* dataSet,
|
||||||
@ -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_ */
|
||||||
|
@ -52,13 +52,13 @@ inline ReturnValue_t LocalPoolVariable<T>::readWithoutLock() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Actually this should never happen..
|
// Actually this should never happen..
|
||||||
// if(poolEntry->address == nullptr) {
|
// if(poolEntry->address == nullptr) {
|
||||||
// result = PoolVariableIF::INVALID_POOL_ENTRY;
|
// result = PoolVariableIF::INVALID_POOL_ENTRY;
|
||||||
// object_id_t ownerObjectId = hkManager->getOwner()->getObjectId();
|
// object_id_t ownerObjectId = hkManager->getOwner()->getObjectId();
|
||||||
// reportReadCommitError("LocalPoolVariable", result,
|
// reportReadCommitError("LocalPoolVariable", result,
|
||||||
// false, ownerObjectId, localPoolId);
|
// false, ownerObjectId, localPoolId);
|
||||||
// return result;
|
// return result;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this->value = *(poolEntry->getDataPtr());
|
this->value = *(poolEntry->getDataPtr());
|
||||||
this->valid = poolEntry->getValid();
|
this->valid = poolEntry->getValid();
|
||||||
|
@ -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:
|
||||||
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user