Merge remote-tracking branch 'origin/develop' into feature_set_up_periodic_hk
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
59
mission/power/Pdu1Handler.h
Normal file
59
mission/power/Pdu1Handler.h
Normal file
@ -0,0 +1,59 @@
|
||||
#ifndef MISSION_DEVICES_PDU1Handler_H_
|
||||
#define MISSION_DEVICES_PDU1Handler_H_
|
||||
|
||||
#include <mission/power/GomspaceDeviceHandler.h>
|
||||
#include <mission/power/gsDefs.h>
|
||||
|
||||
/**
|
||||
* @brief This is the device handler for the PDU1.
|
||||
*
|
||||
* @details The PDU1 controls the
|
||||
* power supply of the following devices:
|
||||
* TCS Board, 3.3V, channel 0
|
||||
* Syrlinks, 12V, channel 1
|
||||
* Star Tracker, 5V, channel 2
|
||||
* MGT, 5V, channel 3
|
||||
* SUS 1-6 Nominal, 3.3V, channel 4
|
||||
* Solar cell experiment, 5V, channel 5
|
||||
* PLOC, 12V, channel 6
|
||||
* ACS 3.3V for Side A group, channel 7
|
||||
* Unoccupied, 5V, channel 8
|
||||
*/
|
||||
class Pdu1Handler : public GomspaceDeviceHandler {
|
||||
public:
|
||||
Pdu1Handler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
|
||||
FailureIsolationBase* customFdir, bool enableHkSets);
|
||||
virtual ~Pdu1Handler();
|
||||
|
||||
virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
|
||||
void assignChannelHookFunction(GOMSPACE::ChannelSwitchHook hook, void* args);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief In MODE_NORMAL, a command will be built periodically by this function.
|
||||
*/
|
||||
virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override;
|
||||
void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t* packet) override;
|
||||
void letChildHandleConfigReply(DeviceCommandId_t id, const uint8_t* packet) override;
|
||||
ReturnValue_t printStatus(DeviceCommandId_t cmd) override;
|
||||
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||
ReturnValue_t setParamCallback(SetParamMessageUnpacker& unpacker, bool afterExectuion) override;
|
||||
|
||||
private:
|
||||
static constexpr uint8_t MAX_CHANNEL_STR_WIDTH = 24;
|
||||
|
||||
/** Dataset for the housekeeping table of the PDU1 */
|
||||
PDU1::Pdu1CoreHk coreHk;
|
||||
PDU1::Pdu1AuxHk auxHk;
|
||||
TableConfig cfg;
|
||||
GOMSPACE::ChannelSwitchHook channelSwitchHook = nullptr;
|
||||
void* hookArgs = nullptr;
|
||||
|
||||
void printHkTableSwitchVI();
|
||||
void printHkTableLatchups();
|
||||
void parseHkTableReply(const uint8_t* packet);
|
||||
};
|
||||
|
||||
#endif /* MISSION_DEVICES_PDU1Handler_H_ */
|
Reference in New Issue
Block a user