TargetController suspension

This commit is contained in:
Nav
2021-05-30 16:52:32 +01:00
parent a0b59e3bf7
commit db2221741f
17 changed files with 441 additions and 162 deletions

View File

@@ -9,6 +9,8 @@
#include "DebugSessionStarted.hpp"
#include "DebugSessionFinished.hpp"
#include "TargetControllerThreadStateChanged.hpp"
#include "ReportTargetControllerState.hpp"
#include "TargetControllerStateReported.hpp"
#include "ShutdownTargetController.hpp"
#include "TargetControllerErrorOccurred.hpp"
#include "ShutdownApplication.hpp"
@@ -33,7 +35,7 @@
#include "ProgramCounterSetOnTarget.hpp"
#include "ExtractTargetDescriptor.hpp"
#include "TargetDescriptorExtracted.hpp"
#include "InsightStateChanged.hpp"
#include "InsightThreadStateChanged.hpp"
#include "RetrieveTargetPinStates.hpp"
#include "TargetPinStatesRetrieved.hpp"
#include "SetTargetPinState.hpp"

View File

@@ -7,19 +7,17 @@
namespace Bloom::Events
{
class InsightStateChanged: public Event
class InsightThreadStateChanged: public Event
{
private:
ThreadState state;
public:
InsightStateChanged(ThreadState state): state(state) {
InsightThreadStateChanged(ThreadState state): state(state) {};
};
static inline const std::string name = "InsightStateChanged";
static inline const std::string name = "InsightThreadStateChanged";
std::string getName() const override {
return InsightStateChanged::name;
return InsightThreadStateChanged::name;
}
ThreadState getState() const {

View File

@@ -0,0 +1,20 @@
#pragma once
#include <string>
#include "Event.hpp"
namespace Bloom::Events
{
class ReportTargetControllerState: public Event
{
public:
ReportTargetControllerState() {};
static inline const std::string name = "ReportTargetControllerState";
std::string getName() const override {
return ReportTargetControllerState::name;
}
};
}

View File

@@ -0,0 +1,23 @@
#pragma once
#include <string>
#include "Event.hpp"
#include "src/TargetController/TargetControllerState.hpp"
namespace Bloom::Events
{
class TargetControllerStateReported: public Event
{
public:
TargetControllerState state;
TargetControllerStateReported(TargetControllerState state): state(state) {};
static inline const std::string name = "TargetControllerStateReported";
std::string getName() const override {
return TargetControllerStateReported::name;
}
};
}