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::Source Class Reference

A data source class which can generate 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::Writer > writer, size_t frequencyHz, size_t blockSizeWords, size_t maxWords=0)
 

Detailed Description

A data source class which can generate 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::Source::run ( std::shared_ptr< Sds::Writer >  writer,
size_t  frequencyHz,
size_t  blockSizeWords,
size_t  maxWords = 0 
)

This function generates a test pattern and writes frequencyHz words per second to writer. It will group these writes into blockSizeWords blocks and write them as blocks. The optional maxWords parameter can be used to limit the amount of data sent; when maxWords have been sent, the Source automatically closes the writer. This function will assert if there is a problem writing data to the SDS.

Parameters
writerThe SDS Writer to write to.
frequencyHzThe number of words-per-second to send.
blockSizeWordsThe block size to group writes into.
maxWordsThe maximum number of words to send. This parmeter defaults to 0, which indicates that there is no maximum and it should continue to write until deleted.
Returns
A future for the total number of words written.

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