Added atomic sessions in TC

This commit is contained in:
Nav
2023-06-01 22:13:07 +01:00
parent 2ea7c1e67b
commit 30936fe0a2
11 changed files with 333 additions and 30 deletions

View File

@@ -9,6 +9,8 @@ namespace Bloom::TargetController::Commands
GENERIC,
SHUTDOWN,
GET_TARGET_DESCRIPTOR,
START_ATOMIC_SESSION,
END_ATOMIC_SESSION,
STOP_TARGET_EXECUTION,
RESUME_TARGET_EXECUTION,
RESET_TARGET,

View File

@@ -0,0 +1,25 @@
#pragma once
#include "Command.hpp"
#include "src/TargetController/Responses/AtomicSessionId.hpp"
namespace Bloom::TargetController::Commands
{
class EndAtomicSession: public Command
{
public:
static constexpr CommandType type = CommandType::END_ATOMIC_SESSION;
static const inline std::string name = "EndAtomicSession";
AtomicSessionIdType sessionId;
explicit EndAtomicSession(AtomicSessionIdType sessionId)
: sessionId(sessionId)
{}
[[nodiscard]] CommandType getType() const override {
return EndAtomicSession::type;
}
};
}

View File

@@ -0,0 +1,21 @@
#pragma once
#include "Command.hpp"
#include "src/TargetController/Responses/AtomicSessionId.hpp"
namespace Bloom::TargetController::Commands
{
class StartAtomicSession: public Command
{
public:
using SuccessResponseType = Responses::AtomicSessionId;
static constexpr CommandType type = CommandType::START_ATOMIC_SESSION;
static const inline std::string name = "StartAtomicSession";
[[nodiscard]] CommandType getType() const override {
return StartAtomicSession::type;
}
};
}