fsfw/src/fsfw/devicehandlers/HealthDevice.h

40 lines
992 B
C
Raw Normal View History

2020-10-12 18:18:41 +02:00
#ifndef FSFW_DEVICEHANDLERS_HEALTHDEVICE_H_
#define FSFW_DEVICEHANDLERS_HEALTHDEVICE_H_
2021-07-13 20:22:54 +02:00
#include "fsfw/health/HasHealthIF.h"
#include "fsfw/health/HealthHelper.h"
2022-02-02 10:29:30 +01:00
#include "fsfw/ipc/MessageQueueIF.h"
2021-07-13 20:22:54 +02:00
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
2022-02-02 10:29:30 +01:00
class HealthDevice : public SystemObject, public ExecutableObjectIF, public HasHealthIF {
public:
HealthDevice(object_id_t setObjectId, MessageQueueId_t parentQueue);
virtual ~HealthDevice();
ReturnValue_t performOperation(uint8_t opCode);
2022-02-02 10:29:30 +01:00
ReturnValue_t initialize();
2022-02-02 10:29:30 +01:00
virtual MessageQueueId_t getCommandQueue() const;
2022-02-02 10:29:30 +01:00
void setParentQueue(MessageQueueId_t parentQueue);
2022-02-02 10:29:30 +01:00
bool hasHealthChanged();
2022-02-02 10:29:30 +01:00
virtual ReturnValue_t setHealth(HealthState health);
2022-02-02 10:29:30 +01:00
virtual HealthState getHealth();
2022-02-02 10:29:30 +01:00
protected:
HealthState lastHealth;
2022-02-02 10:29:30 +01:00
MessageQueueId_t parentQueue;
MessageQueueIF* commandQueue;
2022-02-02 10:29:30 +01:00
public:
HealthHelper healthHelper;
};
2020-10-12 18:18:41 +02:00
#endif /* FSFW_DEVICEHANDLERS_HEALTHDEVICE_H_ */