Resource Tuner
Loading...
Searching...
No Matches
Resource.h
1// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2// SPDX-License-Identifier: BSD-3-Clause-Clear
3
4#ifndef RESOURCE_TUNER_RESOURCE_H
5#define RESOURCE_TUNER_RESOURCE_H
6
7#include <cstdint>
8#include <vector>
9
10#include "MemoryPool.h"
11
16class Resource {
17private:
24 uint32_t mResCode;
25
32 uint32_t mResInfo;
33 int32_t mOptionalInfo;
38 int32_t mNumValues;
39
40public:
41 union {
42 int32_t value;
43 std::vector<int32_t>* values;
45
47 mResValue.values = nullptr;
48 }
49 ~Resource();
50
51 // Copy Constructor
52 Resource(const Resource& resource);
53
54 int32_t getCoreValue() const;
55 int32_t getClusterValue() const;
56 int32_t getResInfo() const;
57 int32_t getOptionalInfo() const;
58 uint32_t getResCode() const;
59 int32_t getValuesCount() const;
60
61 void setCoreValue(int32_t core);
62 void setClusterValue(int32_t cluster);
63 void setResourceID(uint16_t resID);
64 void setResourceType(uint8_t resType);
65 void setResCode(uint32_t resCode);
66 void setResInfo(int32_t resInfo);
67 void setOptionalInfo(int32_t optionalInfo);
68 void setNumValues(int32_t numValues);
69};
70
71#endif
Used to store information regarding Resources / Tunables which need to be Provisioned as part of the ...
Definition Resource.h:16
int32_t mOptionalInfo
Field to hold optional information for Request Processing.
Definition Resource.h:33
union Resource::@1 mResValue
The value to be Configured for this Resource Node.
int32_t value
Use this field for single Valued Resources.
Definition Resource.h:42
uint32_t mResCode
A uniqued 32-bit (unsigned) identifier for the Resource.
Definition Resource.h:24
uint32_t mResInfo
Holds Logical Core and Cluster Information:
Definition Resource.h:32
int32_t mNumValues
Number of values to be configured for the Resource, both single-valued and multi-valued Resources are...
Definition Resource.h:38
std::vector< int32_t > * values
Use this field for Multi Valued Resources.
Definition Resource.h:43