fsfw/datapoollocal/LocalDataSet.cpp

38 lines
1.3 KiB
C++
Raw Normal View History

2020-06-07 02:22:18 +02:00
#include <framework/datapoollocal/LocalDataPoolManager.h>
2020-05-17 01:17:11 +02:00
#include <framework/datapoollocal/LocalDataSet.h>
#include <framework/serialize/SerializeAdapter.h>
2020-05-17 01:17:11 +02:00
2020-06-19 03:03:17 +02:00
#include <cmath>
#include <cstring>
2020-07-09 00:59:10 +02:00
LocalDataSet::LocalDataSet(HasLocalDataPoolIF *hkOwner,
const size_t maxNumberOfVariables):
2020-08-08 12:51:31 +02:00
LocalPoolDataSetBase(hkOwner,poolVarList.data(), maxNumberOfVariables) {
poolVarList.reserve(maxNumberOfVariables);
poolVarList.resize(maxNumberOfVariables);
2020-06-19 03:03:17 +02:00
if(hkOwner == nullptr) {
sif::error << "LocalDataSet::LocalDataSet: Owner can't be nullptr!"
<< std::endl;
return;
2020-06-19 03:03:17 +02:00
}
hkManager = hkOwner->getHkManagerHandle();
2020-05-17 01:17:11 +02:00
}
LocalDataSet::LocalDataSet(object_id_t ownerId,
const size_t maxNumberOfVariables):
2020-08-08 12:51:31 +02:00
LocalPoolDataSetBase(ownerId, poolVarList.data(), maxNumberOfVariables) {
poolVarList.reserve(maxNumberOfVariables);
poolVarList.resize(maxNumberOfVariables);
2020-07-09 00:59:10 +02:00
HasLocalDataPoolIF* hkOwner = objectManager->get<HasLocalDataPoolIF>(
2020-06-19 03:03:17 +02:00
ownerId);
if(hkOwner == nullptr) {
sif::error << "LocalDataSet::LocalDataSet: Owner can't be nullptr!"
<< std::endl;
return;
2020-06-19 03:03:17 +02:00
}
hkManager = hkOwner->getHkManagerHandle();
2020-05-17 01:17:11 +02:00
}
2020-08-08 12:49:20 +02:00
LocalDataSet::~LocalDataSet() {}