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

Namespaces

 test
 

Classes

class  ChannelVolumeManager
 
class  DefaultChannelVolumeFactory
 
class  SpeakerManager
 
class  SpeakerManagerConfigHelper
 
class  SpeakerManagerMiscStorage
 
struct  SpeakerManagerStorageInterface
 
struct  SpeakerManagerStorageState
 

Typedefs

using SpeakerManagerComponent = acsdkManufactory::Component< std::shared_ptr< avsCommon::sdkInterfaces::SpeakerManagerInterface >, acsdkManufactory::Import< std::shared_ptr< avsCommon::sdkInterfaces::storage::MiscStorageInterface > >, acsdkManufactory::Import< std::shared_ptr< acsdkShutdownManagerInterfaces::ShutdownNotifierInterface > >, acsdkManufactory::Import< std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > >, acsdkManufactory::Import< std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > >, acsdkManufactory::Import< std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > >, acsdkManufactory::Import< acsdkManufactory::Annotated< avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation, avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface > >, acsdkManufactory::Import< std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > >>
 
using DefaultEndpointAnnotation = avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation
 

Functions

SpeakerManagerComponent getComponent ()
 
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 std::string getSourceString (SpeakerManagerObserverInterface::Source source)
 
static void submitMetric (const std::shared_ptr< MetricRecorderInterface > &metricRecorder, const std::string &eventName, int count)
 
static std::shared_ptr< avsCommon::avs::CapabilityConfigurationgetSpeakerCapabilityConfiguration ()
 
static const std::string TAG ("SpeakerManagerMiscStorage")
 String to identify log entries originating from this file. More...
 

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 SPEAKER_MANAGER_METRIC_PREFIX = "SPEAKER_MANAGER-"
 prefix for metrics emitted from the SpeakerManager CA More...
 
static const std::string COMPONENT_NAME = "SpeakerManager"
 Component name for Misc DB. More...
 
static const std::string COMPONENT_STATE_TABLE = "SpeakerManagerConfig"
 Misc DB table for component state. More...
 
static const std::string COMPONENT_STATE_KEY = "SpeakerManagerConfig"
 Misc DB table entry for component state. More...
 
static const std::string SPEAKER_CHANNEL_STATE = "speakerChannelState"
 The key in our config for speaker volume. More...
 
static const std::string ALERTS_CHANNEL_STATE = "alertsChannelState"
 The key in our config for speaker volume. More...
 
static const std::string ALERTS_VOLUME_KEY = "alertsVolume"
 The key in our config for alerts volume. More...
 
static const std::string CHANNEL_VOLUME_KEY = "channelVolume"
 The key in our config for speaker volume. More...
 
static const std::string CHANNEL_MUTE_STATUS_KEY = "channelMuteStatus"
 The key in our config for speaker volume. More...
 

Typedef Documentation

◆ DefaultEndpointAnnotation

◆ SpeakerManagerComponent

Definition of a Manufactory component for the SpeakerManager.

Function Documentation

◆ getComponent()

SpeakerManagerComponent alexaClientSDK::capabilityAgents::speakerManager::getComponent ( )

Creates an manufactory component that exports a shared pointer to an implementation of SpeakerManagerInterface.

Returns
A component.

◆ getSourceString()

static std::string alexaClientSDK::capabilityAgents::speakerManager::getSourceString ( SpeakerManagerObserverInterface::Source  source)
inlinestatic

Converts the SpeakerManagerObserverInterface::Source to a string.

Parameters
sourceThe input SpeakerManagerObserverInterface::Source.
Returns
The String representing the source.

◆ 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() [1/2]

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

◆ TAG() [2/2]

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

String to identify log entries originating from this file.

◆ 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.

◆ ALERTS_CHANNEL_STATE

const std::string alexaClientSDK::capabilityAgents::speakerManager::ALERTS_CHANNEL_STATE = "alertsChannelState"
static

The key in our config for speaker volume.

◆ ALERTS_VOLUME_KEY

const std::string alexaClientSDK::capabilityAgents::speakerManager::ALERTS_VOLUME_KEY = "alertsVolume"
static

The key in our config for alerts volume.

◆ CHANNEL_MUTE_STATUS_KEY

const std::string alexaClientSDK::capabilityAgents::speakerManager::CHANNEL_MUTE_STATUS_KEY = "channelMuteStatus"
static

The key in our config for speaker volume.

◆ CHANNEL_VOLUME_KEY

const std::string alexaClientSDK::capabilityAgents::speakerManager::CHANNEL_VOLUME_KEY = "channelVolume"
static

The key in our config for speaker volume.

◆ COMPONENT_NAME

const std::string alexaClientSDK::capabilityAgents::speakerManager::COMPONENT_NAME = "SpeakerManager"
static

Component name for Misc DB.

◆ COMPONENT_STATE_KEY

const std::string alexaClientSDK::capabilityAgents::speakerManager::COMPONENT_STATE_KEY = "SpeakerManagerConfig"
static

Misc DB table entry for component state.

◆ COMPONENT_STATE_TABLE

const std::string alexaClientSDK::capabilityAgents::speakerManager::COMPONENT_STATE_TABLE = "SpeakerManagerConfig"
static

Misc DB table for component state.

◆ 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_CHANNEL_STATE

const std::string alexaClientSDK::capabilityAgents::speakerManager::SPEAKER_CHANNEL_STATE = "speakerChannelState"
static

The key in our config for speaker volume.

◆ 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

◆ 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.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0