compiling both with and without introspection
This commit is contained in:
@ -7,35 +7,35 @@
|
||||
|
||||
class GomspaceDeviceHandler;
|
||||
|
||||
class PingAction : public TemplateAction<GomspaceDeviceHandler, PingAction, GomspaceCommands> {
|
||||
class PingAction : public TemplateAction<GomspaceDeviceHandler, PingAction, GOMSPACE::GomspaceCommands> {
|
||||
public:
|
||||
PingAction(GomspaceDeviceHandler* owner) : TemplateAction(owner, GomspaceCommands::PING) {}
|
||||
PingAction(GomspaceDeviceHandler* owner) : TemplateAction(owner, GOMSPACE::PING) {}
|
||||
|
||||
// TODO array
|
||||
Parameter<uint8_t> pingData = Parameter<uint8_t>::createParameter(this, "Ping Data");
|
||||
};
|
||||
|
||||
class RebootAction : public TemplateAction<GomspaceDeviceHandler, RebootAction, GomspaceCommands> {
|
||||
class RebootAction : public TemplateAction<GomspaceDeviceHandler, RebootAction, GOMSPACE::GomspaceCommands> {
|
||||
public:
|
||||
RebootAction(GomspaceDeviceHandler* owner) : TemplateAction(owner, GomspaceCommands::REBOOT) {}
|
||||
RebootAction(GomspaceDeviceHandler* owner) : TemplateAction(owner, GOMSPACE::REBOOT) {}
|
||||
};
|
||||
|
||||
class GndwdtResetAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, GndwdtResetAction, GomspaceCommands> {
|
||||
: public TemplateAction<GomspaceDeviceHandler, GndwdtResetAction, GOMSPACE::GomspaceCommands> {
|
||||
public:
|
||||
GndwdtResetAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::GNDWDT_RESET) {}
|
||||
: TemplateAction(owner, GOMSPACE::GNDWDT_RESET) {}
|
||||
};
|
||||
|
||||
class ParamGetAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, ParamGetAction, GomspaceCommands> {
|
||||
: public TemplateAction<GomspaceDeviceHandler, ParamGetAction, GOMSPACE::GomspaceCommands> {
|
||||
public:
|
||||
FSFW_ENUM(ParameterByteSize, uint8_t,
|
||||
((ONE_BYTE, 1, "One Byte"))((TWO_BYTES, 2, "Two Bytes"))((FOUR_BYTES, 4, "Four Bytes")))
|
||||
FSFW_ENUM(TableId, uint8_t,
|
||||
((CONFIG_TABLE_ID, 1, "Config Table"))((HK_TABLE_ID, 4, "Housekeeping Table")))
|
||||
ParamGetAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::PARAM_GET) {}
|
||||
: TemplateAction(owner, GOMSPACE::PARAM_GET) {}
|
||||
|
||||
Parameter<TableId> tableId =
|
||||
Parameter<TableId>::createParameter(this, "Table");
|
||||
@ -45,13 +45,13 @@ Parameter<uint16_t> address = Parameter<uint16_t>::createParameter(this, "Addres
|
||||
};
|
||||
|
||||
class ParamSetAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, ParamSetAction, GomspaceCommands> {
|
||||
: public TemplateAction<GomspaceDeviceHandler, ParamSetAction, GOMSPACE::GomspaceCommands> {
|
||||
public:
|
||||
FSFW_ENUM(ParameterByteSize, uint8_t,
|
||||
((ONE_BYTE, 1, "One Byte"))((TWO_BYTES, 2, "Two Bytes"))((FOUR_BYTES, 4, "Four Bytes")))
|
||||
|
||||
ParamSetAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::PARAM_SET) {}
|
||||
: TemplateAction(owner, GOMSPACE::PARAM_SET) {}
|
||||
|
||||
Parameter<uint16_t> address = Parameter<uint16_t>::createParameter(this, "Address");
|
||||
Parameter<uint32_t> parameter = Parameter<uint32_t>::createParameter(this, "Parameter Value");
|
||||
@ -60,22 +60,22 @@ class ParamSetAction
|
||||
};
|
||||
|
||||
class RequestHkTableAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, RequestHkTableAction, GomspaceCommands> {
|
||||
: public TemplateAction<GomspaceDeviceHandler, RequestHkTableAction, GOMSPACE::GomspaceCommands> {
|
||||
public:
|
||||
RequestHkTableAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::REQUEST_HK_TABLE) {}
|
||||
: TemplateAction(owner, GOMSPACE::REQUEST_HK_TABLE) {}
|
||||
};
|
||||
|
||||
class PrintSwitchVIAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, PrintSwitchVIAction, GomspaceCommands> {
|
||||
: public TemplateAction<GomspaceDeviceHandler, PrintSwitchVIAction, GOMSPACE::GomspaceCommands> {
|
||||
public:
|
||||
PrintSwitchVIAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::PRINT_SWITCH_V_I) {}
|
||||
: TemplateAction(owner, GOMSPACE::PRINT_SWITCH_V_I) {}
|
||||
};
|
||||
|
||||
class PrintLatchupsAction
|
||||
: public TemplateAction<GomspaceDeviceHandler, PrintLatchupsAction, GomspaceCommands> {
|
||||
: public TemplateAction<GomspaceDeviceHandler, PrintLatchupsAction, GOMSPACE::GomspaceCommands> {
|
||||
public:
|
||||
PrintLatchupsAction(GomspaceDeviceHandler* owner)
|
||||
: TemplateAction(owner, GomspaceCommands::PRINT_LATCHUPS) {}
|
||||
: TemplateAction(owner, GOMSPACE::PRINT_LATCHUPS) {}
|
||||
};
|
@ -4,7 +4,7 @@
|
||||
#include <fsfw/datapoollocal/LocalPoolVariable.h>
|
||||
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||
#include <fsfw/introspection/Enum.h>
|
||||
#include <fsfw/introspection/ClasslessEnum.h>
|
||||
#include <fsfw/power/definitions.h>
|
||||
|
||||
#include <cstdint>
|
||||
@ -13,6 +13,18 @@
|
||||
|
||||
namespace GOMSPACE {
|
||||
|
||||
/**
|
||||
* Device commands are derived from the rparam.h of the gomspace lib..
|
||||
* IDs above 50 are reserved for device specific commands.
|
||||
*/
|
||||
FSFW_CLASSLESS_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")))
|
||||
|
||||
enum class Pdu { PDU1, PDU2 };
|
||||
|
||||
using ChannelSwitchHook = void (*)(Pdu pdu, uint8_t channel, bool on, void* args);
|
||||
@ -29,18 +41,6 @@ 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.
|
||||
*/
|
||||
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 {
|
||||
|
||||
enum class BatteryModes : uint8_t { CRITICAL = 1, SAFE = 2, NORMAL = 3, FULL = 4 };
|
||||
|
Reference in New Issue
Block a user