Alexa Auto SDK  4.3
Public Types | Public Member Functions | List of all members
aace::arbitrator::Arbitrator Class Referenceabstract

Public Types

using AgentState = aace::arbitrator::ArbitratorEngineInterface::AgentState
 Describes the agent states.
 
using Mode = aace::arbitrator::ArbitratorEngineInterface::Mode
 Describes the dialog request modes.
 
using DialogStateRule = aace::arbitrator::ArbitratorEngineInterface::DialogStateRule
 Describes the rules for dialog states.
 

Public Member Functions

virtual bool registerAgent (const std::string &assistantId, const std::string &name, const std::vector< DialogStateRule > &dialogStateRules)
 
virtual bool deregisterAgent (const std::string &assistantId)
 
virtual void startDialog (const std::string &assistantId, Mode mode, const std::string &token)
 
virtual void startDialogReply (const std::string &assistantId, const std::string &dialogId, const std::string &reason, const std::string &token)=0
 
virtual void stopDialog (const std::string &assistantId, const std::string &dialogId)
 
virtual void setDialogState (const std::string &assistantId, const std::string &dialogId, const std::string &state)
 
virtual void onDialogTerminated (const std::string &assistantId, const std::string &dialogId, const std::string &reason)=0
 
virtual void onAgentStateUpdated (const std::string &assistantId, const std::string &name, AgentState state)=0
 
virtual ~Arbitrator ()
 

Detailed Description

Arbitrator should be extended to handle agent arbitration directives from the Engine.

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

Constructor & Destructor Documentation

◆ ~Arbitrator()

aace::arbitrator::Arbitrator::~Arbitrator ( )
virtualdefault

Destructor

Member Function Documentation

◆ registerAgent()

bool aace::arbitrator::Arbitrator::registerAgent ( const std::string &  assistantId,
const std::string &  name,
const std::vector< DialogStateRule > &  dialogStateRules 
)
virtual

Register an agent with the Engine

Parameters
assistantIdThe id of agent to register
nameThe name of agent to register
dialogStateRulesThe barge in rules for the agent
Returns
true On success
false On failure

◆ deregisterAgent()

bool aace::arbitrator::Arbitrator::deregisterAgent ( const std::string &  assistantId)
virtual

Deregister an agent with the Engine

Parameters
assistantIdThe id of agent to deregister
Returns
true On success
false On failure

◆ startDialog()

void aace::arbitrator::Arbitrator::startDialog ( const std::string &  assistantId,
Mode  mode,
const std::string &  token 
)
virtual

Start dialog for an agent.

Parameters
assistantIdThe id of agent for whom the dialog is started
modeThe mode of trigger for dialog - one of Wakeword, Gesture (for PTT/TTT)
tokenAn unique identifier to correlate startDialogReply to startDialog. This will be sent back in startDialogReply.

◆ startDialogReply()

virtual void aace::arbitrator::Arbitrator::startDialogReply ( const std::string &  assistantId,
const std::string &  dialogId,
const std::string &  reason,
const std::string &  token 
)
pure virtual

Notifies platform if request to start a dialog is granted and the requested dialog is started or if the request is denied and the reason for denying.

Parameters
assistantIdThe id of agent for whom the dialog is requested
dialogIdThe unique identifier generated for the started dialog, populated if the dialog was started, empty otherwise
reasonThe reason for the dialog not started, populated if request was denied, empty otherwise. This field is informational and is used only for logging purpose.
tokenThe identifier that was provided in startDialog call.

◆ stopDialog()

void aace::arbitrator::Arbitrator::stopDialog ( const std::string &  assistantId,
const std::string &  dialogId 
)
virtual

Notifies Engine to stop the dialog

Parameters
assistantIdThe id of agent whose dialog should be stopped
dialogIdThe id of the dialog that should be stopped

◆ setDialogState()

void aace::arbitrator::Arbitrator::setDialogState ( const std::string &  assistantId,
const std::string &  dialogId,
const std::string &  state 
)
virtual

Notifies Engine to set the dialog state

Parameters
assistantIdThe id of agent whose dialog state should be set
dialogIdThe id of the dialog whose state should be set
stateThe new state of the dialog

◆ onDialogTerminated()

virtual void aace::arbitrator::Arbitrator::onDialogTerminated ( const std::string &  assistantId,
const std::string &  dialogId,
const std::string &  reason 
)
pure virtual

Notifies platform that to terminate the dialog

Parameters
assistantIdThe id of agent whose dialog is active
dialogIdThe id of the dialog that is active
reasonThe reason for stopping the dialog

◆ onAgentStateUpdated()

virtual void aace::arbitrator::Arbitrator::onAgentStateUpdated ( const std::string &  assistantId,
const std::string &  name,
AgentState  state 
)
pure virtual

Notifies platform of update to the agent state

Parameters
assistantIdThe id of agent whose state is updated
nameThe name of agent whose state is updated
stateThe new state of the agent

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