eive-obsw/mission/devices/devicedefinitions/HeaterDefinitions.h

26 lines
1.1 KiB
C
Raw Normal View History

#pragma once
#include <fsfw/action/MinMaxParameter.h>
#include <fsfw/action/TemplateAction.h>
#include <fsfw/introspection/Enum.h>
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
class HeaterHandler;
FSFW_ENUM(HeaterCommands, DeviceCommandId_t, ((SWITCH_HEATER, 0x0, "Switch Heater")))
class SetHeaterAction : public TemplateAction<HeaterHandler, SetHeaterAction, HeaterCommands> {
public:
FSFW_ENUM(SwitchAction, uint8_t,
((SET_SWITCH_OFF, "Set switch to Off"))((SET_SWITCH_ON, "Set switch to On")) ((NONE, "No Action")))
FSFW_ENUM(CmdSourceParam, uint8_t, ((INTERNAL, 0, "Internal"))((EXTERNAL, 1, "External")))
SetHeaterAction(HeaterHandler *owner) : TemplateAction(owner, HeaterCommands::SWITCH_HEATER) {}
MinMaxParameter<uint8_t> switchNr =
MinMaxParameter<uint8_t>::createMinMaxParameter(this, "Heater number", 0, 7);
Parameter<SwitchAction> switchAction =
Parameter<SwitchAction>::createParameter(this, "Switch Action");
Parameter<CmdSourceParam> cmdSource =
Parameter<CmdSourceParam>::createParameter(this, "Command Source");
};