New GetTargetState insight worker task

This commit is contained in:
Nav
2022-09-07 02:19:53 +01:00
parent 5ff59d64a8
commit dfa56d08d2
3 changed files with 33 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ target_sources(
${CMAKE_CURRENT_SOURCE_DIR}/InsightWorker/Tasks/ReadStackPointer.cpp ${CMAKE_CURRENT_SOURCE_DIR}/InsightWorker/Tasks/ReadStackPointer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/InsightWorker/Tasks/QueryLatestVersionNumber.cpp ${CMAKE_CURRENT_SOURCE_DIR}/InsightWorker/Tasks/QueryLatestVersionNumber.cpp
${CMAKE_CURRENT_SOURCE_DIR}/InsightWorker/Tasks/ReadProgramCounter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/InsightWorker/Tasks/ReadProgramCounter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/InsightWorker/Tasks/GetTargetState.cpp
# Error dialogue window # Error dialogue window
${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.cpp ${CMAKE_CURRENT_SOURCE_DIR}/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.cpp

View File

@@ -0,0 +1,10 @@
#include "GetTargetState.hpp"
namespace Bloom
{
using TargetController::TargetControllerConsole;
void GetTargetState::run(TargetControllerConsole& targetControllerConsole) {
emit this->targetState(targetControllerConsole.getTargetState());
}
}

View File

@@ -0,0 +1,22 @@
#pragma once
#include "InsightWorkerTask.hpp"
#include "src/Targets/TargetState.hpp"
namespace Bloom
{
class GetTargetState: public InsightWorkerTask
{
Q_OBJECT
public:
GetTargetState() = default;
signals:
void targetState(Targets::TargetState state);
protected:
void run(TargetController::TargetControllerConsole& targetControllerConsole) override;
};
}