aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/ConnectionAcknowledgedCommandHandler.cpp')
-rw-r--r--src/profiling/ConnectionAcknowledgedCommandHandler.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/profiling/ConnectionAcknowledgedCommandHandler.cpp b/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
new file mode 100644
index 0000000000..0f83a3181b
--- /dev/null
+++ b/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
@@ -0,0 +1,30 @@
+//
+// Copyright © 2019 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#include "ConnectionAcknowledgedCommandHandler.hpp"
+
+#include <armnn/Exceptions.hpp>
+
+namespace armnn
+{
+
+namespace profiling
+{
+
+void ConnectionAcknowledgedCommandHandler::operator()(const Packet& packet)
+{
+ if (!(packet.GetPacketFamily() == 0u && packet.GetPacketId() == 1u))
+ {
+ throw armnn::Exception(std::string("Expected Packet family = 0, id = 1 but received family =")
+ + std::to_string(packet.GetPacketFamily())
+ +" id = " + std::to_string(packet.GetPacketId()));
+ }
+ m_StateMachine.TransitionToState(ProfilingState::Active);
+}
+
+} // namespace profiling
+
+} // namespace armnn
+