AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <RangeControllerInterface.h>
Classes | |
struct | RangeControllerConfiguration |
Public Types | |
using | RangeState = avsCommon::sdkInterfaces::rangeController::RangeControllerObserverInterface::RangeState |
Alias to improve readability. More... | |
Public Member Functions | |
virtual | ~RangeControllerInterface ()=default |
virtual RangeControllerConfiguration | getConfiguration ()=0 |
virtual std::pair< avsCommon::avs::AlexaResponseType, std::string > | setRangeValue (double range, AlexaStateChangeCauseType cause)=0 |
virtual std::pair< avsCommon::avs::AlexaResponseType, std::string > | adjustRangeValue (double deltaRange, AlexaStateChangeCauseType cause)=0 |
virtual std::pair< avsCommon::avs::AlexaResponseType, utils::Optional< RangeState > > | getRangeState ()=0 |
virtual bool | addObserver (std::shared_ptr< RangeControllerObserverInterface > observer)=0 |
virtual void | removeObserver (const std::shared_ptr< RangeControllerObserverInterface > &observer)=0 |
The RangeControllerInterface carries out range actions on an instance of an endpoint.
An implementation of the RangeControllerInterface controls the instance's range and may allow its methods to be called by multiple callers; for example the Alexa Capability Agent or the application’s GUI.
using alexaClientSDK::avsCommon::sdkInterfaces::rangeController::RangeControllerInterface::RangeState = avsCommon::sdkInterfaces::rangeController::RangeControllerObserverInterface::RangeState |
Alias to improve readability.
|
virtualdefault |
Virtual destructor to assure proper cleanup of derived types.
|
pure virtual |
Adds a RangeControllerObserverInterface
observer.
RangeControllerObserverInterface
for any change in its property state. This includes notifying the value when the device starts, if it is different from the last reported value.observer | The pointer to the RangeControllerObserverInterface . |
true
if the object supports observer notification and observer was successfully added; otherwise, return false
|
pure virtual |
Adjust the range of an instance.
deltaRange | The desired delta range of the instance. |
cause | The cause type for this action represented using AlexaStateChangeCauseType . |
AlexaResponseType
and string. For the successful operation, the controller should return a pair with AlexaResponseType::SUCCESS
with an empty string, otherwise returns a pair with the appropriate reason from AlexaResponseType
and a description of the error. Implemented in alexaClientSDK::sampleApplications::common::PeripheralEndpointRangeControllerHandler, and alexaClientSDK::sampleApplications::common::DefaultEndpointRangeControllerHandler.
|
pure virtual |
Gets the controller configuration as defined in RangeControllerConfiguration
RangeControllerConfiguration
Implemented in alexaClientSDK::sampleApplications::common::PeripheralEndpointRangeControllerHandler, and alexaClientSDK::sampleApplications::common::DefaultEndpointRangeControllerHandler.
|
pure virtual |
Gets the current range state of the instance.
AlexaResponseType::SUCCESS
and RangeState
otherwise returns a pair with the appropriate reason from AlexaResponseType
and a empty RangeState
. Implemented in alexaClientSDK::sampleApplications::common::PeripheralEndpointRangeControllerHandler, and alexaClientSDK::sampleApplications::common::DefaultEndpointRangeControllerHandler.
|
pure virtual |
Removes a observer of RangeControllerObserverInterface
.
observer | The pointer to the RangeControllerObserverInterface . |
|
pure virtual |
Set the range of the instance.
range | The desired range value of the instance. |
cause | The cause type for this action represented using AlexaStateChangeCauseType . |
AlexaResponseType
and string. For the successful operation, the controller should return a pair with AlexaResponseType::SUCCESS
with an empty string, otherwise returns a pair with the appropriate reason from AlexaResponseType
and a description of the error. Implemented in alexaClientSDK::sampleApplications::common::PeripheralEndpointRangeControllerHandler, and alexaClientSDK::sampleApplications::common::DefaultEndpointRangeControllerHandler.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0