1
0
forked from fsfw/fsfw

datapool updates, fixes, pool read helper

This commit is contained in:
2020-12-28 17:55:19 +01:00
parent 426514b9a2
commit 91cb061da9
12 changed files with 191 additions and 92 deletions

View File

@ -54,7 +54,7 @@ public:
*/
LocalPoolDataSetBase(HasLocalDataPoolIF *hkOwner,
uint32_t setId, PoolVariableIF** registeredVariablesArray,
const size_t maxNumberOfVariables, bool noPeriodicHandling = false);
const size_t maxNumberOfVariables, bool periodicHandling = true);
/**
* @brief Constructor for users of local pool data.
@ -77,6 +77,16 @@ public:
*/
~LocalPoolDataSetBase();
/**
* If the data is pulled from different local data pools, every read and
* commit call should be mutex protected for thread safety.
* This can be specified with the second parameter.
* @param dataCreator
* @param protectEveryReadCommit
*/
void setReadCommitProtectionBehaviour(bool protectEveryReadCommit,
uint32_t mutexTimeout = 20);
void setValidityBufferGeneration(bool withValidityBuffer);
sid_t getSid() const;
@ -128,6 +138,7 @@ public:
protected:
sid_t sid;
uint32_t mutexTimeout = 20;
MutexIF* mutex = nullptr;
bool diagnostic = false;
@ -181,7 +192,7 @@ protected:
*/
ReturnValue_t unlockDataPool() override;
LocalDataPoolManager* hkManager;
LocalDataPoolManager* hkManager = nullptr;
/**
* Set n-th bit of a byte, with n being the position from 0