fsfw/datapoollocal/LocalDataSet.cpp
2020-08-08 12:51:31 +02:00

38 lines
1.3 KiB
C++

#include <framework/datapoollocal/LocalDataPoolManager.h>
#include <framework/datapoollocal/LocalDataSet.h>
#include <framework/serialize/SerializeAdapter.h>
#include <cmath>
#include <cstring>
LocalDataSet::LocalDataSet(HasLocalDataPoolIF *hkOwner,
const size_t maxNumberOfVariables):
LocalPoolDataSetBase(hkOwner,poolVarList.data(), maxNumberOfVariables) {
poolVarList.reserve(maxNumberOfVariables);
poolVarList.resize(maxNumberOfVariables);
if(hkOwner == nullptr) {
sif::error << "LocalDataSet::LocalDataSet: Owner can't be nullptr!"
<< std::endl;
return;
}
hkManager = hkOwner->getHkManagerHandle();
}
LocalDataSet::LocalDataSet(object_id_t ownerId,
const size_t maxNumberOfVariables):
LocalPoolDataSetBase(ownerId, poolVarList.data(), maxNumberOfVariables) {
poolVarList.reserve(maxNumberOfVariables);
poolVarList.resize(maxNumberOfVariables);
HasLocalDataPoolIF* hkOwner = objectManager->get<HasLocalDataPoolIF>(
ownerId);
if(hkOwner == nullptr) {
sif::error << "LocalDataSet::LocalDataSet: Owner can't be nullptr!"
<< std::endl;
return;
}
hkManager = hkOwner->getHkManagerHandle();
}
LocalDataSet::~LocalDataSet() {}