aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingService.hpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-10-10 14:30:29 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-10-10 14:30:56 +0100
commit8efc500a7465c03877db8bbe443134f2b1bbc1af (patch)
treefcf4f4a56fa5f20ace8a1e5dfc175cecfd2373a7 /src/profiling/ProfilingService.hpp
parenta3600ba71978225e4d21399fb781d4850f2bb25f (diff)
downloadarmnn-8efc500a7465c03877db8bbe443134f2b1bbc1af.tar.gz
IVGCVSW-3963 Implement the Request Counter Directory Handler
* Integrated the RequestCounterDirectoryCommandHandler in the ProfilingService class * Code refactoring * Added/Updated unit tests Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I60d9f8acf166e29b3dabc921dbdb8149461bd85f
Diffstat (limited to 'src/profiling/ProfilingService.hpp')
-rw-r--r--src/profiling/ProfilingService.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp
index edeb6bde90..0e66924267 100644
--- a/src/profiling/ProfilingService.hpp
+++ b/src/profiling/ProfilingService.hpp
@@ -13,6 +13,7 @@
#include "BufferManager.hpp"
#include "SendCounterPacket.hpp"
#include "ConnectionAcknowledgedCommandHandler.hpp"
+#include "RequestCounterDirectoryCommandHandler.hpp"
namespace armnn
{
@@ -81,6 +82,7 @@ private:
BufferManager m_BufferManager;
SendCounterPacket m_SendCounterPacket;
ConnectionAcknowledgedCommandHandler m_ConnectionAcknowledgedCommandHandler;
+ RequestCounterDirectoryCommandHandler m_RequestCounterDirectoryCommandHandler;
protected:
// Default constructor/destructor kept protected for testing
@@ -103,9 +105,17 @@ protected:
, m_ConnectionAcknowledgedCommandHandler(1,
m_PacketVersionResolver.ResolvePacketVersion(1).GetEncodedValue(),
m_StateMachine)
+ , m_RequestCounterDirectoryCommandHandler(3,
+ m_PacketVersionResolver.ResolvePacketVersion(3).GetEncodedValue(),
+ m_CounterDirectory,
+ m_SendCounterPacket,
+ m_StateMachine)
{
// Register the "Connection Acknowledged" command handler
m_CommandHandlerRegistry.RegisterFunctor(&m_ConnectionAcknowledgedCommandHandler);
+
+ // Register the "Request Counter Directory" command handler
+ m_CommandHandlerRegistry.RegisterFunctor(&m_RequestCounterDirectoryCommandHandler);
}
~ProfilingService() = default;
@@ -124,6 +134,10 @@ protected:
{
return instance.m_ProfilingConnection.get();
}
+ void TransitionToState(ProfilingService& instance, ProfilingState newState)
+ {
+ instance.m_StateMachine.TransitionToState(newState);
+ }
};
} // namespace profiling