Robin Mueller
3ae1812c32
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
42 lines
1.8 KiB
C++
42 lines
1.8 KiB
C++
#ifndef MISSION_DEVICES_MAX31865EIVEHANDLER_H_
|
|
#define MISSION_DEVICES_MAX31865EIVEHANDLER_H_
|
|
|
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
|
|
|
#include "devicedefinitions/Max31865Definitions.h"
|
|
|
|
class Max31865EiveHandler : public DeviceHandlerBase {
|
|
public:
|
|
Max31865EiveHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie);
|
|
void setInstantNormal(bool instantNormal);
|
|
void setDeviceInfo(uint8_t idx, std::string location);
|
|
|
|
private:
|
|
void doStartUp() override;
|
|
void doShutDown() override;
|
|
void doTransition(Mode_t modeFrom, Submode_t subModeFrom) override;
|
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override;
|
|
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t* id) override;
|
|
void fillCommandAndReplyMap() override;
|
|
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData,
|
|
size_t commandDataLen) override;
|
|
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
|
|
size_t* foundLen) override;
|
|
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) override;
|
|
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
|
LocalDataPoolManager& poolManager) override;
|
|
|
|
void simpleCommand(EiveMax31855::RtdCommands cmd);
|
|
std::array<uint8_t, 12> cmdBuf = {};
|
|
uint8_t idx = 0;
|
|
std::string locString = "Unknown";
|
|
EiveMax31855::ReadOutStruct exchangeStruct;
|
|
bool instantNormal = false;
|
|
MAX31865::Max31865Set sensorDataset;
|
|
enum class InternalState { NONE, ON, ACTIVE, INACTIVE } state = InternalState::NONE;
|
|
bool transitionOk = false;
|
|
};
|
|
|
|
#endif /* MISSION_DEVICES_MAX31865EIVEHANDLER_H_ */
|