Replaced RetrieveTargetPinStates event with TC command

This commit is contained in:
Nav
2022-05-01 00:07:12 +01:00
parent 7c4e39dd03
commit 870c4ba3d7
10 changed files with 75 additions and 64 deletions

View File

@@ -20,5 +20,6 @@ namespace Bloom::TargetController::Commands
SET_BREAKPOINT,
REMOVE_BREAKPOINT,
SET_PROGRAM_COUNTER,
GET_TARGET_PIN_STATES,
};
}

View File

@@ -0,0 +1,31 @@
#pragma once
#include "Command.hpp"
#include "src/TargetController/Responses/TargetPinStates.hpp"
namespace Bloom::TargetController::Commands
{
class GetTargetPinStates: public Command
{
public:
using SuccessResponseType = Responses::TargetPinStates;
static constexpr CommandType type = CommandType::GET_TARGET_PIN_STATES;
static inline const std::string name = "GetTargetPinStates";
int variantId = 0;
explicit GetTargetPinStates(int variantId)
: variantId(variantId)
{};
[[nodiscard]] CommandType getType() const override {
return GetTargetPinStates::type;
}
[[nodiscard]] bool requiresStoppedTargetState() const override {
return true;
}
};
}