1 // 2 // Copyright © 2022,2023 Arm Ltd and Contributors. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 6 #pragma once 7 8 #include <cstdint> 9 #include <string> 10 11 namespace arm 12 { 13 14 namespace pipe 15 { 16 17 class Counter final 18 { 19 public: 20 // Constructors Counter(const std::string & backendId,uint16_t counterUid,uint16_t maxCounterUid,uint16_t counterClass,uint16_t interpolation,double multiplier,const std::string & name,const std::string & description,const std::string & units,uint16_t deviceUid,uint16_t counterSetUid)21 Counter(const std::string& backendId, 22 uint16_t counterUid, 23 uint16_t maxCounterUid, 24 uint16_t counterClass, 25 uint16_t interpolation, 26 double multiplier, 27 const std::string& name, 28 const std::string& description, 29 const std::string& units, 30 uint16_t deviceUid, 31 uint16_t counterSetUid) 32 : m_BackendId(backendId) 33 , m_Uid(counterUid) 34 , m_MaxCounterUid(maxCounterUid) 35 , m_Class(counterClass) 36 , m_Interpolation(interpolation) 37 , m_Multiplier(multiplier) 38 , m_Name(name) 39 , m_Description(description) 40 , m_Units(units) 41 , m_DeviceUid(deviceUid) 42 , m_CounterSetUid(counterSetUid) 43 {} 44 45 // Fields 46 std::string m_BackendId; 47 uint16_t m_Uid; 48 uint16_t m_MaxCounterUid; 49 uint16_t m_Class; 50 uint16_t m_Interpolation; 51 double m_Multiplier; 52 std::string m_Name; 53 std::string m_Description; 54 std::string m_Units; // Optional, leave empty if the counter does not need units 55 56 // Connections 57 uint16_t m_DeviceUid; // Optional, set to zero if the counter is not associated with a device 58 uint16_t m_CounterSetUid; // Optional, set to zero if the counter is not associated with a counter set 59 }; 60 61 } // namespace pipe 62 63 } // namespace arm 64