DataSetBase not bound to max size anymore
This commit is contained in:
@ -5,20 +5,30 @@
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
LocalDataSet::LocalDataSet(OwnsLocalDataPoolIF *hkOwner): DataSetBase() {
|
||||
LocalDataSet::LocalDataSet(OwnsLocalDataPoolIF *hkOwner,
|
||||
const size_t maxNumberOfVariables):
|
||||
DataSetBase(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): DataSetBase() {
|
||||
LocalDataSet::LocalDataSet(object_id_t ownerId,
|
||||
const size_t maxNumberOfVariables):
|
||||
DataSetBase(poolVarList.data(), maxNumberOfVariables) {
|
||||
poolVarList.reserve(maxNumberOfVariables);
|
||||
poolVarList.resize(maxNumberOfVariables);
|
||||
OwnsLocalDataPoolIF* hkOwner = objectManager->get<OwnsLocalDataPoolIF>(
|
||||
ownerId);
|
||||
if(hkOwner == nullptr) {
|
||||
sif::error << "LocalDataSet::LocalDataSet: Owner can't be nullptr!"
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
hkManager = hkOwner->getHkManagerHandle();
|
||||
}
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <framework/datapoollocal/OwnsLocalDataPoolIF.h>
|
||||
#include <framework/serialize/SerializeIF.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
class LocalDataPoolManager;
|
||||
|
||||
/**
|
||||
@ -35,7 +37,8 @@ public:
|
||||
* The constructor simply sets the fill_count to zero and sets
|
||||
* the state to "uninitialized".
|
||||
*/
|
||||
LocalDataSet(OwnsLocalDataPoolIF* hkOwner);
|
||||
LocalDataSet(OwnsLocalDataPoolIF *hkOwner,
|
||||
const size_t maxNumberOfVariables);
|
||||
|
||||
/**
|
||||
* @brief Constructor for users of local pool data. The passed pool
|
||||
@ -43,7 +46,8 @@ public:
|
||||
* The constructor simply sets the fill_count to zero and sets
|
||||
* the state to "uninitialized".
|
||||
*/
|
||||
LocalDataSet(object_id_t ownerId);
|
||||
LocalDataSet(object_id_t ownerId,
|
||||
const size_t maxNumberOfVariables);
|
||||
|
||||
/**
|
||||
* @brief The destructor automatically manages writing the valid
|
||||
@ -102,6 +106,8 @@ private:
|
||||
* (most significant bit) to 7 (least significant bit)
|
||||
*/
|
||||
void bitSetter(uint8_t* byte, uint8_t position) const;
|
||||
|
||||
std::vector<PoolVariableIF*> poolVarList;
|
||||
};
|
||||
|
||||
#endif /* FRAMEWORK_DATAPOOLLOCAL_LOCALDATASET_H_ */
|
||||
|
6
datapoollocal/StaticLocalDataSet.cpp
Normal file
6
datapoollocal/StaticLocalDataSet.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include <framework/datapoollocal/StaticLocalDataSet.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
11
datapoollocal/StaticLocalDataSet.h
Normal file
11
datapoollocal/StaticLocalDataSet.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef FRAMEWORK_DATAPOOLLOCAL_STATICLOCALDATASET_H_
|
||||
#define FRAMEWORK_DATAPOOLLOCAL_STATICLOCALDATASET_H_
|
||||
#include <framework/datapool/DataSetBase.h>
|
||||
|
||||
|
||||
class StaticLocalDataSet: public DataSetBase {
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* FRAMEWORK_DATAPOOLLOCAL_STATICLOCALDATASET_H_ */
|
Reference in New Issue
Block a user