2016-06-15 23:48:41 +02:00
|
|
|
#ifndef HEALTHDEVICE_H_
|
|
|
|
#define 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"
|
2016-06-15 23:48:41 +02:00
|
|
|
|
|
|
|
class HealthDevice: public SystemObject,
|
|
|
|
public ExecutableObjectIF,
|
|
|
|
public HasHealthIF {
|
|
|
|
public:
|
|
|
|
HealthDevice(object_id_t setObjectId, MessageQueueId_t parentQueue);
|
|
|
|
virtual ~HealthDevice();
|
|
|
|
|
2018-07-12 16:29:32 +02:00
|
|
|
ReturnValue_t performOperation(uint8_t opCode);
|
2016-06-15 23:48:41 +02:00
|
|
|
|
|
|
|
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;
|
2018-07-12 16:29:32 +02:00
|
|
|
MessageQueueIF* commandQueue;
|
2016-06-15 23:48:41 +02:00
|
|
|
public:
|
|
|
|
HealthHelper healthHelper;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* HEALTHDEVICE_H_ */
|