AlexaClientSDK  1.24.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
alexaClientSDK::avsCommon::utils Namespace Reference

Namespaces

 audioAnalyzer
 
 bluetooth
 
 configuration
 
 error
 
 file
 
 functional
 
 http
 
 http2
 
 id3Tags
 
 json
 
 libcurlUtils
 
 logger
 
 mediaPlayer
 
 memory
 
 metrics
 
 network
 
 playlistParser
 
 power
 
 sdkVersion
 
 sds
 
 stream
 
 string
 
 test
 
 threading
 
 timing
 
 uuidGeneration
 

Classes

struct  AudioFormat
 
class  DeviceInfo
 
struct  Dummy
 
class  EndianTest
 
class  GuardedValue
 
class  HTTPContent
 
class  MacAddressString
 
class  Metrics
 
class  Optional
 
class  PromiseFuturePair
 
class  PromiseFuturePair< void >
 
struct  ReferenceCounter
 
class  RequiresShutdown
 
class  RetryTimer
 
class  ShutdownMonitor
 Class used to track whether RequiresShutdown objects have been shut down correctly. More...
 
struct  StructWithoutDefaultConstructor
 
class  TestableAttachmentManager
 
class  TestableAttachmentWriter
 
class  TestableMessageObserver
 
class  TestMimeAttachmentPart
 
class  TestMimeJsonPart
 
class  TestMimePart
 
class  WaitEvent
 
struct  WavHeader
 

Typedefs

using ByteVector = std::vector< unsigned char >
 
using SDSType = avsCommon::utils::sds::InProcessSDS
 
using SDSBufferType = avsCommon::utils::sds::InProcessSDSTraits::Buffer
 

Enumerations

enum  MediaType { MediaType::MPEG, MediaType::WAV, MediaType::UNKNOWN }
 

Functions

std::ostream & operator<< (std::ostream &stream, const AudioFormat::Encoding &encoding)
 
std::ostream & operator<< (std::ostream &stream, const AudioFormat::Endianness &endianness)
 
static std::shared_ptr< std::mutex > getCoutMutex ()
 
bool littleEndianMachine ()
 Function used to check the machine endianness. More...
 
uint16_t swapEndian (uint16_t input)
 
uint32_t swapEndian (uint32_t input)
 
MediaType MimeTypeToMediaType (const std::string &mimetype)
 
std::ostream & operator<< (std::ostream &stream, const MediaType &mediatype)
 
ByteVector generateWavHeader (unsigned int bytesPerSample, unsigned int channels, unsigned int rate, std::chrono::milliseconds totalDuration, bool isPCM=true)
 
bool readWAVFile (const std::string &absoluteFilePath, std::vector< uint16_t > *audioBuffer, WavHeader &wavHeader, bool isPCM=true)
 
static const std::string TAG ("DeviceInfo")
 String to identify log entries originating from this file. More...
 
EndpointIdentifier generateEndpointId (const std::string &clientId, const std::string &productId, const std::string &deviceSerialNumber)
 
static const std::string TAG ("RequiresShutdown")
 String to identify log entries originating from this file. More...
 
static const std::string TAG ("WavUtils")
 
static void writeToWavHeader (uint16_t input, ByteVector *header)
 
static void writeToWavHeader (uint32_t input, ByteVector *header)
 
static void writeToWavHeader (const char *input, ByteVector *header)
 
static uint16_t readShortFromHeader (char *buffer, unsigned int offset)
 
static uint32_t readLongFromHeader (char *buffer, unsigned int offset)
 
static uint32_t readFourCharFromHeader (char *buffer, unsigned int offset)
 
std::string createRandomAlphabetString (int stringSize)
 
int generateRandomNumber (int min, int max)
 
std::string constructTestMimeString (const std::vector< std::shared_ptr< TestMimePart >> &mimeParts, const std::string &boundaryString, bool addPrependedNewline=true)
 
 TEST (OptionalTest, test_createEmptyOptional)
 
 TEST (OptionalTest, test_createOptionalWithValue)
 
 TEST (OptionalTest, test_getValueOfOptionalWithValue)
 
 TEST (OptionalTest, test_getValueOfEmptyOptional)
 
 TEST (OptionalTest, test_functionWithEmptyOptionalReturn)
 
 TEST (OptionalTest, test_functionWithNonEmptyOptionalReturn)
 
 TEST (OptionalTest, test_copyOptionalWithValue)
 
 TEST (OptionalTest, test_copyEmptyOptional)
 
 TEST (OptionalTest, test_setNewValueForEmptyOptional)
 
 TEST (OptionalTest, test_setNewValueForNonEmptyOptional)
 
 TEST (OptionalTest, test_resetEmptyOptional)
 
 TEST (OptionalTest, test_resetNonEmptyOptional)
 
 TEST (OptionalTest, test_optionalObjectWithoutDefaultConstructor)
 
 TEST (OptionalTest, test_constructorCallsMatchDestructorCalls)
 
 TEST (OptionalTest, test_equalityOperator)
 
 TEST (OptionalTest, test_inequalityOperator)
 
static const std::string TAG ("TestableMessageObserver")
 String to identify log entries originating from this file. More...
 
 TEST_F (EndianTest, test_SwapEndian16)
 
 TEST_F (EndianTest, test_SwapEndian32)
 

Variables

const std::string METRICS_TAG = ":METRICS:"
 
constexpr const char * ID_RIFF = "RIFF"
 
constexpr const char * ID_WAVE = "WAVE"
 
constexpr const char * ID_FMT = "fmt "
 
constexpr const char * ID_DATA = "data"
 
constexpr uint32_t PCM_SUBCHUNK_SZ = 16
 
constexpr uint16_t FORMAT_PCM = 1
 
constexpr uint16_t BITS_PER_BYTE = 8
 
constexpr uint16_t PLAY_BITS_PER_SAMPLE = 16
 
constexpr uint16_t FORMAT_IEEE_FLOAT = 3
 
constexpr uint32_t FLOAT_SUBCHUNK_SZ = 18
 
constexpr uint32_t FACT_CHUNK_SZ = 4
 
constexpr const char * ID_FACT = "fact"
 
constexpr unsigned int PCM_HEADER_SIZE = 44
 
constexpr unsigned int NON_PCM_HEADER_SIZE = 58
 
constexpr unsigned int RIFF_ID_OFFSET = 0
 
constexpr unsigned int RIFF_SZ_OFFSET = 4
 
constexpr unsigned int RIFF_FMT_OFFSET = 8
 
constexpr unsigned int FMT_ID_OFFSET = 12
 
constexpr unsigned int FMT_SZ_OFFSET = 16
 
constexpr unsigned int AUDIO_FORMAT_OFFSET = 20
 
constexpr unsigned int NUM_CHANNELS_OFFSET = 22
 
constexpr unsigned int SAMPLE_RATE_OFFSET = 24
 
constexpr unsigned int BYTE_RATE_OFFSET = 28
 
constexpr unsigned int BLOCK_ALIGN_OFFSET = 32
 
constexpr unsigned int BITS_PER_SAMPLE_OFFSET = 34
 
constexpr unsigned int DATA_ID_OFFSET = 36
 
constexpr unsigned int DATA_SZ_OFFSET = 40
 
constexpr unsigned int CB_SZ_OFFSET = 36
 
constexpr unsigned int FACT_ID_OFFSET = 38
 
constexpr unsigned int FACT_SZ_OFFSET = 42
 
constexpr unsigned int FACT_SAMPLE_LEN_OFFSET = 46
 
constexpr unsigned int NON_PCM_OFFSET = 14
 
const std::string CONFIG_KEY_DEVICE_INFO = "deviceInfo"
 Name of ConfigurationNode for DeviceInfo. More...
 
const std::string CONFIG_KEY_CLIENT_ID = "clientId"
 Name of clientId value in DeviceInfo's ConfigurationNode. More...
 
static const std::string CONFIG_KEY_REGISTRATION_KEY = "registrationKey"
 Name of registration key value in DeviceInfo's ConfigurationNode. More...
 
const std::string CONFIG_KEY_PRODUCT_ID_KEY = "productIdKey"
 Name of productId key value in DeviceInfo's ConfigurationNode. More...
 
static const std::string CONFIG_KEY_REGISTRATION = "registration"
 Name of registration value in DeviceInfo's ConfigurationNode. More...
 
const std::string CONFIG_KEY_PRODUCT_ID = "productId"
 Name of productId value in DeviceInfo's ConfigurationNode. More...
 
const std::string CONFIG_KEY_DSN = "deviceSerialNumber"
 Name of deviceSerialNumber value in DeviceInfo's ConfigurationNode. More...
 
const std::string CONFIG_KEY_DEVICE_TYPE = "deviceType"
 DeviceType in DeviceInfo's ConfigurationNode. More...
 
const std::string CONFIG_KEY_FRIENDLY_NAME = "friendlyName"
 Name of friendlyName value in DeviceInfo's ConfigurationNode. More...
 
const std::string CONFIG_KEY_MANUFACTURER_NAME = "manufacturerName"
 Key for the device manufacturer name in DeviceInfo's ConfigurationNode. More...
 
const std::string CONFIG_KEY_DESCRIPTION = "description"
 Key for the device description in DeviceInfo's ConfigurationNode. More...
 
const std::string ENDPOINT_ID_CONCAT = "::"
 String used to join attributes in the generation of the default endpoint id. More...
 
static ShutdownMonitor g_shutdownMonitor
 The global ShutdownMonitor used to track all RequiresShutdown objects. More...
 
static const int SHORT_CHUNK_SIZE = 2
 
static const int LONG_CHUNK_SIZE = 4
 
static const std::string MIME_NEWLINE = "\r\n"
 The newline characters that MIME parsers expect. More...
 
static const std::string MIME_BOUNDARY_DASHES = "--"
 The double dashes which may occur before and after a boundary string. More...
 
static const std::string MIME_JSON_PREFIX_STRING = "Content-Type: application/json; charset=UTF-8"
 The MIME text expected before a JSON part. More...
 
static const std::string MIME_ATTACHMENT_PREFIX_STRING = "Content-Type: application/octet-stream"
 The MIME text expected before a binary data part. More...
 
static const std::string MIME_CONTENT_ID_PREFIX_STRING = "Content-ID: "
 The MIME prefix for a content id header. More...
 
static const std::chrono::seconds WAIT_FOR_DIRECTIVE_TIMEOUT_IN_SECONDS = std::chrono::seconds(1)
 Our default timeout when validating if a MIME part was received by another object. More...
 
static const int DUMMY_SDS_BUFFER_SIZE = 100
 A small value so we can create objects with a valid SDS (even if unused). More...
 

Typedef Documentation

◆ ByteVector

using alexaClientSDK::avsCommon::utils::ByteVector = typedef std::vector<unsigned char>

◆ SDSBufferType

◆ SDSType

Enumeration Type Documentation

◆ MediaType

An enum class used to represent the file type of audio data.

Enumerator
MPEG 

Mpeg type audio data.

WAV 

Wav type audio data.

UNKNOWN 

Audio data type not known.

Function Documentation

◆ constructTestMimeString()

std::string alexaClientSDK::avsCommon::utils::constructTestMimeString ( const std::vector< std::shared_ptr< TestMimePart >> &  mimeParts,
const std::string &  boundaryString,
bool  addPrependedNewline = true 
)

A utility function to generate a MIME string.

Parameters
mimePartsA vector of TestMimePart objects, which through polymorphism know how to generate their own substrings.
boundaryStringThe boundary string to be used when generating the MIME string.
addPrependedNewlinetrue if a trailing newline (CRLF) sequence is required, false otherwise.
Returns
The generated MIME string.

◆ createRandomAlphabetString()

std::string alexaClientSDK::avsCommon::utils::createRandomAlphabetString ( int  stringSize)

Utility function to generate a random string of characters between 'a' - 'z'.

Parameters
stringSizeThe length of the string we will create.
Returns
The generated string.

Convert the data into a std::string.

Convert the data into a std::string.

◆ generateEndpointId()

EndpointIdentifier alexaClientSDK::avsCommon::utils::generateEndpointId ( const std::string &  clientId,
const std::string &  productId,
const std::string &  deviceSerialNumber 
)
inline

Generate an endpoint identifier to the device per public documentation:

See also
https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/alexa-discovery.html
Parameters
clientIdThe client ID of the device maintaining the HTTP/2 connection, generated during product registration.
productIdThe product ID of the device maintaining the HTTP/2 connection.
deviceSerialNumberThe serial number of the device maintaining the HTTP/2 connection.
Returns
The default endpoint identifier for this client.

◆ generateRandomNumber()

int alexaClientSDK::avsCommon::utils::generateRandomNumber ( int  min,
int  max 
)

Utility function to generate a random number. This function does not require seeding before use.

Parameters
minThe minimum value in the desired distribution.
maxThe maximum value in the desired distribution.
Returns
The generated number.

Identifier to tell if the random number generated has been initialized

Identifier to tell if the random number generated has been initialized

◆ generateWavHeader()

ByteVector alexaClientSDK::avsCommon::utils::generateWavHeader ( unsigned int  bytesPerSample,
unsigned int  channels,
unsigned int  rate,
std::chrono::milliseconds  totalDuration,
bool  isPCM = true 
)

Generates a WAVE header.

Parameters
bytesPerSampleThe number of bytes per sample.
channelsThe number of channels in the audio data.
rateThe sample rate of the audio data, in blocks per second.
totalDurationThe total duration of the audio data.
isPCMBool indicating if header to generate is PCM format or Non-PCM.
Returns
The ByteVector of the generated WAVE header.

◆ getCoutMutex()

static std::shared_ptr<std::mutex> alexaClientSDK::avsCommon::utils::getCoutMutex ( )
inlinestatic

Get the mutex used to serialize writing to cout.

Returns
The mutex used to serialize writing to cout.

◆ littleEndianMachine()

bool alexaClientSDK::avsCommon::utils::littleEndianMachine ( )
inline

Function used to check the machine endianness.

◆ MimeTypeToMediaType()

MediaType alexaClientSDK::avsCommon::utils::MimeTypeToMediaType ( const std::string &  mimetype)
inline

Convert a string file type to MediaType value.

Parameters
mimetypeThe string representation of a file's mimetype.
Returns
MediaType value of file

◆ operator<<() [1/3]

std::ostream& alexaClientSDK::avsCommon::utils::operator<< ( std::ostream &  stream,
const MediaType mediatype 
)
inline

Write an MediaType value to an ostream as a string.

Parameters
streamThe stream to write the value to.
mediatypeThe MediaType value to write to the ostream as a string.
Returns
The ostream that was passed in and written to.

◆ operator<<() [2/3]

std::ostream& alexaClientSDK::avsCommon::utils::operator<< ( std::ostream &  stream,
const AudioFormat::Encoding encoding 
)
inline

Write an Encoding value to an ostream as a string.

Parameters
streamThe stream to write the value to.
encodingThe encoding value to write to the ostream as a string.
Returns
The ostream that was passed in and written to.

◆ operator<<() [3/3]

std::ostream& alexaClientSDK::avsCommon::utils::operator<< ( std::ostream &  stream,
const AudioFormat::Endianness endianness 
)
inline

Write an Endianness value to an ostream as a string.

Parameters
streamThe stream to write the value to.
endiannessThe endianness value to write to the ostream as a string.
Returns
The ostream that was passed in and written to.

◆ readFourCharFromHeader()

static uint32_t alexaClientSDK::avsCommon::utils::readFourCharFromHeader ( char *  buffer,
unsigned int  offset 
)
static

Helper Method to read 4 char from WAVE header.

Parameters
bufferThe buffer containing the WAVE header.
offsetThe offset to read from the buffer.
Returns
The 4 char as a uint_32t.

◆ readLongFromHeader()

static uint32_t alexaClientSDK::avsCommon::utils::readLongFromHeader ( char *  buffer,
unsigned int  offset 
)
static

Helper Method to read 4 bytes from WAVE header.

Parameters
bufferThe buffer containing the WAVE header.
offsetThe offset to read from the buffer.
Returns
The 4 bytes as a uint_32t.

◆ readShortFromHeader()

static uint16_t alexaClientSDK::avsCommon::utils::readShortFromHeader ( char *  buffer,
unsigned int  offset 
)
static

Helper Method to read 2 bytes from WAVE header.

Parameters
bufferThe buffer containing the WAVE header.
offsetThe offset to read from the buffer.
Returns
The 2 bytes as a uint_16t.

◆ readWAVFile()

bool alexaClientSDK::avsCommon::utils::readWAVFile ( const std::string &  absoluteFilePath,
std::vector< uint16_t > *  audioBuffer,
WavHeader wavHeader,
bool  isPCM = true 
)

Reads a .wav file and seperates the audio data from the header data.

Parameters
absoluteFilePathThe path to a file to retrieve the WAVE header from.
audioBufferThe pointer to the audioBuffer vector.
wavHeaderThe WavHeader.
isPCMBool indicating if header to generate is PCM format or Non-PCM.
Returns
true if successful, else false.

◆ swapEndian() [1/2]

uint16_t alexaClientSDK::avsCommon::utils::swapEndian ( uint16_t  input)
inline

◆ swapEndian() [2/2]

uint32_t alexaClientSDK::avsCommon::utils::swapEndian ( uint32_t  input)
inline

◆ TAG() [1/4]

static const std::string alexaClientSDK::avsCommon::utils::TAG ( "DeviceInfo"  )
static

String to identify log entries originating from this file.

◆ TAG() [2/4]

static const std::string alexaClientSDK::avsCommon::utils::TAG ( "TestableMessageObserver"  )
static

String to identify log entries originating from this file.

◆ TAG() [3/4]

static const std::string alexaClientSDK::avsCommon::utils::TAG ( "RequiresShutdown"  )
static

String to identify log entries originating from this file.

◆ TAG() [4/4]

static const std::string alexaClientSDK::avsCommon::utils::TAG ( "WavUtils"  )
static

◆ TEST() [1/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_createEmptyOptional   
)

◆ TEST() [2/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_createOptionalWithValue   
)

◆ TEST() [3/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_getValueOfOptionalWithValue   
)

◆ TEST() [4/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_getValueOfEmptyOptional   
)

◆ TEST() [5/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_functionWithEmptyOptionalReturn   
)

◆ TEST() [6/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_functionWithNonEmptyOptionalReturn   
)

◆ TEST() [7/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_copyOptionalWithValue   
)

◆ TEST() [8/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_copyEmptyOptional   
)

◆ TEST() [9/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_setNewValueForEmptyOptional   
)

◆ TEST() [10/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_setNewValueForNonEmptyOptional   
)

◆ TEST() [11/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_resetEmptyOptional   
)

◆ TEST() [12/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_resetNonEmptyOptional   
)

◆ TEST() [13/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_optionalObjectWithoutDefaultConstructor   
)

◆ TEST() [14/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_constructorCallsMatchDestructorCalls   
)

◆ TEST() [15/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_equalityOperator   
)

◆ TEST() [16/16]

alexaClientSDK::avsCommon::utils::TEST ( OptionalTest  ,
test_inequalityOperator   
)

◆ TEST_F() [1/2]

alexaClientSDK::avsCommon::utils::TEST_F ( EndianTest  ,
test_SwapEndian16   
)

◆ TEST_F() [2/2]

alexaClientSDK::avsCommon::utils::TEST_F ( EndianTest  ,
test_SwapEndian32   
)

◆ writeToWavHeader() [1/3]

static void alexaClientSDK::avsCommon::utils::writeToWavHeader ( uint16_t  input,
ByteVector header 
)
static

Helper Method to write uint16_t into WAVE byte vector.

Parameters
inputThe input being written into the header.
[out]headerThe WAVE header to write to.

◆ writeToWavHeader() [2/3]

static void alexaClientSDK::avsCommon::utils::writeToWavHeader ( uint32_t  input,
ByteVector header 
)
static

Helper Method to write uint32_t into WAVE byte vector.

Parameters
inputThe input being written into the header.
[out]headerThe WAVE header to write to.

◆ writeToWavHeader() [3/3]

static void alexaClientSDK::avsCommon::utils::writeToWavHeader ( const char *  input,
ByteVector header 
)
static

Helper Method to write 4 char into WAVE byte vector.

Parameters
inputThe input being written into the header.
[out]headerThe WAVE header to write to.

Variable Documentation

◆ AUDIO_FORMAT_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::AUDIO_FORMAT_OFFSET = 20

◆ BITS_PER_BYTE

constexpr uint16_t alexaClientSDK::avsCommon::utils::BITS_PER_BYTE = 8

◆ BITS_PER_SAMPLE_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::BITS_PER_SAMPLE_OFFSET = 34

◆ BLOCK_ALIGN_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::BLOCK_ALIGN_OFFSET = 32

◆ BYTE_RATE_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::BYTE_RATE_OFFSET = 28

◆ CB_SZ_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::CB_SZ_OFFSET = 36

◆ CONFIG_KEY_CLIENT_ID

const std::string alexaClientSDK::avsCommon::utils::CONFIG_KEY_CLIENT_ID = "clientId"

Name of clientId value in DeviceInfo's ConfigurationNode.

◆ CONFIG_KEY_DESCRIPTION

const std::string alexaClientSDK::avsCommon::utils::CONFIG_KEY_DESCRIPTION = "description"

Key for the device description in DeviceInfo's ConfigurationNode.

◆ CONFIG_KEY_DEVICE_INFO

const std::string alexaClientSDK::avsCommon::utils::CONFIG_KEY_DEVICE_INFO = "deviceInfo"

Name of ConfigurationNode for DeviceInfo.

◆ CONFIG_KEY_DEVICE_TYPE

const std::string alexaClientSDK::avsCommon::utils::CONFIG_KEY_DEVICE_TYPE = "deviceType"

DeviceType in DeviceInfo's ConfigurationNode.

◆ CONFIG_KEY_DSN

const std::string alexaClientSDK::avsCommon::utils::CONFIG_KEY_DSN = "deviceSerialNumber"

Name of deviceSerialNumber value in DeviceInfo's ConfigurationNode.

◆ CONFIG_KEY_FRIENDLY_NAME

const std::string alexaClientSDK::avsCommon::utils::CONFIG_KEY_FRIENDLY_NAME = "friendlyName"

Name of friendlyName value in DeviceInfo's ConfigurationNode.

◆ CONFIG_KEY_MANUFACTURER_NAME

const std::string alexaClientSDK::avsCommon::utils::CONFIG_KEY_MANUFACTURER_NAME = "manufacturerName"

Key for the device manufacturer name in DeviceInfo's ConfigurationNode.

◆ CONFIG_KEY_PRODUCT_ID

const std::string alexaClientSDK::avsCommon::utils::CONFIG_KEY_PRODUCT_ID = "productId"

Name of productId value in DeviceInfo's ConfigurationNode.

◆ CONFIG_KEY_PRODUCT_ID_KEY

const std::string alexaClientSDK::avsCommon::utils::CONFIG_KEY_PRODUCT_ID_KEY = "productIdKey"

Name of productId key value in DeviceInfo's ConfigurationNode.

◆ CONFIG_KEY_REGISTRATION

const std::string alexaClientSDK::avsCommon::utils::CONFIG_KEY_REGISTRATION = "registration"
static

Name of registration value in DeviceInfo's ConfigurationNode.

◆ CONFIG_KEY_REGISTRATION_KEY

const std::string alexaClientSDK::avsCommon::utils::CONFIG_KEY_REGISTRATION_KEY = "registrationKey"
static

Name of registration key value in DeviceInfo's ConfigurationNode.

◆ DATA_ID_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::DATA_ID_OFFSET = 36

◆ DATA_SZ_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::DATA_SZ_OFFSET = 40

◆ DUMMY_SDS_BUFFER_SIZE

const int alexaClientSDK::avsCommon::utils::DUMMY_SDS_BUFFER_SIZE = 100
static

A small value so we can create objects with a valid SDS (even if unused).

◆ ENDPOINT_ID_CONCAT

const std::string alexaClientSDK::avsCommon::utils::ENDPOINT_ID_CONCAT = "::"

String used to join attributes in the generation of the default endpoint id.

◆ FACT_CHUNK_SZ

constexpr uint32_t alexaClientSDK::avsCommon::utils::FACT_CHUNK_SZ = 4

◆ FACT_ID_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::FACT_ID_OFFSET = 38

◆ FACT_SAMPLE_LEN_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::FACT_SAMPLE_LEN_OFFSET = 46

◆ FACT_SZ_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::FACT_SZ_OFFSET = 42

◆ FLOAT_SUBCHUNK_SZ

constexpr uint32_t alexaClientSDK::avsCommon::utils::FLOAT_SUBCHUNK_SZ = 18

◆ FMT_ID_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::FMT_ID_OFFSET = 12

◆ FMT_SZ_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::FMT_SZ_OFFSET = 16

◆ FORMAT_IEEE_FLOAT

constexpr uint16_t alexaClientSDK::avsCommon::utils::FORMAT_IEEE_FLOAT = 3

◆ FORMAT_PCM

constexpr uint16_t alexaClientSDK::avsCommon::utils::FORMAT_PCM = 1

◆ g_shutdownMonitor

ShutdownMonitor alexaClientSDK::avsCommon::utils::g_shutdownMonitor
static

The global ShutdownMonitor used to track all RequiresShutdown objects.

◆ ID_DATA

constexpr const char* alexaClientSDK::avsCommon::utils::ID_DATA = "data"

◆ ID_FACT

constexpr const char* alexaClientSDK::avsCommon::utils::ID_FACT = "fact"

◆ ID_FMT

constexpr const char* alexaClientSDK::avsCommon::utils::ID_FMT = "fmt "

◆ ID_RIFF

constexpr const char* alexaClientSDK::avsCommon::utils::ID_RIFF = "RIFF"

◆ ID_WAVE

constexpr const char* alexaClientSDK::avsCommon::utils::ID_WAVE = "WAVE"

◆ LONG_CHUNK_SIZE

const int alexaClientSDK::avsCommon::utils::LONG_CHUNK_SIZE = 4
static

◆ METRICS_TAG

const std::string alexaClientSDK::avsCommon::utils::METRICS_TAG = ":METRICS:"

◆ MIME_ATTACHMENT_PREFIX_STRING

const std::string alexaClientSDK::avsCommon::utils::MIME_ATTACHMENT_PREFIX_STRING = "Content-Type: application/octet-stream"
static

The MIME text expected before a binary data part.

◆ MIME_BOUNDARY_DASHES

const std::string alexaClientSDK::avsCommon::utils::MIME_BOUNDARY_DASHES = "--"
static

The double dashes which may occur before and after a boundary string.

◆ MIME_CONTENT_ID_PREFIX_STRING

const std::string alexaClientSDK::avsCommon::utils::MIME_CONTENT_ID_PREFIX_STRING = "Content-ID: "
static

The MIME prefix for a content id header.

◆ MIME_JSON_PREFIX_STRING

const std::string alexaClientSDK::avsCommon::utils::MIME_JSON_PREFIX_STRING = "Content-Type: application/json; charset=UTF-8"
static

The MIME text expected before a JSON part.

◆ MIME_NEWLINE

const std::string alexaClientSDK::avsCommon::utils::MIME_NEWLINE = "\r\n"
static

The newline characters that MIME parsers expect.

◆ NON_PCM_HEADER_SIZE

constexpr unsigned int alexaClientSDK::avsCommon::utils::NON_PCM_HEADER_SIZE = 58

◆ NON_PCM_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::NON_PCM_OFFSET = 14

◆ NUM_CHANNELS_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::NUM_CHANNELS_OFFSET = 22

◆ PCM_HEADER_SIZE

constexpr unsigned int alexaClientSDK::avsCommon::utils::PCM_HEADER_SIZE = 44

◆ PCM_SUBCHUNK_SZ

constexpr uint32_t alexaClientSDK::avsCommon::utils::PCM_SUBCHUNK_SZ = 16

◆ PLAY_BITS_PER_SAMPLE

constexpr uint16_t alexaClientSDK::avsCommon::utils::PLAY_BITS_PER_SAMPLE = 16

◆ RIFF_FMT_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::RIFF_FMT_OFFSET = 8

◆ RIFF_ID_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::RIFF_ID_OFFSET = 0

◆ RIFF_SZ_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::RIFF_SZ_OFFSET = 4

◆ SAMPLE_RATE_OFFSET

constexpr unsigned int alexaClientSDK::avsCommon::utils::SAMPLE_RATE_OFFSET = 24

◆ SHORT_CHUNK_SIZE

const int alexaClientSDK::avsCommon::utils::SHORT_CHUNK_SIZE = 2
static

◆ WAIT_FOR_DIRECTIVE_TIMEOUT_IN_SECONDS

const std::chrono::seconds alexaClientSDK::avsCommon::utils::WAIT_FOR_DIRECTIVE_TIMEOUT_IN_SECONDS = std::chrono::seconds(1)
static

Our default timeout when validating if a MIME part was received by another object.

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