fsfw/src/fsfw/housekeeping/HousekeepingHelper.h

36 lines
854 B
C++

#pragma once
#include <fsfw/returnvalues/returnvalue.h>
#include <fsfw/serialize/SerializeIF.h>
#include <fsfw/tmtc/TmManager.h>
#include <map>
#include "HousekeepingSet.h"
class HousekeepingHelper {
friend class HousekeepingSet;
public:
HousekeepingHelper(GeneratesHousekeepingIF* owner);
~HousekeepingHelper() = default;
const HousekeepingSet* getHousekeepingSet(HousekeepingSetId_t id);
const std::map<HousekeepingSetId_t, HousekeepingSet*>* getHousekeepingSets() const {
return &housekeepingSets;
}
ReturnValue_t initialize();
protected:
GeneratesHousekeepingIF* owner;
TmManager* tmManager = nullptr;
void registerSet(HousekeepingSet* set);
ReturnValue_t reportHousekeeping(HousekeepingSet* set, const Action* action = nullptr);
private:
std::map<HousekeepingSetId_t, HousekeepingSet*> housekeepingSets;
};