![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <StatesToValueMapping.h>
Public Member Functions | |
StatesToValueMapping () | |
bool | addState (const std::string &stateId) |
bool | setValue (const std::string &value) |
bool | setValue (double value) |
bool | isValid () const |
std::string | toJson () const |
This class represents a "StatesToValue" type "stateMapping" in a semantic annotation for a capability primitive.
alexaClientSDK::avsCommon::avs::capabilitySemantics::StatesToValueMapping::StatesToValueMapping | ( | ) |
The constructor.
bool alexaClientSDK::avsCommon::avs::capabilitySemantics::StatesToValueMapping::addState | ( | const std::string & | stateId | ) |
Adds the specified state identifier to the "states" array of this mapping object. The state identifier represents utterances that correspond to the value specified in setValue()
.
states | The identifier of the state to add to the "states" array. |
true
if the state was successfully added, else false
. bool alexaClientSDK::avsCommon::avs::capabilitySemantics::StatesToValueMapping::isValid | ( | ) | const |
Checks whether this StatesToValueMapping
is valid.
true
if valid, else false
. bool alexaClientSDK::avsCommon::avs::capabilitySemantics::StatesToValueMapping::setValue | ( | const std::string & | value | ) |
Sets a string value used in this state mapping.
value | The value mapped to the state(s). |
true
if the value was successfully set, else false
. bool alexaClientSDK::avsCommon::avs::capabilitySemantics::StatesToValueMapping::setValue | ( | double | value | ) |
Sets a floating point value used in this state mapping.
RangeController
capability instances. The value must be between the minimumValue
and maximumValue
of configuration.supportedRange
. value | The value mapped to the state(s). |
true
if the value was successfully set, else false
. std::string alexaClientSDK::avsCommon::avs::capabilitySemantics::StatesToValueMapping::toJson | ( | ) | const |
Converts this StatesToValueMapping
to a JSON string.
StatesToValueMapping
. AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0