2023-07-11 14:57:17 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <fsfw/returnvalues/returnvalue.h>
|
|
|
|
#include <fsfw/serialize/SerializeIF.h>
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
#include "HousekeepingSet.h"
|
|
|
|
|
|
|
|
class HousekeepingHelper {
|
2023-07-12 14:19:58 +02:00
|
|
|
friend class HousekeepingSet;
|
2023-07-11 14:57:17 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
HousekeepingHelper();
|
|
|
|
~HousekeepingHelper() = default;
|
|
|
|
|
|
|
|
const HousekeepingSet* getHousekeepingSet(HousekeepingSetId_t id);
|
|
|
|
|
|
|
|
const std::map<HousekeepingSetId_t, HousekeepingSet*>* getHousekeepingSets() const {
|
|
|
|
return &housekeepingSets;
|
|
|
|
}
|
|
|
|
|
2023-07-12 14:19:58 +02:00
|
|
|
protected:
|
2023-07-11 14:57:17 +02:00
|
|
|
void registerSet(HousekeepingSet* set);
|
|
|
|
|
2023-07-12 14:19:58 +02:00
|
|
|
ReturnValue_t reportHousekeeping(HousekeepingSet* set, const Action* action = nullptr);
|
2023-07-11 14:57:17 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::map<HousekeepingSetId_t, HousekeepingSet*> housekeepingSets;
|
|
|
|
};
|