eive-obsw/mission/devices/MGMHandlerRM3100.h

39 lines
1.2 KiB
C++

#ifndef MISSION_DEVICES_MGMRM3100HANDLER_H_
#define MISSION_DEVICES_MGMRM3100HANDLER_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
class MGMHandlerRM3100: public DeviceHandlerBase {
public:
MGMHandlerRM3100(object_id_t objectId, object_id_t deviceCommunication,
CookieIF* comCookie);
virtual ~MGMHandlerRM3100();
protected:
/* DeviceHandlerBase overrides */
virtual ReturnValue_t buildTransitionDeviceCommand(
DeviceCommandId_t *id) override;
virtual void doStartUp() override;
virtual void doShutDown() override;
virtual ReturnValue_t buildNormalDeviceCommand(
DeviceCommandId_t *id) override;
virtual ReturnValue_t buildCommandFromCommand(
DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) override;
virtual ReturnValue_t scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) override;
virtual ReturnValue_t interpretDeviceReply(DeviceCommandId_t id,
const uint8_t *packet) override;
private:
enum InternalState {
STATE_NONE, STATE_FIRST_CONTACT, STATE_SETUP, STATE_CHECK_REGISTERS
};
InternalState internalState = InternalState::STATE_NONE;
};
#endif /* MISSION_DEVICEHANDLING_MGMRM3100HANDLER_H_ */