AlexaClientSDK  1.20.1
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | List of all members
alexaClientSDK::avsCommon::sdkInterfaces::PowerResourceManagerInterface Class Referenceabstract

#include <PowerResourceManagerInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::PowerResourceManagerInterface:
Inheritance graph

Public Types

enum  PowerResourceLevel {
  PowerResourceLevel::STANDBY_LOW = 0, PowerResourceLevel::STANDBY_MED, PowerResourceLevel::STANDBY_HIGH, PowerResourceLevel::ACTIVE_LOW,
  PowerResourceLevel::ACTIVE_MED, PowerResourceLevel::ACTIVE_HIGH

Public Member Functions

virtual ~PowerResourceManagerInterface ()=default
virtual void acquirePowerResource (const std::string &component, const PowerResourceLevel level=PowerResourceLevel::ACTIVE_HIGH)=0
virtual void releasePowerResource (const std::string &component)=0
virtual bool isPowerResourceAcquired (const std::string &component)=0

Detailed Description

This interface provides APIs for components of AVS-SDK to manage power resources. These components, such as AudioInputProcessor and SpeechSynthesizer, can claim the level of power resource they need when active (listening or speacking) by invoking the acquirePowerResource API, such that the power management system keeps the hardware devices works in the claimed power levels. When the component is inactive, it invokes the releasePowerResource API to release the acquired power resource level. This interface defined 6 power resource levels. To implement this interface, the user need define a mapping from them to the real power resource levels of the power management system.

Member Enumeration Documentation

◆ PowerResourceLevel

Power resource levels. Each hardware device may have multiple STANDBY and ACTIVE power modes. For example, CPU can work in different frequency and number of cores. It has a latency to switch from low power mode to high power mode, and the latency increases with the gaps of the power levels. Power management system defines a group of power polices; each policy specifies the power modes of hardware components. To implement this interface, the user needs to map the power polices (that allow applications to proactively claim) to the 6 power resource levels we defined in this enumaration.


Constructor & Destructor Documentation

◆ ~PowerResourceManagerInterface()

virtual alexaClientSDK::avsCommon::sdkInterfaces::PowerResourceManagerInterface::~PowerResourceManagerInterface ( )


Member Function Documentation

◆ acquirePowerResource()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::PowerResourceManagerInterface::acquirePowerResource ( const std::string &  component,
const PowerResourceLevel  level = PowerResourceLevel::ACTIVE_HIGH 
pure virtual

Acquire a power resource for the component.

componentcomponent name.
levelpower resource level.

◆ isPowerResourceAcquired()

virtual bool alexaClientSDK::avsCommon::sdkInterfaces::PowerResourceManagerInterface::isPowerResourceAcquired ( const std::string &  component)
pure virtual

Checks whether a power resource had been acquired or not.

componentcomponent name.
true if the power resource had been acquired, otherwise return false.

◆ releasePowerResource()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::PowerResourceManagerInterface::releasePowerResource ( const std::string &  component)
pure virtual

Release the acquired power resource of the specified component.

componentcomponent name.

The documentation for this class was generated from the following file:

AlexaClientSDK 1.20.1 - Copyright 2016-2020, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0