diff options
author | Jim Flynn <jim.flynn@arm.com> | 2022-03-23 23:01:26 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2022-03-23 23:43:35 +0000 |
commit | 3e9bc19ad523361e6b18057849e30c0c48183915 (patch) | |
tree | b7b012a9734ce39d054fc5d92302780fd838e5c8 /src/profiling/CommandHandler.hpp | |
parent | 277618302d0f131eac0b6ac2015dd3eb09aa6ff9 (diff) | |
download | armnn-3e9bc19ad523361e6b18057849e30c0c48183915.tar.gz |
IVGCVSW-6706 Create the libpipeClient library
Change-Id: I2368aade38ad3808fab55d8a86cd659d4e95d91e
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/CommandHandler.hpp')
-rw-r--r-- | src/profiling/CommandHandler.hpp | 61 |
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 |