Alexa Auto SDK  2.0.0
Public Types | Static Public Member Functions | List of all members
aace::alexa::config::AlexaConfiguration Class Reference

Public Types

enum  TemplateRuntimeTimeoutType {
  TemplateRuntimeTimeoutType::DISPLAY_CARD_TTS_FINISHED_TIMEOUT,
  TemplateRuntimeTimeoutType::DISPLAY_CARD_AUDIO_PLAYBACK_FINISHED_TIMEOUT,
  TemplateRuntimeTimeoutType::DISPLAY_CARD_AUDIO_PLAYBACK_STOPPED_PAUSED_TIMEOUT
}
 
using TemplateRuntimeTimeout = std::pair< TemplateRuntimeTimeoutType, std::chrono::milliseconds >
 
using EqualizerBand = aace::alexa::EqualizerControllerEngineInterface::EqualizerBand
 
using EqualizerBandLevel = aace::alexa::EqualizerControllerEngineInterface::EqualizerBandLevel
 

Static Public Member Functions

static std::shared_ptr< aace::core::config::EngineConfigurationcreateDeviceInfoConfig (const std::string &deviceSerialNumber, const std::string &clientId, const std::string &productId)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateAlertsConfig (const std::string &databaseFilePath)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateNotificationsConfig (const std::string &databaseFilePath)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateCertifiedSenderConfig (const std::string &databaseFilePath)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateCurlConfig (const std::string &certsPath, const std::string &iface="")
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateSettingsConfig (const std::string &databaseFilePath, const std::string &locale="en-US")
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateMiscStorageConfig (const std::string &databaseFilePath)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateSystemConfig (uint32_t firmwareVersion)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateSpeechRecognizerConfig (const std::string &encoderName)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateTemplateRuntimeTimeoutConfig (const std::vector< TemplateRuntimeTimeout > &timeoutList)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateExternalMediaPlayerConfig (const std::string &agent)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateEqualizerControllerConfig (const std::vector< EqualizerBand > &supportedBands={}, int minLevel=-6, int maxLevel=6, const std::vector< EqualizerBandLevel > &defaultBandLevels={})
 

Detailed Description

A factory interface for creating Alexa configuration objects

Member Typedef Documentation

◆ TemplateRuntimeTimeout

Identifies a Template Runtime configuration with a type and value pair

◆ EqualizerBand

Describes the equalizer bands supported by Alexa. The platform implementation may support a subset of these.

See also
aace::alexa::EqualizerControllerEngineInterface::EqualizerBand

◆ EqualizerBandLevel

Describes the level of gain of a particular equalizer band as an integer dB value. This is an aace::alexa::EqualizerController::EqualizerBand and int pair.

See also
aace::alexa::EqualizerControllerEngineInterface::EqualizerBandLevel

Member Enumeration Documentation

◆ TemplateRuntimeTimeoutType

enum specifying the configurable TemplateRuntime timeout.

Enumerator
DISPLAY_CARD_TTS_FINISHED_TIMEOUT 

Display Card timeout in ms when Alexa completes TTS

DISPLAY_CARD_AUDIO_PLAYBACK_FINISHED_TIMEOUT 

Display Card timeout in ms when AudioPlayback Completes.

DISPLAY_CARD_AUDIO_PLAYBACK_STOPPED_PAUSED_TIMEOUT 

Display Card timeout in ms when AudioPlayback Stopped or Paused.

Member Function Documentation

◆ createDeviceInfoConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createDeviceInfoConfig ( const std::string &  deviceSerialNumber,
const std::string &  clientId,
const std::string &  productId 
)
static

Factory method used to programmatically generate device info configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"deviceInfo":
{
"deviceSerialNumber": "<DEVICE_SERIAL_NUMBER>"
"clientId": "<CLIENT_ID>",
"productId": "<PRODUCT_ID>"
}
}
Parameters
[in]deviceSerialNumberThe device serial number used to authorize the client with AVS
[in]clientIdThe client ID used to authorize the client with AVS
[in]productIdThe product ID used to authorize the client with AVS

◆ createAlertsConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createAlertsConfig ( const std::string &  databaseFilePath)
static

Factory method used to programmatically generate alerts configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"alertsCapabilityAgent":
{
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>"
}
}
Parameters
[in]databaseFilePathThe file path to the SQLite database used to store persistent alerts data. The database will be created on initialization if it does not already exist.

◆ createNotificationsConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createNotificationsConfig ( const std::string &  databaseFilePath)
static

Factory method used to programmatically generate notifications configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"notifications":
{
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>"
}
}
Parameters
[in]databaseFilePathThe file path to the SQLite database used to store persistent notifications data. The database will be created on initialization if it does not already exist.

◆ createCertifiedSenderConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createCertifiedSenderConfig ( const std::string &  databaseFilePath)
static

Factory method used to programmatically generate certified sender configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"certifiedSender":
{
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>"
}
}
Parameters
[in]databaseFilePathThe file path to the SQLite database used to store persistent certified sender data. The database will be created on initialization if it does not already exist.

◆ createCurlConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createCurlConfig ( const std::string &  certsPath,
const std::string &  iface = "" 
)
static

Factory method used to programmatically generate CURL configuration data.

The 'libCurlUtils' sub-component of the global configuration supports the following options:

  • CURLOPT_CAPATH If present, specifies a value for the libcurl property CURLOPT_CAPATH.
  • CURLOPT_INTERFACE if present, specifies a value for the libcurl property CURLOPT_INTERFACE.

The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"libcurlUtils" : {
"CURLOPT_CAPATH" : "<CA_CERTIFICATES_FILE_PATH>"
"CURLOPT_INTERFACE" : "<NETWORK_INTERFACE_NAME>"
}
}
Parameters
[in]certsPathThe file path to the directory holding CA certificates
[in]ifaceThe specific network interface to use. This can be a network interface name, an IP address or a host name. Default to the system's primary network interface.

◆ createSettingsConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createSettingsConfig ( const std::string &  databaseFilePath,
const std::string &  locale = "en-US" 
)
static

Factory method used to programmatically generate settings configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"settings": {
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>",
"defaultAVSClientSettings": {
"locale": "<LOCALE>"
}
}
}
Parameters
[in]databaseFilePathThe file path to the SQLite database used to store persistent settings data. The database will be created on initialization if it does not already exist.
[in]localeThe current locale setting on the client. Default to "en-US".

◆ createMiscStorageConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createMiscStorageConfig ( const std::string &  databaseFilePath)
static

Factory method used to programmatically generate misc storage configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"miscDatabase":
{
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>",
}
}
Parameters
[in]databaseFilePathThe file path to the SQLite database used to store persistent misc storage data. The database will be created on initialization if it does not already exist.

◆ createSystemConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createSystemConfig ( uint32_t  firmwareVersion)
static

Factory method used to programmatically generate system configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"system": {
"firmwareVersion": "<FIRMWARE_VERSION>"
}
}
}
Parameters
[in]firmwareVersionThe firmware version of the client device

◆ createSpeechRecognizerConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createSpeechRecognizerConfig ( const std::string &  encoderName)
static

Factory method used to programmatically generate encoder configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"speechRecognizer": {
"encoder": {
"name": "<ENCODER_NAME>"
}
}
}
}
Parameters
[in]encoderNameThe encoder codec name to be used

◆ createTemplateRuntimeTimeoutConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createTemplateRuntimeTimeoutConfig ( const std::vector< TemplateRuntimeTimeout > &  timeoutList)
static

Factory method used to programmatically generate template runtime configuration data. This is an optional configuration. Following are the accepted keys and their description.

  • displayCardTTSFinishedTimeout If present, specifies the values in milli seconds to control the timeout of display card at the end of Alexa TTS.
  • displayCardAudioPlaybackFinishedTimeout If present, specifies the values in milli seconds to control the timeout of display card at the FINISHED state of AudioPlayback.
  • displayCardAudioPlaybackStoppedPausedTimeout If present, specifies the values in milli seconds to control the timeout of display card at STOP or PAUSE state of AudioPlayback. The data generated by this method is equivalent to providing the following JSON values in a configuration:
{
"templateRuntimeCapabilityAgent": {
"displayCardTTSFinishedTimeout": <TIMEOUT_IN_MS>,
"displayCardAudioPlaybackFinishedTimeout": <TIMEOUT_IN_MS>,
"displayCardAudioPlaybackStoppedPausedTimeout": <TIMEOUT_IN_MS>
}
}
Parameters
[in]timeoutListA list of TemplateRuntimeTimeout type and value pairs

◆ createExternalMediaPlayerConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createExternalMediaPlayerConfig ( const std::string &  agent)
static

Factory method used to programmatically generate external media player configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"externalMediaPlayer": {
"agent": "<agent>"
}
}
}
Parameters
[in]agentThe external media player agent

◆ createEqualizerControllerConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createEqualizerControllerConfig ( const std::vector< EqualizerBand > &  supportedBands = {},
int  minLevel = -6,
int  maxLevel = 6,
const std::vector< EqualizerBandLevel > &  defaultBandLevels = {} 
)
static

Factory method used to programmatically generate equalizer controller configuration data. This is an optional configuration, and default settings will be used if configuration is not provided. This method produces configuration data according to the JSON structure in the sample below.

"equalizer": {
"bands": {
"BASS": true,
"MIDRANGE": false,
"TREBLE": true
},
"defaultState": {
"bands": {
"BASS": 4,
"TREBLE": -1
}
},
"minLevel": -6,
"maxLevel": 6
}

The configuration branches are used as follows:

  • equalizer.bands: Specifies which bands are supported by the device and will be enabled for control with Alexa. Each child key is the name of an Alexa-supported band ("BASS", "MIDRANGE", or "TREBLE") and value is whether the device supports the band. Only bands explicitly declared supported will be enabled in the SDK and Alexa. Omitting this branch enables all bands by default.
  • equalizer.defaultState: Describes the default or reset state of the equalizer. These settings are used to reset the equalizer with Alexa such as by saying "Alexa, reset bass." If this branch or its child is omitted, default values will be used.
  • equalizer.defaultState.bands: Defines the default gain level setting in dB for each supported equalizer band. Each element key is the name of a supported band and value is a level (int) specifying the default gain in dB. All of the supported bands must be provided once this branch is defined. All dB levels must obey the limits declared in "equalizer.minLevel" and "equalizer.maxLevel". Omitting this branch uses the default 0dB for each band.
  • equalizer.minLevel and equalizer.maxLevel: Integer values specifying the decibel level range on which Alexa may operate for the supported bands. The device may support a different range internally, but Alexa will know only about the limits declared here. Values should be specified as absolute amplitude gain in integer dB and scaled to the platform's internal range as necessary. If these values are omitted, the default range min -6dB and max +6dB will be used.
Parameters
supportedBandsA list of supported equalizer bands. Corresponds to the "equalizer.bands" config branch. Only bands provided in the list will be enabled. Unspecified or empty supportedBands omits the config branch. Nonempty supportedBands includes the branch and declares each band in the list with a value "true".
minLevelThe minimum gain level for the equalizer bands in integer dB. Corresponds to "equalizer.minLevel". Unspecified minLevel uses the -6dB default.
maxLevelThe maximum gain level for the equalizer bands in integer dB. Corresponds to "equalizer.maxLevel". Unspecified maxLevel uses the +6dB default.
defaultBandLevelsThe default or reset state of the equalizer bands. Corresponds to the "equalizer.defaultState.bands" config branch. Unspecified or empty defaultBandLevels omits the config branch.

Alexa Auto SDK 2.0.0 - Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0