fsfw/datapoollocal/SharedLocalDataSet.cpp

17 lines
588 B
C++
Raw Normal View History

2020-07-14 15:45:03 +02:00
#include <framework/datapoollocal/SharedLocalDataSet.h>
SharedLocalDataSet::SharedLocalDataSet(object_id_t objectId, object_id_t owner,
const size_t maxSize): SystemObject(objectId),
LocalDataSetBase(owner, nullptr, maxSize) {
this->setContainer(poolVarVector.data());
datasetLock = MutexFactory::instance()->createMutex();
}
ReturnValue_t SharedLocalDataSet::lockDataset(dur_millis_t mutexTimeout) {
return datasetLock->lockMutex(mutexTimeout);
}
ReturnValue_t SharedLocalDataSet::unlockDataset() {
return datasetLock->unlockMutex();
}