16 #ifndef ALEXA_CLIENT_SDK_CAPABILITYAGENTS_RANGECONTROLLER_INCLUDE_RANGECONTROLLER_RANGECONTROLLERCAPABILITYAGENT_H_ 17 #define ALEXA_CLIENT_SDK_CAPABILITYAGENTS_RANGECONTROLLER_INCLUDE_RANGECONTROLLER_RANGECONTROLLERCAPABILITYAGENT_H_ 33 namespace capabilityAgents {
34 namespace rangeController {
46 ,
public std::enable_shared_from_this<RangeControllerCapabilityAgent> {
70 static std::shared_ptr<RangeControllerCapabilityAgent>
create(
74 std::shared_ptr<avsCommon::sdkInterfaces::rangeController::RangeControllerInterface> rangeController,
75 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
76 std::shared_ptr<avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface> responseSender,
77 std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
78 bool isProactivelyReported,
80 bool isNonControllable =
false);
135 std::shared_ptr<avsCommon::sdkInterfaces::rangeController::RangeControllerInterface> rangeController,
136 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
137 std::shared_ptr<avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface> responseSender,
138 std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
139 bool isProactivelyReported,
141 bool isNonControllable =
false);
145 void doShutdown()
override;
160 void removeDirective(std::shared_ptr<DirectiveInfo> info);
167 void executeSetHandlingCompleted(std::shared_ptr<DirectiveInfo> info);
182 void executeSetRangeValueDirective(std::shared_ptr<DirectiveInfo> info, rapidjson::Document& payload);
190 void executeAdjustRangeValueDirective(std::shared_ptr<DirectiveInfo> info, rapidjson::Document& payload);
207 bool validateRangeValue(
double rangeValue);
215 void executeProvideState(
226 void executeSendResponseEvent(
227 const std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info,
228 std::pair<avsCommon::avs::AlexaResponseType, std::string> result);
244 bool m_isProactivelyReported;
247 bool m_isRetrievable;
250 bool m_isNonControllable;
256 std::shared_ptr<avsCommon::sdkInterfaces::rangeController::RangeControllerInterface> m_rangeController;
259 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> m_contextManager;
262 std::shared_ptr<avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface> m_responseSender;
266 m_rangeControllerConfiguration;
276 #endif // ALEXA_CLIENT_SDK_CAPABILITYAGENTS_RANGECONTROLLER_INCLUDE_RANGECONTROLLER_RANGECONTROLLERCAPABILITYAGENT_H_ Definition: CapabilityAgent.h:47
bool canStateBeRetrieved() override
void handleDirective(std::shared_ptr< DirectiveInfo > info) override
void preHandleDirective(std::shared_ptr< DirectiveInfo > info) override
Definition: CapabilityTag.h:32
::std::string string
Definition: gtest-port.h:1097
Definition: RangeControllerAttributes.h:38
Single-thread executor implementation.
Definition: Executor.h:45
unsigned int ContextRequestToken
Alias for the token used to identify a context request.
Definition: ContextRequestToken.h:23
Definition: RequiresShutdown.h:32
Definition: RangeControllerInterface.h:50
ExceptionErrorType
Definition: ExceptionErrorType.h:28
AlexaStateChangeCauseType
Definition: AlexaStateChangeCauseType.h:28
static std::shared_ptr< RangeControllerCapabilityAgent > create(const EndpointIdentifier &endpointId, const std::string &instance, const avsCommon::sdkInterfaces::rangeController::RangeControllerAttributes &rangeControllerAttributes, std::shared_ptr< avsCommon::sdkInterfaces::rangeController::RangeControllerInterface > rangeController, std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface > responseSender, std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionSender, bool isProactivelyReported, bool isRetrievable, bool isNonControllable=false)
Definition: RangeControllerObserverInterface.h:41
std::unordered_map< directiveRoutingRule::DirectiveRoutingRule, BlockingPolicy > DirectiveHandlerConfiguration
Definition: DirectiveHandlerConfiguration.h:32
void handleDirectiveImmediately(std::shared_ptr< avsCommon::avs::AVSDirective > directive) override
Definition: CapabilityState.h:31
void onRangeChanged(const RangeState &rangeState, avsCommon::sdkInterfaces::AlexaStateChangeCauseType causeType) override
void cancelDirective(std::shared_ptr< DirectiveInfo > info) override
void provideState(const avsCommon::avs::CapabilityTag &stateProviderName, const avsCommon::sdkInterfaces::ContextRequestToken contextRequestToken) override
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
avsCommon::sdkInterfaces::endpoints::EndpointIdentifier EndpointIdentifier
Alias to improve readability.
Definition: RangeControllerCapabilityAgent.h:49
avsCommon::sdkInterfaces::rangeController::RangeControllerObserverInterface::RangeState RangeState
Alias to improve readability.
Definition: RangeControllerInterface.h:40
type
Definition: upload.py:443
std::string EndpointIdentifier
Definition: EndpointIdentifier.h:38
avsCommon::avs::DirectiveHandlerConfiguration getConfiguration() const override
Definition: CapabilityConfiguration.h:42
bool hasReportableStateProperties() override
Definition: RangeControllerObserverInterface.h:31
avsCommon::avs::CapabilityConfiguration getCapabilityConfiguration()
Definition: RangeControllerCapabilityAgent.h:42