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
diff --git a/src/profiling/ConnectionAcknowledgedCommandHandler.cpp b/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
index 0f83a31..f90b601 100644
--- a/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
+++ b/src/profiling/ConnectionAcknowledgedCommandHandler.cpp
@@ -17,10 +17,12 @@
{
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);
}