Replaced ReportTargetControllerState event with TC command and renamed TargetControllerStateReported event
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user