Alexa Auto SDK  4.3
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
aace::alexa::AlexaClient Class Reference

Classes

struct  ConnectionStatusInfo
 

Public Types

enum  DialogState {
  DialogState::IDLE,
  DialogState::LISTENING,
  DialogState::EXPECTING,
  DialogState::THINKING,
  DialogState::SPEAKING,
  DialogState::FINISHED
}
 
enum  ConnectionStatus {
  ConnectionStatus::DISCONNECTED,
  ConnectionStatus::PENDING,
  ConnectionStatus::CONNECTED
}
 
enum  ConnectionChangedReason {
  ConnectionChangedReason::NONE,
  ConnectionChangedReason::SUCCESS,
  ConnectionChangedReason::UNRECOVERABLE_ERROR,
  ConnectionChangedReason::ACL_CLIENT_REQUEST,
  ConnectionChangedReason::ACL_DISABLED,
  ConnectionChangedReason::DNS_TIMEDOUT,
  ConnectionChangedReason::CONNECTION_TIMEDOUT,
  ConnectionChangedReason::CONNECTION_THROTTLED,
  ConnectionChangedReason::INVALID_AUTH,
  ConnectionChangedReason::PING_TIMEDOUT,
  ConnectionChangedReason::WRITE_TIMEDOUT,
  ConnectionChangedReason::READ_TIMEDOUT,
  ConnectionChangedReason::FAILURE_PROTOCOL_ERROR,
  ConnectionChangedReason::INTERNAL_ERROR,
  ConnectionChangedReason::SERVER_INTERNAL_ERROR,
  ConnectionChangedReason::SERVER_SIDE_DISCONNECT,
  ConnectionChangedReason::SERVER_ENDPOINT_CHANGED
}
 
enum  ConnectionType {
  ConnectionType::AVS,
  ConnectionType::LOCAL
}
 

Public Member Functions

virtual void dialogStateChanged (DialogState state)
 
virtual void dialogStateChanged (AssistantIdType id, DialogState state)
 
virtual void authStateChanged (AuthState state, AuthError error)
 
virtual void connectionStatusChanged (ConnectionStatus status, ConnectionChangedReason reason)
 
virtual void connectionStatusChanged (ConnectionStatus status, ConnectionChangedReason reason, std::vector< ConnectionStatusInfo > detailed)
 
void stopForegroundActivity ()
 

Static Public Attributes

static constexpr AssistantIdType ASSISTANT_ID_NONE = 0
 
static constexpr AssistantIdType ASSISTANT_ID_ALL = 1
 
static constexpr AssistantIdType ASSISTANT_ID_ALEXA = 2
 

Detailed Description

AlexaClient should be extended to handle Alexa state changes on the platform.

Deprecated:
This platform interface is deprecated. Use the Alexa Auto Services Bridge (AASB) message broker to publish and subscribe to AASB messages instead.
See also
aace::core::MessageBroker

Member Enumeration Documentation

◆ DialogState

Describes the state of Alexa dialog interaction

Enumerator
IDLE 

Alexa is idle and ready for an interaction.

LISTENING 

Alexa is listening.

EXPECTING 

Alexa is expecting a response from the user.

THINKING 

A user request has completed, and no more user input is being accepted. Alexa is waiting for a response from AVS.

SPEAKING 

Alexa is responding to a request with speech.

FINISHED 

Alexa has finished processing a single Speak directive. If the Speak directive is part of a speech burst, the state will transition back to SPEAKING; if the Speak directive was the last in the burst, the state will transition back to IDLE.

◆ ConnectionStatus

Describes the AVS connection status

Enumerator
DISCONNECTED 

Not connected to AVS

PENDING 

Attempting to establish a connection to AVS

CONNECTED 

Connected to AVS

◆ ConnectionChangedReason

Describes the reason for a change in AVS connection status

Enumerator
NONE 

No reason specified.

SUCCESS 

The connection status changed due to a successful operation.

UNRECOVERABLE_ERROR 

The connection status changed due to an error from which there is no recovery.

ACL_CLIENT_REQUEST 

The connection status changed due to a client request.

ACL_DISABLED 

The connection attempt failed because connection was disabled.

DNS_TIMEDOUT 

The connection attempt failed due to a DNS resolution timeout.

CONNECTION_TIMEDOUT 

The connection attempt failed due to a connection timeout.

CONNECTION_THROTTLED 

The connection attempt failed due to excessive load on the server.

INVALID_AUTH 

The provided access credentials were invalid.

PING_TIMEDOUT 

A ping request timed out.

WRITE_TIMEDOUT 

A write request to AVS timed out.

READ_TIMEDOUT 

A read request from AVS timed out.

FAILURE_PROTOCOL_ERROR 

There was an underlying protocol error.

INTERNAL_ERROR 

There was an internal error.

SERVER_INTERNAL_ERROR 

There was an internal error on the server.

SERVER_SIDE_DISCONNECT 

The server asked the client to reconnect.

SERVER_ENDPOINT_CHANGED 

The server endpoint has changed.

◆ ConnectionType

Describes the connection type.

Enumerator
AVS 

Connection to Alexa Voice Service.

LOCAL 

Connection to local endpoint.

Member Function Documentation

◆ dialogStateChanged() [1/2]

virtual void aace::alexa::AlexaClient::dialogStateChanged ( DialogState  state)
inlinevirtual

Notifies the platform implementation of an Alexa dialog state change

Parameters
[in]stateThe new Alexa dialog state
Note
The platform implementation is responsible for providing a familiar Alexa experience for the user. See the AVS UX Attention System guidelines for recommendations on communicating Alexa attention states: https://developer.amazon.com/docs/alexa-voice-service/ux-design-attention.html#implement
Deprecated:
Use dialogStateChanged(AssistantIdType id, DialogState state)

◆ dialogStateChanged() [2/2]

virtual void aace::alexa::AlexaClient::dialogStateChanged ( AssistantIdType  id,
DialogState  state 
)
inlinevirtual

Notifies the platform implementation of a dialog state change

Parameters
[in]idThe id of the assistant that the dialog state change associated with
[in]stateThe new dialog state
Note
The platform implementation is responsible for providing a familiar Alexa experience for the user. See the AVS UX Attention System guidelines for recommendations on communicating Alexa attention states: https://developer.amazon.com/docs/alexa-voice-service/ux-design-attention.html#implement

◆ authStateChanged()

virtual void aace::alexa::AlexaClient::authStateChanged ( AuthState  state,
AuthError  error 
)
inlinevirtual

Notifies the platform implementation of an AVS authorization state change

Parameters
[in]stateThe new authorization state
[in]errorThe error state of the authorization attempt

◆ connectionStatusChanged() [1/2]

virtual void aace::alexa::AlexaClient::connectionStatusChanged ( ConnectionStatus  status,
ConnectionChangedReason  reason 
)
inlinevirtual

Notifies the platform implementation of an AVS connection status change

Parameters
[in]statusThe new AVS connection status
[in]reasonThe reason for the AVS connection status change

◆ connectionStatusChanged() [2/2]

virtual void aace::alexa::AlexaClient::connectionStatusChanged ( ConnectionStatus  status,
ConnectionChangedReason  reason,
std::vector< ConnectionStatusInfo detailed 
)
inlinevirtual

Notifies the platform implementation of both aggregated and detailed connection status changes.

Parameters
[in]statusThe aggregated connection status
[in]reasonThe reason for the aggregated connection status change
[in]detailedA vector of ConnectionStatusInfo details for each connection

◆ stopForegroundActivity()

void aace::alexa::AlexaClient::stopForegroundActivity ( )

Stops the foreground activity if there is one. This acts as a "stop" button that you use to stop an ongoing activity that has acquired the audio or visual focus. This call stops all user-observable activities and returns immediately.

Member Data Documentation

◆ ASSISTANT_ID_NONE

constexpr AssistantIdType aace::alexa::AlexaClient::ASSISTANT_ID_NONE = 0
static

A pre-defined value to express that no assistant is associated.

◆ ASSISTANT_ID_ALL

constexpr AssistantIdType aace::alexa::AlexaClient::ASSISTANT_ID_ALL = 1
static

A pre-defined value to express that all assistant is associated.

◆ ASSISTANT_ID_ALEXA

constexpr AssistantIdType aace::alexa::AlexaClient::ASSISTANT_ID_ALEXA = 2
static

A pre-defined value for Alexa's assistant Id.


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