blob: 0f83a3181ba923c3a343f2847cb252eca490fdc1 [file] [log] [blame]
Sadik Armaganb5f01b22019-09-18 17:29:00 +01001//
2// Copyright © 2019 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#include "ConnectionAcknowledgedCommandHandler.hpp"
7
8#include <armnn/Exceptions.hpp>
9
10namespace armnn
11{
12
13namespace profiling
14{
15
16void ConnectionAcknowledgedCommandHandler::operator()(const Packet& packet)
17{
18 if (!(packet.GetPacketFamily() == 0u && packet.GetPacketId() == 1u))
19 {
20 throw armnn::Exception(std::string("Expected Packet family = 0, id = 1 but received family =")
21 + std::to_string(packet.GetPacketFamily())
22 +" id = " + std::to_string(packet.GetPacketId()));
23 }
24 m_StateMachine.TransitionToState(ProfilingState::Active);
25}
26
27} // namespace profiling
28
29} // namespace armnn
30