Insight worker task for reading target memory
This commit is contained in:
9
src/Insight/InsightWorker/Tasks/ReadTargetMemory.cpp
Normal file
9
src/Insight/InsightWorker/Tasks/ReadTargetMemory.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "ReadTargetMemory.hpp"
|
||||
|
||||
using namespace Bloom;
|
||||
|
||||
void ReadTargetMemory::run(TargetControllerConsole& targetControllerConsole) {
|
||||
emit this->targetMemoryRead(
|
||||
targetControllerConsole.readMemory(this->memoryType, this->startAddress, this->size)
|
||||
);
|
||||
}
|
||||
30
src/Insight/InsightWorker/Tasks/ReadTargetMemory.hpp
Normal file
30
src/Insight/InsightWorker/Tasks/ReadTargetMemory.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "InsightWorkerTask.hpp"
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom
|
||||
{
|
||||
class ReadTargetMemory: public InsightWorkerTask
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ReadTargetMemory(Targets::TargetMemoryType memoryType, std::uint32_t startAddress, std::uint32_t size):
|
||||
InsightWorkerTask(), memoryType(memoryType), startAddress(startAddress), size(size) {}
|
||||
|
||||
signals:
|
||||
void targetMemoryRead(Targets::TargetMemoryBuffer buffer);
|
||||
|
||||
protected:
|
||||
void run(TargetControllerConsole& targetControllerConsole) override;
|
||||
|
||||
private:
|
||||
Targets::TargetMemoryType memoryType;
|
||||
std::uint32_t startAddress;
|
||||
std::uint32_t size;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user