Resource Tuner
Loading...
Searching...
No Matches
Utils.h File Reference
#include <cstdint>
#include <string>
#include "ErrCodes.h"

Go to the source code of this file.

Enumerations

enum  RequestType
 Enumeration for different types of Resource-Tuner Requests.
 
enum  Permissions { PERMISSION_SYSTEM , PERMISSION_THIRD_PARTY , NUMBER_PERMISSIONS }
 Certain resources can be accessed only by system clients and some which have no such restrictions and can be accessed even by third party clients. More...
 
enum  PriorityLevel
 Resource Tuner Priority Levels. More...
 
enum  Policy { INSTANT_APPLY , HIGHER_BETTER , LOWER_BETTER , LAZY_APPLY }
 Different Resource Policies supported by Resource Tuner. More...
 

Enumeration Type Documentation

◆ Permissions

Certain resources can be accessed only by system clients and some which have no such restrictions and can be accessed even by third party clients.

Enumerator
PERMISSION_SYSTEM 

Special permission level for system clients.

PERMISSION_THIRD_PARTY 

Third party clients. Default value.

NUMBER_PERMISSIONS 

Total number of permissions currently supported.

Definition at line 35 of file Utils.h.

35 {
39};
@ NUMBER_PERMISSIONS
Total number of permissions currently supported.
Definition Utils.h:38
@ PERMISSION_THIRD_PARTY
Third party clients. Default value.
Definition Utils.h:37
@ PERMISSION_SYSTEM
Special permission level for system clients.
Definition Utils.h:36

◆ Policy

enum Policy

Different Resource Policies supported by Resource Tuner.

Resource Policies determine the order in which the Tuning Requests will be processed for a particular resource. Currently 4 types of Policies are supported:

Enumerator
INSTANT_APPLY 

This policy is for resources where the latest request needs to be honored.

HIGHER_BETTER 

This policy first applies the request writing the highest value to the node.

LOWER_BETTER 

Self-explanatory. Works exactly opposite of the higher is better policy.

LAZY_APPLY 

The requests are applied in a first-in-first-out manner.

Definition at line 61 of file Utils.h.

61 {
66};
@ HIGHER_BETTER
This policy first applies the request writing the highest value to the node.
Definition Utils.h:63
@ LAZY_APPLY
The requests are applied in a first-in-first-out manner.
Definition Utils.h:65
@ INSTANT_APPLY
This policy is for resources where the latest request needs to be honored.
Definition Utils.h:62
@ LOWER_BETTER
Self-explanatory. Works exactly opposite of the higher is better policy.
Definition Utils.h:64

◆ PriorityLevel

Resource Tuner Priority Levels.

Each Request will have a priority level. This is used to determine the order in which requests are processed for a specific Resource. The Requests with higher Priority will be prioritized.

Definition at line 47 of file Utils.h.

47 {
48 SYSTEM_HIGH = 0, // Highest Level of Priority
49 SYSTEM_LOW,
50 THIRD_PARTY_HIGH,
51 THIRD_PARTY_LOW,
52 TOTAL_PRIORITIES
53};