AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::sampleApp::ConsoleReader Class Reference

#include <ConsoleReader.h>

Public Member Functions

 ConsoleReader ()
 Constructor. More...
 ~ConsoleReader ()
 Destructor. More...
bool read (const std::chrono::milliseconds timeout, char *data)

Detailed Description

ConsoleReader provides an alternative to std::cin where the users can specify the timeout for an input from the console.

Constructor & Destructor Documentation

◆ ConsoleReader()

alexaClientSDK::sampleApp::ConsoleReader::ConsoleReader ( )


◆ ~ConsoleReader()

alexaClientSDK::sampleApp::ConsoleReader::~ConsoleReader ( )


Member Function Documentation

◆ read()

bool alexaClientSDK::sampleApp::ConsoleReader::read ( const std::chrono::milliseconds  timeout,
char *  data 

Reads an input from the console. This is a blocking call until an input is read or until the timeout has occurred.

timeoutTimeout to wait for the input.
[out]dataA pointer to a single character. It will be set to the value of the last character which was read from the console.
Returns true if a character is read from the console. false if timeout has occurred.

The documentation for this class was generated from the following file:

AlexaClientSDK 3.0.0 - Copyright 2016-2022, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0