Implemented ResetTaret handler in TargetController

This commit is contained in:
Nav
2022-04-08 22:14:01 +01:00
parent 42fd57cb6a
commit 1696d2dcbe
8 changed files with 70 additions and 1 deletions

View File

@@ -53,6 +53,7 @@ namespace Bloom::Events
SET_TARGET_PIN_STATE,
RETRIEVE_STACK_POINTER_FROM_TARGET,
STACK_POINTER_RETRIEVED_FROM_TARGET,
TARGET_RESET,
};
class Event

View File

@@ -41,6 +41,7 @@
#include "SetTargetPinState.hpp"
#include "RetrieveStackPointerFromTarget.hpp"
#include "StackPointerRetrievedFromTarget.hpp"
#include "TargetReset.hpp"
namespace Bloom::Events
{

View File

@@ -3,12 +3,15 @@
#include <string>
#include "Event.hpp"
#include "TargetReset.hpp"
namespace Bloom::Events
{
class ResetTarget: public Event
{
public:
using TargetControllerResponseType = TargetReset;
static constexpr EventType type = EventType::RESET_TARGET;
static inline const std::string name = "ResetTargetEvent";

View File

@@ -0,0 +1,23 @@
#pragma once
#include <string>
#include "Event.hpp"
namespace Bloom::Events
{
class TargetReset: public Event
{
public:
static constexpr EventType type = EventType::TARGET_RESET;
static inline const std::string name = "TargetReset";
[[nodiscard]] EventType getType() const override {
return TargetReset::type;
}
[[nodiscard]] std::string getName() const override {
return TargetReset::name;
}
};
}