![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <StatesToRangeMapping.h>
Public Member Functions | |
StatesToRangeMapping () | |
bool | addState (const std::string &stateId) |
bool | setRange (double minValue, double maxValue) |
bool | isValid () const |
std::string | toJson () const |
This class represents a "StatesToRange" type "stateMapping" in a semantic annotation for a capability primitive.
CapabilitySemantics
belongs to a RangeController
capability instance. alexaClientSDK::avsCommon::avs::capabilitySemantics::StatesToRangeMapping::StatesToRangeMapping | ( | ) |
The constructor.
bool alexaClientSDK::avsCommon::avs::capabilitySemantics::StatesToRangeMapping::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 range specified in setRange()
.
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::StatesToRangeMapping::isValid | ( | ) | const |
Checks whether this StatesToRangeMapping
is valid.
true
if valid, else false
. bool alexaClientSDK::avsCommon::avs::capabilitySemantics::StatesToRangeMapping::setRange | ( | double | minValue, |
double | maxValue | ||
) |
Sets the range used in this state mapping.
minimumValue
and maximumValue
configured in configuration.supportedRange
for this RangeController
instance.minValue | The minimum value of the range mapped to the state(s). |
maxValue | The minimum value of the range mapped to the state(s). |
true
if the value was successfully set, else false
. std::string alexaClientSDK::avsCommon::avs::capabilitySemantics::StatesToRangeMapping::toJson | ( | ) | const |
Converts this StatesToRangeMapping
to a JSON string.
StatesToRangeMapping
. AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0