eive-obsw/mission/devices/ACUHandler.h

40 lines
1.2 KiB
C++

#ifndef MISSION_DEVICES_ACUHANDLER_H_
#define MISSION_DEVICES_ACUHANDLER_H_
#include "GomspaceDeviceHandler.h"
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
/**
* @brief Handler for the ACU from Gomspace. Monitors and controls the battery charging via
* the solar panels.
*/
class ACUHandler: public GomspaceDeviceHandler {
public:
ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie);
virtual ~ACUHandler();
virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;
protected:
virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override;
/**
* @brief As soon as the device is in MODE_NORMAL, this function is executed periodically.
*/
virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override;
private:
ACU::HkTableDataset acuHkTableDataset;
/**
* @brief Function extracts the hk table information from the received csp packet and stores
* the values in the acuHkTableDataset.
*/
void parseHkTableReply(const uint8_t *packet);
};
#endif /* MISSION_DEVICES_ACUHANDLER_H_ */