fsfw/src/fsfw/housekeeping/HousekeepingSet.cpp

31 lines
846 B
C++
Raw Normal View History

2023-07-11 14:57:17 +02:00
#include "HousekeepingSet.h"
#include "GeneratesHousekeepingIF.h"
#ifdef FSFW_INTROSPECTION
HousekeepingSet::HousekeepingSet(GeneratesHousekeepingIF* owner, HousekeepingSetId_t id) {
2023-07-12 14:19:58 +02:00
helper = owner->getHelper();
helper->registerSet(this);
2023-07-11 14:57:17 +02:00
}
void HousekeepingSet::setEnum(EnumIF* theEnum) {
id = theEnum->getValue();
description = theEnum->getDescription();
}
#else
HousekeepingSet::HousekeepingSet(GeneratesHousekeepingIF* owner, HousekeepingSetId_t id) : id(id) {
2023-07-12 14:19:58 +02:00
helper = owner->getHelper();
helper->registerSet(this);
2023-07-11 14:57:17 +02:00
}
#endif
2023-07-12 14:19:58 +02:00
void HousekeepingSet::report(const Action* action) {
helper->reportHousekeeping(this, action);
}
void HousekeepingSet::registerParameter(ParameterIF* parameter) {
parameterList.push_back(parameter);
}
std::vector<ParameterIF*> const* HousekeepingSet::getParameters() { return &parameterList; }