aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/CommandHandler.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/CommandHandler.hpp')
-rw-r--r--src/profiling/CommandHandler.hpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/profiling/CommandHandler.hpp b/src/profiling/CommandHandler.hpp
deleted file mode 100644
index b097f9ef20..0000000000
--- a/src/profiling/CommandHandler.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-
-#pragma once
-
-#include "IProfilingConnection.hpp"
-#include <common/include/PacketVersionResolver.hpp>
-
-#include <common/include/CommandHandlerRegistry.hpp>
-
-#include <atomic>
-#include <thread>
-
-namespace arm
-{
-
-namespace pipe
-{
-
-class CommandHandler
-{
-public:
- CommandHandler(uint32_t timeout,
- bool stopAfterTimeout,
- arm::pipe::CommandHandlerRegistry& commandHandlerRegistry,
- arm::pipe::PacketVersionResolver& packetVersionResolver)
- : m_Timeout(timeout),
- m_StopAfterTimeout(stopAfterTimeout),
- m_IsRunning(false),
- m_KeepRunning(false),
- m_CommandThread(),
- m_CommandHandlerRegistry(commandHandlerRegistry),
- m_PacketVersionResolver(packetVersionResolver)
- {}
- ~CommandHandler() { Stop(); }
-
- void SetTimeout(uint32_t timeout) { m_Timeout.store(timeout); }
- void SetStopAfterTimeout(bool stopAfterTimeout) { m_StopAfterTimeout.store(stopAfterTimeout); }
-
- void Start(IProfilingConnection& profilingConnection);
- void Stop();
- bool IsRunning() const { return m_IsRunning.load(); }
-
-private:
- void HandleCommands(IProfilingConnection& profilingConnection);
-
- std::atomic<uint32_t> m_Timeout;
- std::atomic<bool> m_StopAfterTimeout;
- std::atomic<bool> m_IsRunning;
- std::atomic<bool> m_KeepRunning;
- std::thread m_CommandThread;
-
- arm::pipe::CommandHandlerRegistry& m_CommandHandlerRegistry;
- arm::pipe::PacketVersionResolver& m_PacketVersionResolver;
-};
-
-} // namespace pipe
-
-} // namespace arm