Resource Tuner
|
Functions | |
int64_t | tuneResources (int64_t duration, int32_t prop, int32_t numRes, SysResource *resourceList) |
Tune Resource Values for finite or finite duration. | |
int8_t | retuneResources (int64_t handle, int64_t duration) |
Modify the duration of a previously issued Tune Request. | |
int8_t | untuneResources (int64_t handle) |
Release (or free) the Request with the given handle. | |
int8_t | getProp (const char *prop, char *buffer, size_t bufferSize, const char *defValue) |
Gets a property from the Config Store. | |
int64_t | tuneSignal (uint32_t signalCode, int64_t duration, int32_t properties, const char *appName, const char *scenario, int32_t numArgs, uint32_t *list) |
Tune the signal with the given ID. | |
int8_t | relaySignal (uint32_t signalCode, int64_t duration, int32_t properties, const char *appName, const char *scenario, int32_t numArgs, uint32_t *list) |
Relay the signal to all the features subscribed to the signal with the given ID. | |
int8_t | untuneSignal (int64_t handle) |
Release (or free) the signal with the given handle. | |
Resource Tuner's Client-Facing APIs.
int8_t getProp | ( | const char * | prop, |
char * | buffer, | ||
size_t | bufferSize, | ||
const char * | defValue | ||
) |
Gets a property from the Config Store.
Use this API to fetch a Property by it's name, all the properties are Parsed during Resource Tuner Server initialization.
prop | Name of the Property to be fetched. |
buffer | A buffer to hold the result, i.e. the property value corresponding to the specified name. |
bufferSize | Size of the buffer |
defValue | Value to return in case a property with the specified Name is not found in the Config Store |
int8_t relaySignal | ( | uint32_t | signalCode, |
int64_t | duration, | ||
int32_t | properties, | ||
const char * | appName, | ||
const char * | scenario, | ||
int32_t | numArgs, | ||
uint32_t * | list | ||
) |
Relay the signal to all the features subscribed to the signal with the given ID.
Use this API to issue Signal Relay Requests.
signalCode | A uniqued 32-bit (unsigned) identifier for the Signal |
duration | Duration (in milliseconds) |
properties | A 32 bit signed Integer storing the Properties of the Request.
|
appName | Name of the Application that is issuing the Request |
scenario | Name of the Scenario that is issuing the Request |
numArgs | Number of Additional Arguments to be passed as part of the Request |
list | List of Additional Arguments to be passed as part of the Request |
int8_t retuneResources | ( | int64_t | handle, |
int64_t | duration | ||
) |
Modify the duration of a previously issued Tune Request.
Use this API to increase the duration (in milliseconds) of an existing Request issued via.
handle | Request Handle, returned by tuneResources. |
duration | The new duration for the previously issued Tune request. A value of -1 denotes infinite duration. |
int64_t tuneResources | ( | int64_t | duration, |
int32_t | prop, | ||
int32_t | numRes, | ||
SysResource * | resourceList | ||
) |
Tune Resource Values for finite or finite duration.
Use this API to issue Resource Provisioning / Tuning Requests.
duration | Duration (in milliseconds) to provision the Resources for. A value of -1 denotes infinite duration. |
properties | A 32 bit signed Integer storing the Properties of the Request. |
numRes | Number of Resources to be tuned as part of the Request |
resourceList | List of Resources to be provisioned as part of the Request |
int64_t tuneSignal | ( | uint32_t | signalCode, |
int64_t | duration, | ||
int32_t | properties, | ||
const char * | appName, | ||
const char * | scenario, | ||
int32_t | numArgs, | ||
uint32_t * | list | ||
) |
Tune the signal with the given ID.
Use this API to issue Signal Provisioning Requests, for a certain duration of time.
signalCode | A uniqued 32-bit (unsigned) identifier for the Signal |
duration | Duration (in milliseconds) to provision the Resources for. A value of -1 denotes infinite duration. |
properties | A 32 bit signed Integer storing the Properties of the Request.
|
appName | Name of the Application that is issuing the Request |
scenario | Name of the Scenario that is issuing the Request |
numArgs | Number of Additional Arguments to be passed as part of the Request |
list | List of Additional Arguments to be passed as part of the Request |
int8_t untuneResources | ( | int64_t | handle | ) |
Release (or free) the Request with the given handle.
Use this API to issue Signal De-Provisioning Requests.
handle | Request Handle, returned by the tuneResources API call. |