• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include "EncodeVersion.hpp"
9 
10 namespace arm
11 {
12 
13 namespace pipe
14 {
15 
16 class PacketKey final
17 {
18 public:
PacketKey(uint32_t familyId,uint32_t packetId)19     PacketKey(uint32_t familyId, uint32_t packetId) : m_FamilyId(familyId), m_PacketId(packetId) {}
20 
GetFamilyId()21     uint32_t GetFamilyId() { return m_FamilyId; }
GetPacketId()22     uint32_t GetPacketId() { return m_PacketId; }
23 
24     bool operator< (const PacketKey& rhs) const;
25     bool operator> (const PacketKey& rhs) const;
26     bool operator<=(const PacketKey& rhs) const;
27     bool operator>=(const PacketKey& rhs) const;
28     bool operator==(const PacketKey& rhs) const;
29     bool operator!=(const PacketKey& rhs) const;
30 
31 private:
32     uint32_t m_FamilyId;
33     uint32_t m_PacketId;
34 };
35 
36 static const PacketKey ActivateTimeLinePacket(0 , 6);
37 static const PacketKey DeactivateTimeLinePacket(0 , 7);
38 
39 class PacketVersionResolver final
40 {
41 public:
42     PacketVersionResolver()  = default;
43     ~PacketVersionResolver() = default;
44 
45     Version ResolvePacketVersion(uint32_t familyId, uint32_t packetId) const;
46 };
47 
48 } // namespace pipe
49 
50 } // namespace arm
51