fsfw/devicehandlers/HealthDevice.h

41 lines
968 B
C
Raw Normal View History

2020-10-12 18:18:41 +02:00
#ifndef FSFW_DEVICEHANDLERS_HEALTHDEVICE_H_
#define FSFW_DEVICEHANDLERS_HEALTHDEVICE_H_
2020-08-13 20:53:35 +02:00
#include "../health/HasHealthIF.h"
#include "../health/HealthHelper.h"
#include "../objectmanager/SystemObject.h"
#include "../tasks/ExecutableObjectIF.h"
#include "../ipc/MessageQueueIF.h"
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);
ReturnValue_t initialize();
virtual MessageQueueId_t getCommandQueue() const;
void setParentQueue(MessageQueueId_t parentQueue);
bool hasHealthChanged();
virtual ReturnValue_t setHealth(HealthState health);
virtual HealthState getHealth();
protected:
HealthState lastHealth;
MessageQueueId_t parentQueue;
MessageQueueIF* commandQueue;
public:
HealthHelper healthHelper;
};
2020-10-12 18:18:41 +02:00
#endif /* FSFW_DEVICEHANDLERS_HEALTHDEVICE_H_ */