eive-obsw/mission/devices/GyroADIS16507Handler.h

40 lines
1.4 KiB
C
Raw Normal View History

2021-05-24 00:30:46 +02:00
#ifndef MISSION_DEVICES_GYROADIS16507HANDLER_H_
#define MISSION_DEVICES_GYROADIS16507HANDLER_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
2021-05-24 01:20:44 +02:00
#include "devicedefinitions/GyroADIS16507Definitions.h"
2021-05-24 00:30:46 +02:00
class GyroADIS16507Handler: public DeviceHandlerBase {
public:
GyroADIS16507Handler(object_id_t objectId, object_id_t deviceCommunication, CookieIF * comCookie);
/* DeviceHandlerBase abstract function implementation */
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override;
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t * id) override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t * commandData, size_t commandDataLen) override;
void fillCommandAndReplyMap() 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;
void setNormalDatapoolEntriesInvalid() override;
2021-05-24 01:20:44 +02:00
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
2021-05-24 00:30:46 +02:00
private:
2021-05-24 01:20:44 +02:00
enum class InternalState {
STARTUP,
IDLE
};
InternalState internalState = InternalState::STARTUP;
bool commandExecuted = false;
2021-05-24 00:30:46 +02:00
};
#endif /* MISSION_DEVICES_GYROADIS16507HANDLER_H_ */