working on gomespace handlers
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
65
mission/devices/devicedefinitions/GomspaceActions.h
Normal file
65
mission/devices/devicedefinitions/GomspaceActions.h
Normal file
@ -0,0 +1,65 @@
|
||||
#pragma once
|
||||
|
||||
#include <fsfw/action/MinMaxParameter.h>
|
||||
#include <fsfw/action/TemplateAction.h>
|
||||
|
||||
#include "GomspaceDefinitions.h"
|
||||
|
||||
class GomspaceDeviceHandler;
|
||||
|
||||
class PingAction : public TemplateAction<GomspaceDeviceHandler, PingAction, GomspaceCommands> {
|
||||
public:
|
||||
PingAction(GomspaceDeviceHandler* owner) : TemplateAction(owner, GomspaceCommands::PING) {}
|
||||
};
|
||||
|
||||
class NoneAction : public TemplateAction<GomspaceDeviceHandler, NoneAction, GomspaceCommands> {
|
||||
public:
|
||||
NoneAction(GomspaceDeviceHandler* owner) : TemplateAction(owner, GomspaceCommands::NONE) {}
|
||||
};
|
||||
|
||||
class RebootAction : public TemplateAction<GomspaceDeviceHandler, RebootAction, GomspaceCommands> {
|
||||
public:
|
||||
RebootAction(GomspaceDeviceHandler* owner) : TemplateAction(owner, GomspaceCommands::REBOOT) {}
|
||||
};
|
||||
|
||||
class GndwdtResetAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, GndwdtResetAction, GomspaceCommands> {
|
||||
public:
|
||||
GndwdtResetAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::GNDWDT_RESET) {}
|
||||
};
|
||||
|
||||
class ParamGetAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, ParamGetAction, GomspaceCommands> {
|
||||
public:
|
||||
ParamGetAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::PARAM_GET) {}
|
||||
};
|
||||
|
||||
class ParamSetAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, ParamSetAction, GomspaceCommands> {
|
||||
public:
|
||||
ParamSetAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::PARAM_SET) {}
|
||||
};
|
||||
|
||||
class RequestHkTableAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, RequestHkTableAction, GomspaceCommands> {
|
||||
public:
|
||||
RequestHkTableAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::REQUEST_HK_TABLE) {}
|
||||
};
|
||||
|
||||
class PrintSwitchVIAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, PrintSwitchVIAction, GomspaceCommands> {
|
||||
public:
|
||||
PrintSwitchVIAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::PRINT_SWITCH_V_I) {}
|
||||
};
|
||||
|
||||
class PrintLatchupsAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, PrintLatchupsAction, GomspaceCommands> {
|
||||
public:
|
||||
PrintLatchupsAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::PRINT_LATCHUPS) {}
|
||||
};
|
@ -4,6 +4,7 @@
|
||||
#include <fsfw/datapoollocal/LocalPoolVariable.h>
|
||||
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||
#include <fsfw/introspection/Enum.h>
|
||||
#include <fsfw/power/definitions.h>
|
||||
|
||||
#include <cstdint>
|
||||
@ -26,24 +27,19 @@ static const uint8_t REBOOT_PORT = 4;
|
||||
static const uint8_t PARAM_PORT = 7;
|
||||
static const uint8_t P60_PORT_GNDWDT_RESET = 9;
|
||||
|
||||
} // namespace GOMSPACE
|
||||
|
||||
/**
|
||||
* Device commands are derived from the rparam.h of the gomspace lib..
|
||||
* IDs above 50 are reserved for device specific commands.
|
||||
*/
|
||||
static const DeviceCommandId_t PING = 1; //!< [EXPORT] : [COMMAND]
|
||||
static const DeviceCommandId_t NONE = 2; // Set when no command is pending
|
||||
static const DeviceCommandId_t REBOOT = 4; //!< [EXPORT] : [COMMAND]
|
||||
static const DeviceCommandId_t GNDWDT_RESET = 9; //!< [EXPORT] : [COMMAND]
|
||||
static const DeviceCommandId_t PARAM_GET = 0; //!< [EXPORT] : [COMMAND]
|
||||
static const DeviceCommandId_t PARAM_SET = 255; //!< [EXPORT] : [COMMAND]
|
||||
static const DeviceCommandId_t REQUEST_HK_TABLE = 16; //!< [EXPORT] : [COMMAND]
|
||||
|
||||
//! [EXPORT] : [COMMAND] Print switch states, voltages and currents to the console
|
||||
//! For the ACU device, only print voltages and currents of the 6 ACU channels
|
||||
static const DeviceCommandId_t PRINT_SWITCH_V_I = 32;
|
||||
static const DeviceCommandId_t PRINT_LATCHUPS = 33;
|
||||
|
||||
} // namespace GOMSPACE
|
||||
FSFW_ENUM(GomspaceCommands, DeviceCommandId_t,
|
||||
((PING, 1, "Ping"))((NONE, 2, "None (used internally)"))((REBOOT, 4, "Reboot"))(
|
||||
(GNDWDT_RESET, 9, "Reset Watchdog"))((PARAM_GET, 0, "Get Parameter"))(
|
||||
(PARAM_SET, 255, "Set Parameter"))((REQUEST_HK_TABLE, 16,
|
||||
"Request Housekeeping Table"))(
|
||||
(PRINT_SWITCH_V_I, 32, "Print switch states, voltages and currents to the console"))(
|
||||
(PRINT_LATCHUPS, 33, "Print Latchups to the console")))
|
||||
|
||||
namespace P60System {
|
||||
|
||||
|
Reference in New Issue
Block a user