Narumol Prangnawarat | 4803369 | 2019-09-20 12:04:55 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2019 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include "CommandHandlerFunctor.hpp" |
| 9 | #include "ISendCounterPacket.hpp" |
Colm Donelan | 5ccb33d | 2020-01-24 16:27:02 +0000 | [diff] [blame] | 10 | #include "armnn/profiling/ISendTimelinePacket.hpp" |
Finn Williams | 56b465d | 2020-05-15 13:34:12 +0100 | [diff] [blame] | 11 | #include <Packet.hpp> |
Matteo Martincigh | 8efc500 | 2019-10-10 14:30:29 +0100 | [diff] [blame] | 12 | #include "ProfilingStateMachine.hpp" |
Narumol Prangnawarat | 4803369 | 2019-09-20 12:04:55 +0100 | [diff] [blame] | 13 | |
| 14 | namespace armnn |
| 15 | { |
| 16 | |
| 17 | namespace profiling |
| 18 | { |
| 19 | |
| 20 | class RequestCounterDirectoryCommandHandler : public CommandHandlerFunctor |
| 21 | { |
| 22 | |
| 23 | public: |
Jim Flynn | 397043f | 2019-10-17 17:37:10 +0100 | [diff] [blame] | 24 | RequestCounterDirectoryCommandHandler(uint32_t familyId, |
| 25 | uint32_t packetId, |
Matteo Martincigh | 8efc500 | 2019-10-10 14:30:29 +0100 | [diff] [blame] | 26 | uint32_t version, |
Narumol Prangnawarat | 4803369 | 2019-09-20 12:04:55 +0100 | [diff] [blame] | 27 | ICounterDirectory& counterDirectory, |
Matteo Martincigh | 8efc500 | 2019-10-10 14:30:29 +0100 | [diff] [blame] | 28 | ISendCounterPacket& sendCounterPacket, |
Matteo Martincigh | 9723d02 | 2019-11-13 10:56:41 +0000 | [diff] [blame] | 29 | ISendTimelinePacket& sendTimelinePacket, |
Matteo Martincigh | 8efc500 | 2019-10-10 14:30:29 +0100 | [diff] [blame] | 30 | ProfilingStateMachine& profilingStateMachine) |
Jim Flynn | 397043f | 2019-10-17 17:37:10 +0100 | [diff] [blame] | 31 | : CommandHandlerFunctor(familyId, packetId, version) |
Matteo Martincigh | 8efc500 | 2019-10-10 14:30:29 +0100 | [diff] [blame] | 32 | , m_CounterDirectory(counterDirectory) |
| 33 | , m_SendCounterPacket(sendCounterPacket) |
Matteo Martincigh | 9723d02 | 2019-11-13 10:56:41 +0000 | [diff] [blame] | 34 | , m_SendTimelinePacket(sendTimelinePacket) |
Matteo Martincigh | 8efc500 | 2019-10-10 14:30:29 +0100 | [diff] [blame] | 35 | , m_StateMachine(profilingStateMachine) |
Narumol Prangnawarat | 4803369 | 2019-09-20 12:04:55 +0100 | [diff] [blame] | 36 | {} |
| 37 | |
| 38 | void operator()(const Packet& packet) override; |
| 39 | |
Narumol Prangnawarat | 4803369 | 2019-09-20 12:04:55 +0100 | [diff] [blame] | 40 | private: |
Matteo Martincigh | 8efc500 | 2019-10-10 14:30:29 +0100 | [diff] [blame] | 41 | const ICounterDirectory& m_CounterDirectory; |
Narumol Prangnawarat | 4803369 | 2019-09-20 12:04:55 +0100 | [diff] [blame] | 42 | ISendCounterPacket& m_SendCounterPacket; |
Matteo Martincigh | 9723d02 | 2019-11-13 10:56:41 +0000 | [diff] [blame] | 43 | ISendTimelinePacket& m_SendTimelinePacket; |
Matteo Martincigh | 8efc500 | 2019-10-10 14:30:29 +0100 | [diff] [blame] | 44 | const ProfilingStateMachine& m_StateMachine; |
Narumol Prangnawarat | 4803369 | 2019-09-20 12:04:55 +0100 | [diff] [blame] | 45 | }; |
| 46 | |
| 47 | } // namespace profiling |
| 48 | |
| 49 | } // namespace armnn |