1 // 2 // Copyright © 2017 Arm Ltd and Contributors. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 6 #pragma once 7 8 #include "Packet.hpp" 9 #include <cstdint> 10 11 namespace arm 12 { 13 14 namespace pipe 15 { 16 17 class CommandHandlerFunctor 18 { 19 public: CommandHandlerFunctor(uint32_t familyId,uint32_t packetId,uint32_t version)20 CommandHandlerFunctor(uint32_t familyId, uint32_t packetId, uint32_t version) 21 : m_FamilyId(familyId), 22 m_PacketId(packetId) 23 , m_Version(version) 24 {} 25 26 uint32_t GetFamilyId() const; 27 uint32_t GetPacketId() const; 28 uint32_t GetVersion() const; 29 30 virtual void operator()(const Packet& packet) = 0; 31 ~CommandHandlerFunctor()32 virtual ~CommandHandlerFunctor() {} 33 34 private: 35 uint32_t m_FamilyId; 36 uint32_t m_PacketId; 37 uint32_t m_Version; 38 }; 39 40 } // namespace pipe 41 42 } // namespace arm 43