fsfw/src/fsfw/datapool/TemplateSet.h
Ulrich Mohr d766469f1e
Some checks failed
fsfw/fsfw/pipeline/head There was a failure building this commit
working on HK and Dataset TM
2023-07-11 14:57:17 +02:00

25 lines
764 B
C++

#pragma once
#include "Dataset.h"
//TODO use object_id_t
template <typename HkIDs>
class TemplateSet : public Dataset {
public:
#ifdef FSFW_INTROSPECTION
TemplateSet(HasDatapoolIF* owner, HkIDs id, bool allowUserCommit)
: Dataset(owner, allowUserCommit) {
setEnum(&id);
owner->getDatapoolHelper()->registerSet(this);
}
TemplateSet(uint32_t owner_id, HkIDs id) : Dataset(owner_id) { setEnum(&id); }
#else
TemplateSet(HasDatapoolIF* owner, HkIDs id, bool allowUserCommit)
: Dataset(owner, static_cast<DataSetId_t>(id), allowUserCommit) {
owner->getDatapoolHelper()->registerSet(this);
}
TemplateSet(uint32_t owner_id, HkIDs id) : Dataset(owner_id, static_cast<DataSetId_t>(id)) {}
#endif
virtual ~TemplateSet() = default;
};