Replaced RetrieveRegistersFromTarget event with TC command
This commit is contained in:
@@ -10,5 +10,6 @@ namespace Bloom::TargetController::Commands
|
||||
STOP_TARGET_EXECUTION,
|
||||
RESUME_TARGET_EXECUTION,
|
||||
RESET_TARGET,
|
||||
READ_TARGET_REGISTERS,
|
||||
};
|
||||
}
|
||||
|
||||
30
src/TargetController/Commands/ReadTargetRegisters.hpp
Normal file
30
src/TargetController/Commands/ReadTargetRegisters.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "Command.hpp"
|
||||
#include "src/TargetController/Responses/TargetRegistersRead.hpp"
|
||||
|
||||
#include "src/Targets/TargetRegister.hpp"
|
||||
|
||||
namespace Bloom::TargetController::Commands
|
||||
{
|
||||
class ReadTargetRegisters: public Command
|
||||
{
|
||||
public:
|
||||
using SuccessResponseType = Responses::TargetRegistersRead;
|
||||
|
||||
static constexpr CommandType type = CommandType::READ_TARGET_REGISTERS;
|
||||
static inline const std::string name = "ReadTargetRegisters";
|
||||
|
||||
Targets::TargetRegisterDescriptors descriptors;
|
||||
|
||||
explicit ReadTargetRegisters(const Targets::TargetRegisterDescriptors& descriptors)
|
||||
: descriptors(descriptors)
|
||||
{};
|
||||
|
||||
[[nodiscard]] CommandType getType() const override {
|
||||
return ReadTargetRegisters::type;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user