aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-10-07 12:35:21 +0100
committerJim Flynn Arm <jim.flynn@arm.com>2019-10-08 08:22:51 +0000
commitc2728f95086c54aa842e4c1dae8f3b5c290a72fa (patch)
tree82002c3d0c97abfeed905d0e922579dab09b2c31 /src/profiling/ConnectionAcknowledgedCommandHandler.cpp
parente61ffd00a37f02338129e92d65be2f01600014c0 (diff)
downloadarmnn-c2728f95086c54aa842e4c1dae8f3b5c290a72fa.tar.gz
IVGCVSW-3937 Refactor and improve the CommandHandleRegistry class
* Added simplified RegisterFunctor method * Code refactoring * Updated the unit tests accordingly Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Iee941d898facd9c1ab5366e87c611c99a0468830
Diffstat (limited to 'src/profiling/ConnectionAcknowledgedCommandHandler.cpp')
-rw-r--r--src/profiling/ConnectionAcknowledgedCommandHandler.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/profiling/ConnectionAcknowledgedCommandHandler.cpp b/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
index 0f83a3181b..f90b601b7e 100644
--- a/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
+++ b/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
@@ -17,10 +17,12 @@ 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()));
+ throw armnn::InvalidArgumentException(std::string("Expected Packet family = 0, id = 1 but received family = ")
+ + std::to_string(packet.GetPacketFamily())
+ + " id = " + std::to_string(packet.GetPacketId()));
}
+
+ // Once a Connection Acknowledged packet has been received, move to the Active state immediately
m_StateMachine.TransitionToState(ProfilingState::Active);
}