#ifndef BSP_Q7S_CORE_COREDEFINITIONS_H_ #define BSP_Q7S_CORE_COREDEFINITIONS_H_ #include namespace core { static const uint8_t HK_SET_ENTRIES = 3; static const uint32_t HK_SET_ID = 5; enum PoolIds { TEMPERATURE, PS_VOLTAGE, PL_VOLTAGE }; /** * @brief Set storing OBC internal housekeeping data */ class HkSet : public StaticLocalDataSet { public: HkSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, HK_SET_ID) {} HkSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, HK_SET_ID)) {} // On-chip temperature lp_var_t temperature = lp_var_t(sid.objectId, PoolIds::TEMPERATURE, this); // Processing system VCC lp_var_t psVoltage = lp_var_t(sid.objectId, PoolIds::PS_VOLTAGE, this); // Programmable logic VCC lp_var_t plVoltage = lp_var_t(sid.objectId, PoolIds::PL_VOLTAGE, this); void printSet() { sif::info << "HkSet::printSet: On-chip temperature: " << this->temperature << " °C" << std::endl; sif::info << "HkSet::printSet: PS voltage: " << this->psVoltage << " mV" << std::endl; sif::info << "HkSet::printSet: PL voltage: " << this->plVoltage << " mV" << std::endl; } }; } #endif /* BSP_Q7S_CORE_COREDEFINITIONS_H_ */