eive-obsw/mission/controller/controllerdefinitions/PowerCtrlDefinitions.h

40 lines
1.1 KiB
C
Raw Normal View History

2023-07-26 11:18:15 +02:00
#ifndef MISSION_CONTROLLER_CONTROLLERDEFINITIONS_POWERCTRLDEFINITIONS_H_
#define MISSION_CONTROLLER_CONTROLLERDEFINITIONS_POWERCTRLDEFINITIONS_H_
2023-07-28 11:36:20 +02:00
#include <fsfw/datapool/PoolReadGuard.h>
2023-07-26 11:18:15 +02:00
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
#include <fsfw/datapoollocal/localPoolDefinitions.h>
2023-07-28 11:36:20 +02:00
#include <mission/power/defs.h>
2023-07-26 11:18:15 +02:00
#include <cstdint>
namespace pwrctrl {
2023-07-28 11:36:20 +02:00
enum SetIds : uint32_t { CORE_HK };
2023-07-26 11:18:15 +02:00
enum PoolIds : lp_id_t {
2023-07-28 11:36:20 +02:00
TOTAL_BATTERY_CURRENT,
2023-07-26 17:01:48 +02:00
OPEN_CIRCUIT_VOLTAGE_CHARGE,
COULOMB_COUNTER_CHARGE,
2023-07-26 11:18:15 +02:00
};
2023-07-28 11:36:20 +02:00
static constexpr uint8_t CORE_HK_ENTRIES = 3;
2023-07-26 11:18:15 +02:00
2023-07-28 11:36:20 +02:00
class CoreHk : public StaticLocalDataSet<CORE_HK_ENTRIES> {
2023-07-26 11:18:15 +02:00
public:
2023-07-28 11:36:20 +02:00
CoreHk(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, CORE_HK) {}
2023-07-26 11:18:15 +02:00
2023-07-28 11:36:20 +02:00
lp_var_t<int16_t> totalBatteryCurrent =
lp_var_t<int16_t>(sid.objectId, TOTAL_BATTERY_CURRENT, this);
2023-07-26 17:01:48 +02:00
lp_var_t<float> openCircuitVoltageCharge =
lp_var_t<float>(sid.objectId, OPEN_CIRCUIT_VOLTAGE_CHARGE, this);
lp_var_t<float> coulombCounterCharge =
lp_var_t<float>(sid.objectId, COULOMB_COUNTER_CHARGE, this);
2023-07-26 11:18:15 +02:00
private:
};
} // namespace pwrctrl
#endif /* MISSION_CONTROLLER_CONTROLLERDEFINITIONS_POWERCTRLDEFINITIONS_H_ */