added new setter function

This commit is contained in:
Robin Müller 2020-09-10 21:05:50 +02:00
parent 2d2d0de35c
commit 71125c075a
2 changed files with 16 additions and 1 deletions

View File

@ -190,4 +190,11 @@ bool LocalPoolDataSetBase::isValid() const {
return this->valid;
}
void LocalPoolDataSetBase::setValidity(bool valid, bool setEntriesRecursively) {
if(setEntriesRecursively) {
for(size_t idx = 0; idx < this->getFillCount(); idx++) {
registeredVariables[idx] -> setValid(valid);
}
}
this->valid = valid;
}

View File

@ -91,6 +91,13 @@ public:
size_t* size, size_t maxSize,
SerializeIF::Endianness streamEndianness) const;
/**
* Set the dataset valid or invalid
* @param setEntriesRecursively
* If this is true, all contained datasets will also be set recursively.
*/
void setValidity(bool valid, bool setEntriesRecursively);
bool isValid() const override;
protected:
@ -131,4 +138,5 @@ private:
};
#endif /* FSFW_DATAPOOLLOCAL_LOCALPOOLDATASETBASE_H_ */