AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <PeripheralEndpointToggleControllerHandler.h>
Static Public Member Functions | |
static std::shared_ptr< PeripheralEndpointToggleControllerHandler > | create (const std::string &endpointName, const std::string &instance) |
Additional Inherited Members | |
Public Types inherited from alexaClientSDK::avsCommon::sdkInterfaces::toggleController::ToggleControllerInterface | |
using | ToggleState = avsCommon::sdkInterfaces::toggleController::ToggleControllerObserverInterface::ToggleState |
Alias to improve readability. More... | |
Sample implementation of an ToggleControllerInterface
.
|
override |
|
static |
Create a PeripheralEndpointToggleControllerHandler object.
endpointName | The name of the endpoint. |
instance | The instance name of the capability. |
nullptr
.
|
overridevirtual |
Gets the current toggle state of an instance.
AlexaResponseType::SUCCESS
and ToggleState
otherwise returns a pair with the appropriate reason from AlexaResponseType
and a empty ToggleState
. Implements alexaClientSDK::avsCommon::sdkInterfaces::toggleController::ToggleControllerInterface.
|
override |
|
overridevirtual |
Set the toggle state of an instance.
state | The desired toggle state of the instance true indicates 'ON' and false as 'OFF' |
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. Implements alexaClientSDK::avsCommon::sdkInterfaces::toggleController::ToggleControllerInterface.
void alexaClientSDK::sampleApplications::common::PeripheralEndpointToggleControllerHandler::setToggleState | ( | bool | toggleState | ) |
Set the toggle state the controller.
toggleState | The toggle state of the controller. true indicates ON and false as OFF. |
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0