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 --- src/profiling/test/ProfilingTests.hpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/profiling/test/ProfilingTests.hpp') diff --git a/src/profiling/test/ProfilingTests.hpp b/src/profiling/test/ProfilingTests.hpp index c350fd2860..f96a1c89ab 100644 --- a/src/profiling/test/ProfilingTests.hpp +++ b/src/profiling/test/ProfilingTests.hpp @@ -10,10 +10,12 @@ #include #include -#include #include #include +#include + + #include #include @@ -82,14 +84,14 @@ public: return false; } - Packet ReadPacket(uint32_t timeout) override + arm::pipe::Packet ReadPacket(uint32_t timeout) override { // First time we're called return a connection ack packet. After that always timeout. if (m_FirstCall) { m_FirstCall = false; // Return connection acknowledged packet - return Packet(65536); + return arm::pipe::Packet(65536); } else { @@ -108,7 +110,7 @@ public: : m_ReadRequests(0) {} - Packet ReadPacket(uint32_t timeout) override + arm::pipe::Packet ReadPacket(uint32_t timeout) override { // Return connection acknowledged packet after three timeouts if (m_ReadRequests % 3 == 0) @@ -118,7 +120,7 @@ public: throw armnn::TimeoutException("Simulate a timeout error\n"); } - return Packet(65536); + return arm::pipe::Packet(65536); } int ReadCalledCount() @@ -137,7 +139,7 @@ public: : m_ReadRequests(0) {} - Packet ReadPacket(uint32_t timeout) override + arm::pipe::Packet ReadPacket(uint32_t timeout) override { IgnoreUnused(timeout); ++m_ReadRequests; @@ -156,7 +158,7 @@ private: class TestProfilingConnectionBadAckPacket : public TestProfilingConnectionBase { public: - Packet ReadPacket(uint32_t timeout) override + arm::pipe::Packet ReadPacket(uint32_t timeout) override { IgnoreUnused(timeout); // Connection Acknowledged Packet header (word 0, word 1 is always zero): @@ -168,18 +170,18 @@ public: uint32_t packetId = 37; // Wrong packet id!!! uint32_t header = ((packetFamily & 0x0000003F) << 26) | ((packetId & 0x000003FF) << 16); - return Packet(header); + return arm::pipe::Packet(header); } }; -class TestFunctorA : public CommandHandlerFunctor +class TestFunctorA : public arm::pipe::CommandHandlerFunctor { public: using CommandHandlerFunctor::CommandHandlerFunctor; int GetCount() { return m_Count; } - void operator()(const Packet& packet) override + void operator()(const arm::pipe::Packet& packet) override { IgnoreUnused(packet); m_Count++; -- cgit v1.2.1