eive-obsw/mission/devices/P60DockHandler.h

46 lines
1.5 KiB
C
Raw Normal View History

2020-11-19 18:24:03 +01:00
#ifndef MISSION_DEVICES_P60DOCKHANDLER_H_
#define MISSION_DEVICES_P60DOCKHANDLER_H_
2020-12-04 14:14:08 +01:00
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <bsp_linux/comIF/cookies/P60DockCookie.h>
2020-12-04 14:14:08 +01:00
class P60DockHandler: public DeviceHandlerBase {
public:
P60DockHandler(object_id_t objectId, object_id_t comIF,
CookieIF * comCookie);
virtual ~P60DockHandler();
protected:
void doStartUp() override;
void doShutDown() 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;
void setNormalDatapoolEntriesInvalid() override;
private:
static const DeviceCommandId_t PING = 0x1; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t READ_MODULE_CFG = 0x71; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t READ_HK = 0x72; //!< [EXPORT] : [COMMAND]
2020-12-04 14:14:08 +01:00
enum class InternalStates {
STATE_NONE,
READ_MODULE_CFG,
READ_HK
2020-12-04 14:14:08 +01:00
};
InternalStates internalState = InternalStates::STATE_NONE;
uint8_t moduleCfgTableSize = 188;
uint8_t hkTableSize = 188;
2020-12-04 14:14:08 +01:00
P60DockCookie* p60DockCookie;
2020-12-04 14:14:08 +01:00
};
2020-11-19 18:24:03 +01:00
#endif /* MISSION_DEVICES_P60DOCKHANDLER_H_ */