Sadik Armagan | b5f01b2 | 2019-09-18 17:29:00 +0100 | [diff] [blame] | 1 | // |
| 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 | |
| 10 | namespace armnn |
| 11 | { |
| 12 | |
| 13 | namespace profiling |
| 14 | { |
| 15 | |
| 16 | void 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 | |