2021-01-23 17:22:40 +01:00
|
|
|
#ifndef MISSION_DEVICES_PDU2HANDLER_H_
|
|
|
|
#define MISSION_DEVICES_PDU2HANDLER_H_
|
|
|
|
|
|
|
|
#include "GomspaceDeviceHandler.h"
|
2021-01-28 14:55:21 +01:00
|
|
|
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
2021-01-23 17:22:40 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This is the device handler for the PDU2.
|
|
|
|
*
|
|
|
|
* @details The PDU2 controls the
|
|
|
|
* power supply of the following devices:
|
|
|
|
* Xiphos Q7S, 8V, channel 0
|
|
|
|
* Reaction wheels 5V, channel 2
|
|
|
|
* TCS Board heater input, 8V, channel 3
|
2021-01-28 14:55:21 +01:00
|
|
|
* SUS 8-12 Redundant, 3.3V, channel 4
|
2021-01-23 17:22:40 +01:00
|
|
|
* Deployment mechanism, 8V, channel 5
|
2021-01-28 14:55:21 +01:00
|
|
|
* P/L PCDU, Battery voltage (Vnominal = 14.8V), channel 1 and channel 6
|
|
|
|
* ACS Board (Gyro, MGMs, GPS), 3.3V channel 7
|
2021-01-23 17:22:40 +01:00
|
|
|
* Payload Camera, 8V, channel 8
|
|
|
|
*/
|
|
|
|
class PDU2Handler: public GomspaceDeviceHandler {
|
|
|
|
public:
|
2021-09-08 13:41:27 +02:00
|
|
|
PDU2Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie);
|
|
|
|
virtual ~PDU2Handler();
|
2021-01-28 14:55:21 +01:00
|
|
|
|
2021-09-08 13:41:27 +02:00
|
|
|
virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
|
|
|
LocalDataPoolManager& poolManager) override;
|
2021-01-28 14:55:21 +01:00
|
|
|
|
|
|
|
protected:
|
2021-09-08 13:41:27 +02:00
|
|
|
/**
|
|
|
|
* @brief As soon as the device is in MODE_NORMAL, this function is executed periodically.
|
|
|
|
*/
|
|
|
|
virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override;
|
|
|
|
virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override;
|
|
|
|
ReturnValue_t printStatus(DeviceCommandId_t cmd) override;
|
2021-01-28 14:55:21 +01:00
|
|
|
|
|
|
|
private:
|
2021-02-06 11:57:45 +01:00
|
|
|
|
2021-09-08 13:41:27 +02:00
|
|
|
/** Dataset for the housekeeping table of the PDU2 */
|
|
|
|
PDU2::PDU2HkTableDataset pdu2HkTableDataset;
|
2021-02-06 11:57:45 +01:00
|
|
|
|
2021-09-20 11:22:11 +02:00
|
|
|
void printHkTable();
|
2021-09-16 14:51:14 +02:00
|
|
|
|
2021-09-08 13:41:27 +02:00
|
|
|
void parseHkTableReply(const uint8_t *packet);
|
2021-01-23 17:22:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* MISSION_DEVICES_PDU2HANDLER_H_ */
|