52 lines
2.0 KiB
C
52 lines
2.0 KiB
C
|
#pragma once
|
||
|
|
||
|
#include "fsfw/devicehandlers/FreshDeviceHandlerBase.h"
|
||
|
#include "mission/power/bpxBattDefs.h"
|
||
|
|
||
|
/// @brief
|
||
|
class BatteryDummy : public FreshDeviceHandlerBase {
|
||
|
public:
|
||
|
BatteryDummy(DhbConfig cfg);
|
||
|
|
||
|
private:
|
||
|
/**
|
||
|
* Periodic helper executed function, implemented by child class.
|
||
|
*/
|
||
|
void performDeviceOperation(uint8_t opCode) override;
|
||
|
|
||
|
/**
|
||
|
* Implemented by child class. Handle all command messages which are
|
||
|
* not health, mode, action or housekeeping messages.
|
||
|
* @param message
|
||
|
* @return
|
||
|
*/
|
||
|
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
||
|
|
||
|
// HK manager abstract functions.
|
||
|
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||
|
LocalDataPoolManager& poolManager) override;
|
||
|
|
||
|
// Mode abstract functions
|
||
|
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
|
||
|
uint32_t* msToReachTheMode) override;
|
||
|
// Action override. Forward to user.
|
||
|
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||
|
const uint8_t* data, size_t size) override;
|
||
|
|
||
|
BpxBatteryCfg cfgSet;
|
||
|
BpxBatteryHk hkSet;
|
||
|
PoolEntry<uint16_t> chargeCurrent = PoolEntry<uint16_t>({0});
|
||
|
PoolEntry<uint16_t> dischargeCurrent = PoolEntry<uint16_t>({0});
|
||
|
PoolEntry<uint16_t> heaterCurrent = PoolEntry<uint16_t>({0});
|
||
|
PoolEntry<uint16_t> battVolt = PoolEntry<uint16_t>({0});
|
||
|
PoolEntry<int16_t> battTemp1 = PoolEntry<int16_t>({10}, true);
|
||
|
PoolEntry<int16_t> battTemp2 = PoolEntry<int16_t>({10}, true);
|
||
|
PoolEntry<int16_t> battTemp3 = PoolEntry<int16_t>({10}, true);
|
||
|
PoolEntry<int16_t> battTemp4 = PoolEntry<int16_t>({10}, true);
|
||
|
PoolEntry<uint32_t> rebootCounter = PoolEntry<uint32_t>({0});
|
||
|
PoolEntry<uint8_t> bootCause = PoolEntry<uint8_t>({0});
|
||
|
PoolEntry<uint8_t> battheatMode = PoolEntry<uint8_t>({0});
|
||
|
PoolEntry<int8_t> battheatLow = PoolEntry<int8_t>({0});
|
||
|
PoolEntry<int8_t> battheatHigh = PoolEntry<int8_t>({0});
|
||
|
};
|