Replaced RetrieveRegistersFromTarget event with TC command

This commit is contained in:
Nav
2022-04-24 16:41:40 +01:00
parent a2d7cb8dc8
commit e662d0b57a
11 changed files with 82 additions and 92 deletions

View File

@@ -10,5 +10,6 @@ namespace Bloom::TargetController::Commands
STOP_TARGET_EXECUTION,
RESUME_TARGET_EXECUTION,
RESET_TARGET,
READ_TARGET_REGISTERS,
};
}

View 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;
}
};
}