Replaced ReportTargetControllerState event with TC command and renamed TargetControllerStateReported event

This commit is contained in:
Nav
2022-04-27 21:27:59 +01:00
parent f42abe1342
commit 687e28718c
12 changed files with 46 additions and 91 deletions

View File

@@ -19,8 +19,7 @@ namespace Bloom::Events
DEBUG_SESSION_STARTED,
DEBUG_SESSION_FINISHED,
TARGET_CONTROLLER_THREAD_STATE_CHANGED,
REPORT_TARGET_CONTROLLER_STATE,
TARGET_CONTROLLER_STATE_REPORTED,
TARGET_CONTROLLER_STATE_CHANGED,
SHUTDOWN_TARGET_CONTROLLER,
TARGET_CONTROLLER_ERROR_OCCURRED,
SHUTDOWN_APPLICATION,

View File

@@ -6,8 +6,7 @@
#include "DebugSessionStarted.hpp"
#include "DebugSessionFinished.hpp"
#include "TargetControllerThreadStateChanged.hpp"
#include "ReportTargetControllerState.hpp"
#include "TargetControllerStateReported.hpp"
#include "TargetControllerStateChanged.hpp"
#include "ShutdownTargetController.hpp"
#include "TargetControllerErrorOccurred.hpp"
#include "ShutdownApplication.hpp"

View File

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

View File

@@ -7,21 +7,23 @@
namespace Bloom::Events
{
class TargetControllerStateReported: public Event
class TargetControllerStateChanged: public Event
{
public:
static constexpr EventType type = EventType::TARGET_CONTROLLER_STATE_REPORTED;
static inline const std::string name = "TargetControllerStateReported";
static constexpr EventType type = EventType::TARGET_CONTROLLER_STATE_CHANGED;
static inline const std::string name = "TargetControllerStateChanged";
TargetController::TargetControllerState state;
explicit TargetControllerStateReported(TargetController::TargetControllerState state): state(state) {};
explicit TargetControllerStateChanged(TargetController::TargetControllerState state)
: state(state)
{};
[[nodiscard]] EventType getType() const override {
return TargetControllerStateReported::type;
return TargetControllerStateChanged::type;
}
[[nodiscard]] std::string getName() const override {
return TargetControllerStateReported::name;
return TargetControllerStateChanged::name;
}
};
}