fsfw/datapoolglob/GlobalDataSet.cpp

43 lines
1.1 KiB
C++
Raw Normal View History

2020-05-17 01:17:11 +02:00
#include <framework/datapoolglob/GlobalDataPool.h>
2020-05-17 23:41:28 +02:00
#include <framework/datapoolglob/GlobalDataSet.h>
2020-05-17 01:17:11 +02:00
#include <framework/serviceinterface/ServiceInterfaceStream.h>
2020-05-17 23:41:28 +02:00
GlobDataSet::GlobDataSet(): DataSetBase() {}
2020-05-17 01:17:11 +02:00
2020-05-17 23:41:28 +02:00
// Don't do anything with your variables, they are dead already!
// (Destructor is already called)
GlobDataSet::~GlobDataSet() {}
2020-05-17 01:17:11 +02:00
2020-06-05 20:33:57 +02:00
ReturnValue_t GlobDataSet::commit(bool valid, uint32_t lockTimeout) {
2020-05-17 01:17:11 +02:00
setEntriesValid(valid);
setSetValid(valid);
2020-06-05 20:33:57 +02:00
return commit(lockTimeout);
2020-05-17 01:17:11 +02:00
}
2020-06-05 20:33:57 +02:00
ReturnValue_t GlobDataSet::commit(uint32_t lockTimeout) {
return DataSetBase::commit(lockTimeout);
2020-05-17 01:17:11 +02:00
}
ReturnValue_t GlobDataSet::unlockDataPool() {
2020-06-05 20:33:57 +02:00
return glob::dataPool.unlockDataPool();
2020-05-17 01:17:11 +02:00
}
2020-06-05 20:33:57 +02:00
ReturnValue_t GlobDataSet::lockDataPool(uint32_t timeoutMs) {
return glob::dataPool.lockDataPool(timeoutMs);
2020-05-17 01:17:11 +02:00
}
void GlobDataSet::setEntriesValid(bool valid) {
2020-05-17 23:41:28 +02:00
for (uint16_t count = 0; count < fillCount; count++) {
2020-05-17 01:17:11 +02:00
if (registeredVariables[count]->getReadWriteMode()
!= PoolVariableIF::VAR_READ) {
registeredVariables[count]->setValid(valid);
}
}
}
void GlobDataSet::setSetValid(bool valid) {
this->valid = valid;
}
2020-05-17 23:41:28 +02:00