eive-obsw/mission/devices/Max31865EiveHandler.h

42 lines
1.8 KiB
C
Raw Normal View History

2022-05-12 09:48:41 +02:00
#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 locString);
2022-05-12 09:48:41 +02:00
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";
2022-05-12 09:48:41 +02:00
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_ */