fsfw/src/fsfw/housekeeping/HousekeepingHelper.h

36 lines
854 B
C
Raw Normal View History

2023-07-11 14:57:17 +02:00
#pragma once
#include <fsfw/returnvalues/returnvalue.h>
#include <fsfw/serialize/SerializeIF.h>
2023-07-14 14:11:22 +02:00
#include <fsfw/tmtc/TmManager.h>
2023-07-11 14:57:17 +02:00
#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:
2023-07-14 14:11:22 +02:00
HousekeepingHelper(GeneratesHousekeepingIF* owner);
2023-07-11 14:57:17 +02:00
~HousekeepingHelper() = default;
const HousekeepingSet* getHousekeepingSet(HousekeepingSetId_t id);
const std::map<HousekeepingSetId_t, HousekeepingSet*>* getHousekeepingSets() const {
return &housekeepingSets;
}
2023-07-14 14:11:22 +02:00
ReturnValue_t initialize();
2023-07-12 14:19:58 +02:00
protected:
2023-07-14 14:11:22 +02:00
GeneratesHousekeepingIF* owner;
TmManager* tmManager = nullptr;
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;
};