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

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)
 

Detailed Description

A data sink class which can read and verify an aribrary amount of data at a specified rate and block size.

Member Function Documentation

◆ run()

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.

Parameters
readerThe SDS Reader to read from.
frequencyHzThe number of words-per-second to receive.
blockSizeWordsThe block size to group reads into.
maxWordsThe 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.
Returns
A future for the total number of words read.

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

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