2023-07-11 14:57:17 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <fsfw/action/Action.h>
|
|
|
|
#include <fsfw/introspection/Enum.h>
|
2023-07-12 12:52:07 +02:00
|
|
|
#include <fsfw/introspection/HasTmTcParametersIF.h>
|
2023-07-12 14:19:58 +02:00
|
|
|
#include <fsfw/serialize/SerializeIF.h>
|
2023-07-11 14:57:17 +02:00
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
class HousekeepingHelper;
|
|
|
|
class GeneratesHousekeepingIF;
|
|
|
|
|
|
|
|
using HousekeepingSetId_t = uint32_t;
|
|
|
|
|
2023-07-12 14:19:58 +02:00
|
|
|
class HousekeepingSet : public HasTmTcParametersIF, public SerializeIF {
|
|
|
|
friend class ParameterIF;
|
|
|
|
|
2023-07-11 14:57:17 +02:00
|
|
|
public:
|
|
|
|
#ifdef FSFW_INTROSPECTION
|
2023-07-18 14:43:18 +02:00
|
|
|
HousekeepingSet(GeneratesHousekeepingIF* owner, const EnumIF &id);
|
2023-07-11 14:57:17 +02:00
|
|
|
#else
|
2023-07-12 14:19:58 +02:00
|
|
|
HousekeepingSet(GeneratesHousekeepingIF* owner, HousekeepingSetId_t id);
|
2023-07-11 14:57:17 +02:00
|
|
|
#endif
|
|
|
|
|
2023-07-14 14:11:22 +02:00
|
|
|
virtual ~HousekeepingSet();
|
|
|
|
|
2023-07-11 14:57:17 +02:00
|
|
|
HousekeepingSetId_t getId() const { return id; }
|
|
|
|
|
2023-07-18 13:17:34 +02:00
|
|
|
virtual void report(const Action* action = nullptr);
|
2023-07-11 14:57:17 +02:00
|
|
|
|
2023-07-14 14:11:22 +02:00
|
|
|
std::vector<ParameterIF*> const* getParameters() const override;
|
|
|
|
|
|
|
|
#ifdef FSFW_INTROSPECTION
|
|
|
|
const char* getDescription() const;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
|
|
|
|
Endianness streamEndianness) const override;
|
|
|
|
|
|
|
|
size_t getSerializedSize() const override;
|
|
|
|
|
|
|
|
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
|
|
|
|
Endianness streamEndianness) override;
|
2023-07-12 12:52:07 +02:00
|
|
|
|
2023-07-11 14:57:17 +02:00
|
|
|
protected:
|
2023-07-14 14:11:22 +02:00
|
|
|
HousekeepingHelper* helper = nullptr;
|
2023-07-11 14:57:17 +02:00
|
|
|
HousekeepingSetId_t id;
|
|
|
|
#ifdef FSFW_INTROSPECTION
|
|
|
|
const char* description;
|
|
|
|
#endif
|
2023-07-12 12:52:07 +02:00
|
|
|
std::vector<ParameterIF*> parameterList;
|
2023-07-12 14:19:58 +02:00
|
|
|
|
|
|
|
void registerParameter(ParameterIF* parameter) override;
|
2023-07-11 14:57:17 +02:00
|
|
|
};
|