2022-04-19 21:12:59 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
2022-04-23 17:41:28 +01:00
|
|
|
#include <optional>
|
|
|
|
|
|
2022-04-19 21:12:59 +01:00
|
|
|
#include "Command.hpp"
|
|
|
|
|
|
2022-09-06 17:16:49 +01:00
|
|
|
#include "src/Targets/TargetMemory.hpp"
|
|
|
|
|
|
2022-04-19 21:12:59 +01:00
|
|
|
namespace Bloom::TargetController::Commands
|
|
|
|
|
{
|
|
|
|
|
class ResumeTargetExecution: public Command
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static constexpr CommandType type = CommandType::RESUME_TARGET_EXECUTION;
|
|
|
|
|
static inline const std::string name = "ResumeTargetExecution";
|
|
|
|
|
|
2022-09-06 17:16:49 +01:00
|
|
|
std::optional<Targets::TargetProgramCounter> fromProgramCounter;
|
2022-04-19 21:12:59 +01:00
|
|
|
|
|
|
|
|
ResumeTargetExecution() = default;
|
2022-09-06 17:16:49 +01:00
|
|
|
explicit ResumeTargetExecution(Targets::TargetProgramCounter fromProgramCounter)
|
2022-04-19 21:12:59 +01:00
|
|
|
: fromProgramCounter(fromProgramCounter)
|
|
|
|
|
{};
|
|
|
|
|
|
|
|
|
|
[[nodiscard]] CommandType getType() const override {
|
|
|
|
|
return ResumeTargetExecution::type;
|
|
|
|
|
}
|
2022-04-29 22:06:05 +01:00
|
|
|
|
|
|
|
|
[[nodiscard]] bool requiresStoppedTargetState() const override {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2022-04-19 21:12:59 +01:00
|
|
|
};
|
|
|
|
|
}
|