AlexaClientSDK  1.25.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::kwd::test::testStateObserver Class Reference

A test observer that mocks out the KeyWordDetectorStateObserverInterface#onStateChanged() call. More...

Inheritance diagram for alexaClientSDK::kwd::test::testStateObserver:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::kwd::test::testStateObserver:
Collaboration graph
[legend]

Public Member Functions

 testStateObserver ()
 
void onStateChanged (KeyWordDetectorStateObserverInterface::KeyWordDetectorState keyWordDetectorState)
 Implementation of the KeyWordDetectorStateObserverInterface#onStateChanged() call. More...
 
KeyWordDetectorStateObserverInterface::KeyWordDetectorState waitForStateChange (std::chrono::milliseconds timeout, bool *stateChanged)
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface
virtual ~KeyWordDetectorStateObserverInterface ()=default
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface
enum  KeyWordDetectorState { KeyWordDetectorState::ACTIVE, KeyWordDetectorState::STREAM_CLOSED, KeyWordDetectorState::ERROR }
 

Detailed Description

A test observer that mocks out the KeyWordDetectorStateObserverInterface#onStateChanged() call.

Constructor & Destructor Documentation

◆ testStateObserver()

alexaClientSDK::kwd::test::testStateObserver::testStateObserver ( )
inline

Constructor.

Member Function Documentation

◆ onStateChanged()

void alexaClientSDK::kwd::test::testStateObserver::onStateChanged ( KeyWordDetectorStateObserverInterface::KeyWordDetectorState  keyWordDetectorState)
inlinevirtual

Implementation of the KeyWordDetectorStateObserverInterface#onStateChanged() call.

Implements alexaClientSDK::avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface.

◆ waitForStateChange()

KeyWordDetectorStateObserverInterface::KeyWordDetectorState alexaClientSDK::kwd::test::testStateObserver::waitForStateChange ( std::chrono::milliseconds  timeout,
bool *  stateChanged 
)
inline

Waits for the KeyWordDetectorStateObserverInterface#onStateChanged() call.

Parameters
timeoutThe amount of time to wait for the call.
stateChangedAn output parameter that notifies the caller whether a call occurred.
Returns
Returns the state of the observer.

The documentation for this class was generated from the following file:

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