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>
|
2020-06-19 14:25:03 +02:00
|
|
|
#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,
|
2020-07-02 16:54:53 +02:00
|
|
|
const size_t maxNumberOfVariables):
|
2020-08-08 12:51:31 +02:00
|
|
|
LocalPoolDataSetBase(hkOwner,poolVarList.data(), maxNumberOfVariables) {
|
2020-07-02 16:54:53 +02:00
|
|
|
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;
|
2020-07-02 16:54:53 +02:00
|
|
|
return;
|
2020-06-19 03:03:17 +02:00
|
|
|
}
|
|
|
|
hkManager = hkOwner->getHkManagerHandle();
|
2020-05-17 01:17:11 +02:00
|
|
|
}
|
|
|
|
|
2020-07-02 16:54:53 +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) {
|
2020-07-02 16:54:53 +02:00
|
|
|
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;
|
2020-07-02 16:54:53 +02:00
|
|
|
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() {}
|
2020-06-19 14:25:03 +02:00
|
|
|
|