Files
obsw/mission/devices/LightHandler.h
2023-10-19 07:26:44 +02:00

40 lines
1.6 KiB
C++

#include <fsfw/devicehandlers/DeviceHandlerBase.h>
/**
* @brief Device Handler for any simple led directly connected to a GPIO
* @details
* Documentation of device: Datasheet available in the internet.
*
*
* @author Paul Nehlich
* @ingroup devices
*/
class LightHandler : public DeviceHandlerBase {
public:
LightHandler(object_id_t objectId, object_id_t comIF, CookieIF *comCookie);
virtual ~LightHandler();
protected:
/* 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);
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;
/* DeviceHandlerBase overrides */
void debugInterface(uint8_t positionTracker = 0, object_id_t objectId = 0,
uint32_t parameter = 0) override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override;
};