#ifndef MISSION_STARTRACKER_DEFINITIONS_H_ #define MISSION_STARTRACKER_DEFINITIONS_H_ #include #include #include #include "objects/systemObjectList.h" namespace StarTracker { /** This is the address of the star tracker */ static const uint8_t ADDRESS = 33; enum PoolIds: lp_id_t { STATUS, TICKS, TIME, MCU_TEMPERATURE, CMOS_TEMPERATURE }; static const DeviceCommandId_t REQ_TEMPERATURE = 25; static const uint32_t TEMPERATURE_SET_ID = REQ_TEMPERATURE; /** Max size of unencoded frame */ static const size_t MAX_FRAME_SIZE = 1200; static const uint8_t TEMPERATURE_SET_ENTRIES = 5; /** * @brief This dataset can be used to store the temperature of a reaction wheel. */ class TemperatureSet: public StaticLocalDataSet { public: TemperatureSet(HasLocalDataPoolIF* owner): StaticLocalDataSet(owner, TEMPERATURE_SET_ID) { } TemperatureSet(object_id_t objectId): StaticLocalDataSet(sid_t(objectId, TEMPERATURE_SET_ID)) { } lp_var_t status = lp_var_t(sid.objectId, PoolIds::STATUS, this); lp_var_t ticks = lp_var_t(sid.objectId, PoolIds::TICKS, this); /** Unix time in microseconds */ lp_var_t time = lp_var_t(sid.objectId, PoolIds::TIME, this); lp_var_t mcuTemperature = lp_var_t(sid.objectId, PoolIds::MCU_TEMPERATURE, this); lp_var_t cmosTemperature = lp_var_t(sid.objectId, PoolIds::CMOS_TEMPERATURE, this); }; } #endif /* MISSION_STARTRACKER_DEFINITIONS_H_ */