73 lines
3.0 KiB
C++
73 lines
3.0 KiB
C++
#pragma once
|
|
|
|
#include <fsfw/action/MinMaxParameter.h>
|
|
#include <fsfw/action/TemplateAction.h>
|
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
|
#include <fsfw/introspection/Enum.h>
|
|
|
|
class CCSDSHandler;
|
|
|
|
FSFW_ENUM(
|
|
CCSDSCommands, DeviceCommandId_t,
|
|
((SET_LOW_RATE, 0, "Set Low rate"))((SET_HIGH_RATE, 1, "Set High Rate"))(
|
|
(EN_TRANSMITTER, 2, "Enable Transmitter"))((DISABLE_TRANSMITTER, 3, "Disable Transmitter"))(
|
|
(ARBITRARY_RATE, 4, "Set Bit Rate"))((ENABLE_TX_CLK_MANIPULATOR, 5,
|
|
"Enable Tx Clock Manipulator"))(
|
|
(DISABLE_TX_CLK_MANIPULATOR, 6, "Enable Tx Clock Manipulator"))(
|
|
(UPDATE_ON_RISING_EDGE, 7, "update data on rising edge"))((UPDATE_ON_FALLING_EDGE, 8,
|
|
"update data on falling edge")))
|
|
|
|
class SetLowRateAction : public TemplateAction<CCSDSHandler, SetLowRateAction, CCSDSCommands> {
|
|
public:
|
|
SetLowRateAction(CCSDSHandler* owner)
|
|
: TemplateAction(owner, CCSDSCommands::SET_LOW_RATE) {}
|
|
};
|
|
class SetHighRateAction : public TemplateAction<CCSDSHandler, SetHighRateAction, CCSDSCommands> {
|
|
public:
|
|
SetHighRateAction(CCSDSHandler* owner)
|
|
: TemplateAction(owner, CCSDSCommands::SET_HIGH_RATE) {}
|
|
};
|
|
class EnTransmitterAction
|
|
: public TemplateAction<CCSDSHandler, EnTransmitterAction, CCSDSCommands> {
|
|
public:
|
|
EnTransmitterAction(CCSDSHandler* owner)
|
|
: TemplateAction(owner, CCSDSCommands::EN_TRANSMITTER) {}
|
|
};
|
|
class DisableTransmitterAction
|
|
: public TemplateAction<CCSDSHandler, DisableTransmitterAction, CCSDSCommands> {
|
|
public:
|
|
DisableTransmitterAction(CCSDSHandler* owner)
|
|
: TemplateAction(owner, CCSDSCommands::DISABLE_TRANSMITTER) {}
|
|
};
|
|
class ArbitraryRateAction
|
|
: public TemplateAction<CCSDSHandler, ArbitraryRateAction, CCSDSCommands> {
|
|
public:
|
|
ArbitraryRateAction(CCSDSHandler* owner)
|
|
: TemplateAction(owner, CCSDSCommands::ARBITRARY_RATE) {}
|
|
|
|
Parameter<uint32_t> bitrate = Parameter<uint32_t>::createParameter(this, "Bitrate");
|
|
};
|
|
class EnableTxClkManipulatorAction
|
|
: public TemplateAction<CCSDSHandler, EnableTxClkManipulatorAction, CCSDSCommands> {
|
|
public:
|
|
EnableTxClkManipulatorAction(CCSDSHandler* owner)
|
|
: TemplateAction(owner, CCSDSCommands::ENABLE_TX_CLK_MANIPULATOR) {}
|
|
};
|
|
class DisableTxClkManipulatorAction
|
|
: public TemplateAction<CCSDSHandler, DisableTxClkManipulatorAction, CCSDSCommands> {
|
|
public:
|
|
DisableTxClkManipulatorAction(CCSDSHandler* owner)
|
|
: TemplateAction(owner, CCSDSCommands::DISABLE_TX_CLK_MANIPULATOR) {}
|
|
};
|
|
class UpdateOnRisingEdgeAction
|
|
: public TemplateAction<CCSDSHandler, UpdateOnRisingEdgeAction, CCSDSCommands> {
|
|
public:
|
|
UpdateOnRisingEdgeAction(CCSDSHandler* owner)
|
|
: TemplateAction(owner, CCSDSCommands::UPDATE_ON_RISING_EDGE) {}
|
|
};
|
|
class UpdateOnFallingEdgeAction
|
|
: public TemplateAction<CCSDSHandler, UpdateOnFallingEdgeAction, CCSDSCommands> {
|
|
public:
|
|
UpdateOnFallingEdgeAction(CCSDSHandler* owner)
|
|
: TemplateAction(owner, CCSDSCommands::UPDATE_ON_FALLING_EDGE) {}
|
|
}; |