• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <cstdint>
9 
10 namespace arm
11 {
12 
13 namespace pipe
14 {
15 
16 class IReadCounterValues
17 {
18 public:
~IReadCounterValues()19     virtual ~IReadCounterValues() {}
20 
21     virtual bool IsCounterRegistered(uint16_t counterUid) const = 0;
22     virtual bool IsCounterRegistered(const std::string& counterName) const = 0;
23     virtual uint16_t GetCounterCount() const = 0;
24     virtual uint32_t GetAbsoluteCounterValue(uint16_t counterUid) const = 0;
25     virtual uint32_t GetDeltaCounterValue(uint16_t counterUid) = 0;
26 };
27 
28 class IWriteCounterValues
29 {
30 public:
~IWriteCounterValues()31     virtual ~IWriteCounterValues() {}
32 
33     virtual void SetCounterValue(uint16_t counterUid, uint32_t value) = 0;
34     virtual uint32_t AddCounterValue(uint16_t counterUid, uint32_t value) = 0;
35     virtual uint32_t SubtractCounterValue(uint16_t counterUid, uint32_t value) = 0;
36     virtual uint32_t IncrementCounterValue(uint16_t counterUid) = 0;
37 };
38 
39 class IReadWriteCounterValues : public IReadCounterValues, public IWriteCounterValues
40 {
41 public:
~IReadWriteCounterValues()42     virtual ~IReadWriteCounterValues() {}
43 };
44 
45 } // namespace pipe
46 
47 } // namespace arm
48