fsfw/datapoollocal/SharedLocalDataSet.cpp

17 lines
599 B
C++
Raw Normal View History

#include "SharedLocalDataSet.h"
2020-07-14 15:45:03 +02:00
SharedLocalDataSet::SharedLocalDataSet(object_id_t objectId, object_id_t owner,
const size_t maxSize): SystemObject(objectId),
2020-08-08 12:51:31 +02:00
LocalPoolDataSetBase(owner, nullptr, maxSize) {
2020-07-14 15:45:03 +02:00
this->setContainer(poolVarVector.data());
datasetLock = MutexFactory::instance()->createMutex();
}
ReturnValue_t SharedLocalDataSet::lockDataset(dur_millis_t mutexTimeout) {
2020-08-08 12:49:20 +02:00
return datasetLock->lockMutex(MutexIF::TimeoutType::WAITING, mutexTimeout);
2020-07-14 15:45:03 +02:00
}
ReturnValue_t SharedLocalDataSet::unlockDataset() {
return datasetLock->unlockMutex();
}