meggert
69f5529ade
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
51 lines
1.5 KiB
C++
51 lines
1.5 KiB
C++
#ifndef MISSION_CONTROLLER_CONTROLLERDEFINITIONS_POWERCTRLDEFINITIONS_H_
|
|
#define MISSION_CONTROLLER_CONTROLLERDEFINITIONS_POWERCTRLDEFINITIONS_H_
|
|
|
|
#include <fsfw/datapool/PoolReadGuard.h>
|
|
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
|
#include <fsfw/datapoollocal/localPoolDefinitions.h>
|
|
#include <mission/power/defs.h>
|
|
|
|
#include <cstdint>
|
|
|
|
namespace pwrctrl {
|
|
|
|
enum SetIds : uint32_t { CORE_HK, ENABLE_PL };
|
|
|
|
enum PoolIds : lp_id_t {
|
|
TOTAL_BATTERY_CURRENT,
|
|
OPEN_CIRCUIT_VOLTAGE_CHARGE,
|
|
COULOMB_COUNTER_CHARGE,
|
|
PAYLOAD_FLAG
|
|
};
|
|
|
|
static constexpr uint8_t CORE_HK_ENTRIES = 3;
|
|
static constexpr uint8_t ENABLE_PL_ENTRIES = 1;
|
|
|
|
class CoreHk : public StaticLocalDataSet<CORE_HK_ENTRIES> {
|
|
public:
|
|
CoreHk(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, CORE_HK) {}
|
|
|
|
lp_var_t<int16_t> totalBatteryCurrent =
|
|
lp_var_t<int16_t>(sid.objectId, TOTAL_BATTERY_CURRENT, this);
|
|
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);
|
|
|
|
private:
|
|
};
|
|
|
|
class EnablePl : public StaticLocalDataSet<ENABLE_PL_ENTRIES> {
|
|
public:
|
|
EnablePl(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, ENABLE_PL) {}
|
|
|
|
lp_var_t<uint8_t> plUseAllowed = lp_var_t<uint8_t>(sid.objectId, PAYLOAD_FLAG, this);
|
|
|
|
private:
|
|
};
|
|
|
|
} // namespace pwrctrl
|
|
|
|
#endif /* MISSION_CONTROLLER_CONTROLLERDEFINITIONS_POWERCTRLDEFINITIONS_H_ */
|