From bbfe603e5ae42317a2b67d713d00882bea341c88 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Mon, 20 Jul 2020 16:57:44 +0100 Subject: IVGCVSW-5166 Pull out the common and server side code into standalone libraries Change-Id: I180f84c493a9b2be4b93b25d312ebdd9e71b1735 Signed-off-by: Jim Flynn --- tests/profiling/gatordmock/GatordMockService.hpp | 51 +++++++++++++----------- 1 file changed, 27 insertions(+), 24 deletions(-) (limited to 'tests/profiling/gatordmock/GatordMockService.hpp') diff --git a/tests/profiling/gatordmock/GatordMockService.hpp b/tests/profiling/gatordmock/GatordMockService.hpp index 8bad41cdfb..1c45d4ea98 100644 --- a/tests/profiling/gatordmock/GatordMockService.hpp +++ b/tests/profiling/gatordmock/GatordMockService.hpp @@ -1,28 +1,31 @@ // -// Copyright © 2019 Arm Ltd. All rights reserved. +// Copyright © 2019 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #pragma once -#include -#include - -#include -#include -#include - -#include -#include -#include -#include +// local includes #include "PeriodicCounterCaptureCommandHandler.hpp" #include "StreamMetadataCommandHandler.hpp" +#include "StubCommandHandler.hpp" -#include +#include +#include +#include -#include "PacketVersionResolver.hpp" -#include "StubCommandHandler.hpp" +#include + +#include +#include +#include + +// src/profiling +#include + +#include +#include +#include namespace armnn { @@ -37,7 +40,7 @@ class GatordMockService public: /// @param registry reference to a command handler registry. /// @param echoPackets if true the raw packets will be printed to stdout. - GatordMockService(std::unique_ptr clientConnection, bool echoPackets) + GatordMockService(std::unique_ptr clientConnection, bool echoPackets) : m_BasePipeServer(std::move(clientConnection)) , m_EchoPackets(echoPackets) , m_CloseReceivingThread(false) @@ -122,12 +125,12 @@ public: return m_DirectoryCaptureCommandHandler; } - timelinedecoder::TimelineDecoder& GetTimelineDecoder() + arm::pipe::TimelineDecoder& GetTimelineDecoder() { return m_TimelineDecoder; } - timelinedecoder::TimelineDirectoryCaptureCommandHandler& GetTimelineDirectoryCaptureCommandHandler() + arm::pipe::TimelineDirectoryCaptureCommandHandler& GetTimelineDirectoryCaptureCommandHandler() { return m_TimelineDirectoryCaptureCommandHandler; } @@ -135,7 +138,7 @@ public: private: void ReceiveLoop(); - std::unique_ptr m_BasePipeServer; + std::unique_ptr m_BasePipeServer; std::atomic m_PacketsReceivedCount; @@ -143,10 +146,10 @@ private: std::thread m_ListeningThread; std::atomic m_CloseReceivingThread; - profiling::PacketVersionResolver m_PacketVersionResolver; - profiling::CommandHandlerRegistry m_HandlerRegistry; + arm::pipe::PacketVersionResolver m_PacketVersionResolver; + arm::pipe::CommandHandlerRegistry m_HandlerRegistry; - timelinedecoder::TimelineDecoder m_TimelineDecoder; + arm::pipe::TimelineDecoder m_TimelineDecoder; gatordmock::PeriodicCounterCaptureCommandHandler m_CounterCaptureCommandHandler; gatordmock::StreamMetadataCommandHandler m_StreamMetadataCommandHandler; @@ -154,8 +157,8 @@ private: profiling::DirectoryCaptureCommandHandler m_DirectoryCaptureCommandHandler; - timelinedecoder::TimelineCaptureCommandHandler m_TimelineCaptureCommandHandler; - timelinedecoder::TimelineDirectoryCaptureCommandHandler m_TimelineDirectoryCaptureCommandHandler; + arm::pipe::TimelineCaptureCommandHandler m_TimelineCaptureCommandHandler; + arm::pipe::TimelineDirectoryCaptureCommandHandler m_TimelineDirectoryCaptureCommandHandler; }; } // namespace gatordmock -- cgit v1.2.1