Resource Tuner
Loading...
Searching...
No Matches
Extensions.h File Reference
#include <iostream>
#include <vector>
#include <unordered_map>

Go to the source code of this file.

Classes

class  Extensions
 Extensions. More...
 

Macros

#define RESTUNE_REGISTER_APPLIER_CB(resCode, resourceApplierCallback)    static Extensions CONCAT(_resourceApplier, resCode)(resCode, 0, resourceApplierCallback);
 Register a Customer Resource Applier Callback for a particular ResCode.
 
#define RESTUNE_REGISTER_TEAR_CB(resCode, resourceTearCallback)    static Extensions CONCAT(_resourceTear, resCode)(resCode, 1, resourceTearCallback);
 Register a Customer Resource Teardown Callback for a particular ResCode.
 
#define RESTUNE_REGISTER_CONFIG(configType, yamlFile)    static Extensions CONCAT(_regConfig, configType)(configType, yamlFile);
 Register custom Config (YAML) file. This Macro can be used to register Resource Configs File, Signal Configs file and others with Resource Tuner.
 

Enumerations

enum  ConfigType
 Different Config (via YAML) Types supported. More...
 

Macro Definition Documentation

◆ RESTUNE_REGISTER_APPLIER_CB

#define RESTUNE_REGISTER_APPLIER_CB (   resCode,
  resourceApplierCallback 
)     static Extensions CONCAT(_resourceApplier, resCode)(resCode, 0, resourceApplierCallback);

Register a Customer Resource Applier Callback for a particular ResCode.

Parameters
resCodeAn unsigned 32-bit integer representing the Resource ResCode.
resourceApplierCallbackA function Pointer to the Custom Applier Callback.
Note
This macro must be used in the Global Scope.
Examples
Plugin.cpp.

Definition at line 70 of file Extensions.h.

◆ RESTUNE_REGISTER_CONFIG

#define RESTUNE_REGISTER_CONFIG (   configType,
  yamlFile 
)     static Extensions CONCAT(_regConfig, configType)(configType, yamlFile);

Register custom Config (YAML) file. This Macro can be used to register Resource Configs File, Signal Configs file and others with Resource Tuner.

Parameters
configTypeThe type of Config for which the Custom YAML file has to be specified.
yamlFileFile Path of this Config YAML file.
Note
This macro must be used in the Global Scope.

Definition at line 93 of file Extensions.h.

◆ RESTUNE_REGISTER_TEAR_CB

#define RESTUNE_REGISTER_TEAR_CB (   resCode,
  resourceTearCallback 
)     static Extensions CONCAT(_resourceTear, resCode)(resCode, 1, resourceTearCallback);

Register a Customer Resource Teardown Callback for a particular ResCode.

Parameters
resCodeAn unsigned 32-bit integer representing the Resource ResCode.
resourceTearCallbackA function Pointer to the Custom Teardown Callback.
Note
This macro must be used in the Global Scope.
Examples
Plugin.cpp.

Definition at line 81 of file Extensions.h.

Enumeration Type Documentation

◆ ConfigType

enum ConfigType

Different Config (via YAML) Types supported.

Note, the Config File corresponding to each config type can be altered via the Extensions interface.

Definition at line 23 of file Extensions.h.

23 {
24 RESOURCE_CONFIG,
25 PROPERTIES_CONFIG,
26 SIGNALS_CONFIG,
27 EXT_FEATURES_CONFIG,
28 TARGET_CONFIG,
29 INIT_CONFIG,
30 TOTAL_CONFIGS_COUNT
31};