16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_POWERRESOURCEMANAGERINTERFACE_H_ 17 #define ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_POWERRESOURCEMANAGERINTERFACE_H_ 27 namespace sdkInterfaces {
209 virtual std::shared_ptr<PowerResourceId>
create(
211 bool isRefCounted =
true,
221 const std::shared_ptr<PowerResourceId>&
id,
222 const std::chrono::milliseconds autoReleaseTimeout = std::chrono::milliseconds::zero()) = 0;
229 virtual bool release(
const std::shared_ptr<PowerResourceId>&
id) = 0;
236 virtual bool close(
const std::shared_ptr<PowerResourceId>&
id) = 0;
245 return std::chrono::milliseconds::zero();
259 return std::chrono::milliseconds::zero();
271 return "STANDBY_LOW";
273 return "STANDBY_MED";
275 return "STANDBY_HIGH";
281 return "ACTIVE_HIGH";
303 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_POWERRESOURCEMANAGERINTERFACE_H_ STANDBY_MED usually means all the hardware components work in the medium standby power levels...
PowerResourceLevel
Definition: PowerResourceManagerInterface.h:49
virtual void acquirePowerResource(const std::string &component, const PowerResourceLevel level=PowerResourceLevel::STANDBY_MED)=0
A reserved type that allows platforms to reserve custom PowerResourceTypeFlags.
Definition: PowerResourceManagerInterface.h:84
virtual ~PowerResourceManagerInterface()=default
std::ostream & operator<<(std::ostream &stream, const AudioInputProcessorObserverInterface::State &state)
Definition: AudioInputProcessorObserverInterface.h:94
ACTIVE_LOW usually means all the hardware components work in the medium active power levels...
Flag value which represents the storage resource type.
Definition: PowerResourceManagerInterface.h:112
Flag value which represents the CPU resource type.
Definition: PowerResourceManagerInterface.h:108
::std::string string
Definition: gtest-port.h:1097
virtual bool isPowerResourceAcquired(const std::string &component)=0
virtual void releasePowerResource(const std::string &component)=0
CPU capacity is limited or improved under the CPU resource type.
Definition: PowerResourceManagerInterface.h:76
STANDBY_HIGH usually means all the hardware components work in the highest standby power levels...
Flag value which represents the network resource type.
Definition: PowerResourceManagerInterface.h:114
Number of power resource types. This must always be the last enum member.
Definition: PowerResourceManagerInterface.h:88
ACTIVE_HIGH usually means all the hardware components work in the highest active power levels...
PowerResourceTypeIndex
Definition: PowerResourceManagerInterface.h:74
PowerResourceTypeFlag
Definition: PowerResourceManagerInterface.h:104
DDR latency/bandwidth are limited or improved under the DDR resource type.
Definition: PowerResourceManagerInterface.h:78
std::string powerResourceLevelToString(PowerResourceManagerInterface::PowerResourceLevel level)
Definition: PowerResourceManagerInterface.h:268
The default flag value which corresponds to all power resource types.
Definition: PowerResourceManagerInterface.h:106
A reserved type that allows platforms to reserve custom PowerResourceTypeFlags.
Definition: PowerResourceManagerInterface.h:86
virtual std::shared_ptr< PowerResourceId > create(const std::string &resourceId, bool isRefCounted=true, const PowerResourceLevel level=PowerResourceLevel::STANDBY_MED)=0
Flag value which represents the first reserved resource type.
Definition: PowerResourceManagerInterface.h:116
Definition: PowerResourceManagerInterface.h:38
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::string getResourceId() const
Definition: PowerResourceManagerInterface.h:190
virtual bool release(const std::shared_ptr< PowerResourceId > &id)=0
virtual bool close(const std::shared_ptr< PowerResourceId > &id)=0
PowerResourceId(const std::string &resourceId)
Constructor.
Definition: PowerResourceManagerInterface.h:194
Disk I/O performance is limited or improved under the storage resource type.
Definition: PowerResourceManagerInterface.h:80
Network latency is limited or improved under the network resource type.
Definition: PowerResourceManagerInterface.h:82
Flag value which represents the second reserved resource type.
Definition: PowerResourceManagerInterface.h:118
std::bitset< PowerResourceTypeIndex::NUM_OF_TYPES > PartialStateBitSet
Definition: PowerResourceManagerInterface.h:94
Flag value which represents the DDR resource type.
Definition: PowerResourceManagerInterface.h:110
Definition: PowerResourceManagerInterface.h:186
virtual bool acquire(const std::shared_ptr< PowerResourceId > &id, const std::chrono::milliseconds autoReleaseTimeout=std::chrono::milliseconds::zero())=0
virtual std::chrono::milliseconds getTimeSinceLastResumeMS()
Definition: PowerResourceManagerInterface.h:244
virtual std::chrono::milliseconds getTimeSinceLastPartialMS(const std::string &component, PartialStateBitSet &resourceFlags, PartialStateBitSet partialState=PowerResourceTypeFlag::TYPE_ALL_FLAG)
Definition: PowerResourceManagerInterface.h:255