AlexaClientSDK  1.20.1
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Classes | Functions | Variables
alexaClientSDK::capabilityAgents::speakerManager Namespace Reference

Namespaces

 test
 

Classes

class  ChannelVolumeManager
 
class  DefaultChannelVolumeFactory
 
class  SpeakerManager
 

Functions

static const std::string TAG ("ChannelVolumeManager")
 
template<class T >
static bool withinBounds (T value, T min, T max)
 
template<class T >
static bool withinBounds (T value, T min, T max)
 
static void submitMetric (const std::shared_ptr< MetricRecorderInterface > &metricRecorder, const std::string &eventName, int count)
 
static std::shared_ptr< avsCommon::avs::CapabilityConfigurationgetSpeakerCapabilityConfiguration ()
 

Variables

const std::string NAMESPACE = "Speaker"
 The Speaker interface namespace. More...
 
const avsCommon::avs::NamespaceAndName SET_VOLUME {NAMESPACE, "SetVolume"}
 The SetVolume directive identifier. More...
 
const avsCommon::avs::NamespaceAndName ADJUST_VOLUME {NAMESPACE, "AdjustVolume"}
 The AdjustVolume directive identifier. More...
 
const avsCommon::avs::NamespaceAndName SET_MUTE {NAMESPACE, "SetMute"}
 The SetMute directive directive identifier. More...
 
const avsCommon::avs::NamespaceAndName VOLUME_STATE {NAMESPACE, "VolumeState"}
 The Volume State for use with the context. More...
 
const char VOLUME_KEY [] = "volume"
 The Volume Key in AVS Directives and Events. More...
 
const char MUTE_KEY [] = "mute"
 The Mute Key. For directives. More...
 
const char MUTED_KEY [] = "muted"
 The Muted Key. For events. More...
 
const std::string VOLUME_CHANGED = "VolumeChanged"
 The VolumeChanged event key. More...
 
const std::string MUTE_CHANGED = "MuteChanged"
 The VolumeMute event. More...
 
static const float UPPER_VOLUME_CURVE_FRACTION = 0.40
 The fraction of maximum volume used for the upper threshold in the default volume curve. More...
 
static const float LOWER_VOLUME_CURVE_FRACTION = 0.20
 The fraction of maximum volume used for the lower threshold in the default volume curve. More...
 
static const std::string SPEAKER_CAPABILITY_INTERFACE_TYPE = "AlexaInterface"
 
static const std::string SPEAKER_CAPABILITY_INTERFACE_NAME = "Speaker"
 Speaker interface name. More...
 
static const std::string SPEAKER_CAPABILITY_INTERFACE_VERSION = "1.0"
 Speaker interface version. More...
 
static const std::vector< int > DEFAULT_RETRY_TABLE
 Retry timeout table. More...
 
static const std::string TAG {"SpeakerManager"}
 String to identify log entries originating from this file. More...
 
static const std::string SPEAKERMANAGER_CONFIGURATION_ROOT_KEY = "speakerManagerCapabilityAgent"
 The key in our config file to find the root of speaker manager configuration. More...
 
static const std::string SPEAKERMANAGER_MIN_UNMUTE_VOLUME_KEY = "minUnmuteVolume"
 The key in our config file to find the minUnmuteVolume value. More...
 
static const std::string SPEAKER_MANAGER_METRIC_PREFIX = "SPEAKER_MANAGER-"
 prefix for metrics emitted from the SpeakerManager CA More...
 

Function Documentation

◆ getSpeakerCapabilityConfiguration()

std::shared_ptr< CapabilityConfiguration > alexaClientSDK::capabilityAgents::speakerManager::getSpeakerCapabilityConfiguration ( )
static

Creates the Speaker capability configuration.

Returns
The Speaker capability configuration.

◆ submitMetric()

static void alexaClientSDK::capabilityAgents::speakerManager::submitMetric ( const std::shared_ptr< MetricRecorderInterface > &  metricRecorder,
const std::string &  eventName,
int  count 
)
static

Handles a Metric event by creating and recording it. Failure to create or record the event results in an early return.

Parameters
metricRecorderThe MetricRecorderInterface which records Metric events.
eventNameThe name of the Metric event.
countCount of the metric that is emitted.

◆ TAG()

static const std::string alexaClientSDK::capabilityAgents::speakerManager::TAG ( "ChannelVolumeManager"  )
static

◆ withinBounds() [1/2]

template<class T >
static bool alexaClientSDK::capabilityAgents::speakerManager::withinBounds ( value,
min,
max 
)
static

Checks whether a value is within the bounds.

Template Parameters
TThe class type of the input parameters.
Parameters
valueThe value to check.
minThe minimum value.
maxThe maximum value.

◆ withinBounds() [2/2]

template<class T >
static bool alexaClientSDK::capabilityAgents::speakerManager::withinBounds ( value,
min,
max 
)
static

Checks whether a value is within the bounds.

Parameters
valueThe value to check.
minThe minimum value.
maxThe maximum value.

Variable Documentation

◆ ADJUST_VOLUME

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::speakerManager::ADJUST_VOLUME {NAMESPACE, "AdjustVolume"}

The AdjustVolume directive identifier.

◆ DEFAULT_RETRY_TABLE

const std::vector<int> alexaClientSDK::capabilityAgents::speakerManager::DEFAULT_RETRY_TABLE
static
Initial value:
= {std::chrono::milliseconds(10).count(),
std::chrono::milliseconds(20).count(),
std::chrono::milliseconds(40).count()}

Retry timeout table.

◆ LOWER_VOLUME_CURVE_FRACTION

const float alexaClientSDK::capabilityAgents::speakerManager::LOWER_VOLUME_CURVE_FRACTION = 0.20
static

The fraction of maximum volume used for the lower threshold in the default volume curve.

◆ MUTE_CHANGED

const std::string alexaClientSDK::capabilityAgents::speakerManager::MUTE_CHANGED = "MuteChanged"

The VolumeMute event.

◆ MUTE_KEY

const char alexaClientSDK::capabilityAgents::speakerManager::MUTE_KEY[] = "mute"

The Mute Key. For directives.

◆ MUTED_KEY

const char alexaClientSDK::capabilityAgents::speakerManager::MUTED_KEY[] = "muted"

The Muted Key. For events.

◆ NAMESPACE

const std::string alexaClientSDK::capabilityAgents::speakerManager::NAMESPACE = "Speaker"

The Speaker interface namespace.

◆ SET_MUTE

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::speakerManager::SET_MUTE {NAMESPACE, "SetMute"}

The SetMute directive directive identifier.

◆ SET_VOLUME

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::speakerManager::SET_VOLUME {NAMESPACE, "SetVolume"}

The SetVolume directive identifier.

◆ SPEAKER_CAPABILITY_INTERFACE_NAME

const std::string alexaClientSDK::capabilityAgents::speakerManager::SPEAKER_CAPABILITY_INTERFACE_NAME = "Speaker"
static

Speaker interface name.

◆ SPEAKER_CAPABILITY_INTERFACE_TYPE

const std::string alexaClientSDK::capabilityAgents::speakerManager::SPEAKER_CAPABILITY_INTERFACE_TYPE = "AlexaInterface"
static

Speaker capability constants Speaker interface type

◆ SPEAKER_CAPABILITY_INTERFACE_VERSION

const std::string alexaClientSDK::capabilityAgents::speakerManager::SPEAKER_CAPABILITY_INTERFACE_VERSION = "1.0"
static

Speaker interface version.

◆ SPEAKER_MANAGER_METRIC_PREFIX

const std::string alexaClientSDK::capabilityAgents::speakerManager::SPEAKER_MANAGER_METRIC_PREFIX = "SPEAKER_MANAGER-"
static

prefix for metrics emitted from the SpeakerManager CA

◆ SPEAKERMANAGER_CONFIGURATION_ROOT_KEY

const std::string alexaClientSDK::capabilityAgents::speakerManager::SPEAKERMANAGER_CONFIGURATION_ROOT_KEY = "speakerManagerCapabilityAgent"
static

The key in our config file to find the root of speaker manager configuration.

◆ SPEAKERMANAGER_MIN_UNMUTE_VOLUME_KEY

const std::string alexaClientSDK::capabilityAgents::speakerManager::SPEAKERMANAGER_MIN_UNMUTE_VOLUME_KEY = "minUnmuteVolume"
static

The key in our config file to find the minUnmuteVolume value.

◆ TAG

const std::string alexaClientSDK::capabilityAgents::speakerManager::TAG {"SpeakerManager"}
static

String to identify log entries originating from this file.

◆ UPPER_VOLUME_CURVE_FRACTION

const float alexaClientSDK::capabilityAgents::speakerManager::UPPER_VOLUME_CURVE_FRACTION = 0.40
static

The fraction of maximum volume used for the upper threshold in the default volume curve.

◆ VOLUME_CHANGED

const std::string alexaClientSDK::capabilityAgents::speakerManager::VOLUME_CHANGED = "VolumeChanged"

The VolumeChanged event key.

◆ VOLUME_KEY

const char alexaClientSDK::capabilityAgents::speakerManager::VOLUME_KEY[] = "volume"

The Volume Key in AVS Directives and Events.

◆ VOLUME_STATE

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::speakerManager::VOLUME_STATE {NAMESPACE, "VolumeState"}

The Volume State for use with the context.

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