![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
A data sink class which can read and verify an aribrary amount of data at a specified rate and block size. More...
Public Member Functions | |
std::future< size_t > | run (std::shared_ptr< Sds::Reader > reader, size_t frequencyHz, size_t blockSizeWords, size_t maxWords=0) |
A data sink class which can read and verify an aribrary amount of data at a specified rate and block size.
std::future< size_t > alexaClientSDK::avsCommon::utils::sds::test::Sink::run | ( | std::shared_ptr< Sds::Reader > | reader, |
size_t | frequencyHz, | ||
size_t | blockSizeWords, | ||
size_t | maxWords = 0 |
||
) |
This function reads frequencyHz
words per second from reader
and verifies that they match an expected test pattern. It will group these reads into blockSizeWords
blocks and read them as blocks. The optional maxWords
parameter can be used to limit the amount of data read; when maxWords
have been read, the Source
automatically closes the reader
. This function will assert if there is a problem reading data from the SDS or a deviation from the expected test pattern values.
reader | The SDS Reader to read from. |
frequencyHz | The number of words-per-second to receive. |
blockSizeWords | The block size to group reads into. |
maxWords | The maximum number of words to read. This parmeter defaults to 0, which indicates that there is no maximum and it should continue to read until the reader closes or it is deleted. |
future
for the total number of words read. AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0