Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "Packet.hpp" |
| 7 | |
| 8 | #include <cstdint> |
| 9 | |
Derek Lamberti | 1dd75b3 | 2019-12-10 21:23:23 +0000 | [diff] [blame] | 10 | #include <boost/core/ignore_unused.hpp> |
| 11 | |
Aron Virginas-Tar | e898db9 | 2019-08-22 12:56:34 +0100 | [diff] [blame] | 12 | namespace armnn |
| 13 | { |
| 14 | |
| 15 | namespace profiling |
| 16 | { |
| 17 | |
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 18 | #pragma once |
| 19 | |
| 20 | class CommandHandlerFunctor |
| 21 | { |
| 22 | public: |
Jim Flynn | 397043f | 2019-10-17 17:37:10 +0100 | [diff] [blame] | 23 | CommandHandlerFunctor(uint32_t familyId, uint32_t packetId, uint32_t version) |
| 24 | : m_FamilyId(familyId), |
| 25 | m_PacketId(packetId) |
Matteo Martincigh | c2728f9 | 2019-10-07 12:35:21 +0100 | [diff] [blame] | 26 | , m_Version(version) |
| 27 | {} |
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 28 | |
Jim Flynn | 397043f | 2019-10-17 17:37:10 +0100 | [diff] [blame] | 29 | uint32_t GetFamilyId() const; |
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 30 | uint32_t GetPacketId() const; |
| 31 | uint32_t GetVersion() const; |
| 32 | |
Derek Lamberti | 1dd75b3 | 2019-12-10 21:23:23 +0000 | [diff] [blame] | 33 | virtual void operator()(const Packet& packet) = 0; |
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 34 | |
Jim Flynn | c4728ad | 2019-10-07 15:15:12 +0100 | [diff] [blame] | 35 | virtual ~CommandHandlerFunctor() {} |
| 36 | |
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 37 | private: |
Jim Flynn | 397043f | 2019-10-17 17:37:10 +0100 | [diff] [blame] | 38 | uint32_t m_FamilyId; |
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 39 | uint32_t m_PacketId; |
| 40 | uint32_t m_Version; |
Aron Virginas-Tar | e898db9 | 2019-08-22 12:56:34 +0100 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | } // namespace profiling |
| 44 | |
| 45 | } // namespace armnn |