action
container
contrib
controller
coordinates
datalinklayer
datapool
datapoollocal
internal
AccessLocalPoolF.h
CMakeLists.txt
HasLocalDataPoolIF.h
LocalDataPoolManager.cpp
LocalDataPoolManager.h
LocalDataSet.cpp
LocalDataSet.h
LocalPoolDataSetBase.cpp
LocalPoolDataSetBase.h
LocalPoolObjectBase.cpp
LocalPoolObjectBase.h
LocalPoolVariable.h
LocalPoolVariable.tpp
LocalPoolVector.h
LocalPoolVector.tpp
MarkChangedIF.h
ProvidesDataPoolSubscriptionIF.h
SharedLocalDataSet.cpp
SharedLocalDataSet.h
StaticLocalDataSet.h
datapoollocal.h
localPoolDefinitions.h
defaultcfg
devicehandlers
doc
events
fdir
globalfunctions
health
housekeeping
internalError
ipc
logo
memory
modes
monitoring
objectmanager
osal
parameters
power
pus
returnvalues
rmap
serialize
serviceinterface
storagemanager
subsystem
tasks
tcdistribution
thermal
timemanager
tmstorage
tmtcpacket
tmtcservices
unittest
.gitignore
.gitmodules
CHANGELOG
CMakeLists.txt
FSFWVersion.h
LICENSE
NOTICE
README.md
fsfw.mk
platform.h
39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
#ifndef FSFW_DATAPOOLLOCAL_SHAREDLOCALDATASET_H_
|
|
#define FSFW_DATAPOOLLOCAL_SHAREDLOCALDATASET_H_
|
|
|
|
#include "LocalPoolDataSetBase.h"
|
|
#include "../datapool/SharedDataSetIF.h"
|
|
#include "../objectmanager/SystemObject.h"
|
|
#include <vector>
|
|
|
|
/**
|
|
* This local dataset variation can be used if the dataset is used concurrently across
|
|
* multiple threads. It provides a lock in addition to all other functionalities provided
|
|
* by the LocalPoolDataSetBase class.
|
|
*
|
|
* The user is completely responsible for lockingand unlocking the dataset when using the
|
|
* shared dataset.
|
|
*/
|
|
class SharedLocalDataSet:
|
|
public SystemObject,
|
|
public LocalPoolDataSetBase,
|
|
public SharedDataSetIF {
|
|
public:
|
|
SharedLocalDataSet(object_id_t objectId, HasLocalDataPoolIF* owner, uint32_t setId,
|
|
const size_t maxSize);
|
|
SharedLocalDataSet(object_id_t objectId, sid_t sid, const size_t maxSize);
|
|
|
|
virtual~ SharedLocalDataSet();
|
|
|
|
ReturnValue_t lockDataset(MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING,
|
|
dur_millis_t mutexTimeout = 20) override;
|
|
ReturnValue_t unlockDataset() override;
|
|
private:
|
|
|
|
MutexIF* datasetLock = nullptr;
|
|
std::vector<PoolVariableIF*> poolVarVector;
|
|
};
|
|
|
|
|
|
#endif /* FSFW_DATAPOOLLOCAL_SHAREDLOCALDATASET_H_ */
|