MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
mxl::lib::ContinuousFlowReader Class Referenceabstract

#include <ContinuousFlowReader.hpp>

Inheritance diagram for mxl::lib::ContinuousFlowReader:
Collaboration diagram for mxl::lib::ContinuousFlowReader:

Public Member Functions

virtual std::size_t getMaxReadLength () const =0
virtual mxlStatus getSamples (std::uint64_t index, std::size_t count, mxlWrappedMultiBufferSlice &payloadBufferSlices)=0
virtual mxlStatus getSamples (std::uint64_t index, std::size_t count, Timepoint deadline, mxlWrappedMultiBufferSlice &payloadBufferSlices)=0
virtual mxlStatus waitForSamples (std::uint64_t index, Timepoint deadline) const =0
Public Member Functions inherited from mxl::lib::FlowReader
std::filesystem::path const & getDomain () const
virtual mxlFlowConfigInfo getFlowConfigInfo () const =0
virtual FlowData const & getFlowData () const =0
virtual mxlFlowInfo getFlowInfo () const =0
virtual mxlFlowRuntimeInfo getFlowRuntimeInfo () const =0
uuids::uuid const & getId () const
virtual ~FlowReader ()

Protected Member Functions

 FlowReader (uuids::uuid &&flowId, std::filesystem::path const &domain)
 FlowReader (uuids::uuid const &flowId, std::filesystem::path const &domain)
Protected Member Functions inherited from mxl::lib::FlowReader
bool checkPermissions () const
 FlowReader (uuids::uuid &&flowId, std::filesystem::path const &domain)
 FlowReader (uuids::uuid const &flowId, std::filesystem::path const &domain)
virtual bool isFlowValid () const =0

Detailed Description

Definition at line 11 of file ContinuousFlowReader.hpp.

Member Function Documentation

◆ FlowReader() [1/2]

mxl::lib::FlowReader::FlowReader ( uuids::uuid && flowId,
std::filesystem::path const & domain )
explicitprotected

Definition at line 84 of file FlowReader.cpp.

12 : _flowId{std::move(flowId)}
13 , _domain{domain}
14 {}
std::filesystem::path _domain
auto const flowId

◆ FlowReader() [2/2]

mxl::lib::FlowReader::FlowReader ( uuids::uuid const & flowId,
std::filesystem::path const & domain )
explicitprotected

Definition at line 85 of file FlowReader.cpp.

18 , _domain{domain}
19 {}

◆ getMaxReadLength()

virtual std::size_t mxl::lib::ContinuousFlowReader::getMaxReadLength ( ) const
nodiscardpure virtual

Return the maximum number of samples that can be retrieved by a read operation in one go.

Returns
The maximum number of samples a read operation can return in one go.

Implemented in mxl::lib::PosixContinuousFlowReader.

◆ getSamples() [1/2]

virtual mxlStatus mxl::lib::ContinuousFlowReader::getSamples ( std::uint64_t index,
std::size_t count,
mxlWrappedMultiBufferSlice & payloadBufferSlices )
pure virtual

Non-blocking accessor for a specific set of samples across all channels ending at a specific index (count samples up to index).

Parameters
[in]indexThe starting index of the samples to obtain.
[in]countThe number of samples to obtain.
[out]payloadBuffersSlicesA reference to a wrapped multi buffer slice that represents the requested range across all channel buffers
Returns
A status code describing the outcome of the call.
Note
No guarantees are made as to how long the caller may safely hang on to the returned range of samples without the risk of these samples being overwritten.

Implemented in mxl::lib::PosixContinuousFlowReader.

◆ getSamples() [2/2]

virtual mxlStatus mxl::lib::ContinuousFlowReader::getSamples ( std::uint64_t index,
std::size_t count,
Timepoint deadline,
mxlWrappedMultiBufferSlice & payloadBufferSlices )
pure virtual

Accessor for a specific set of samples across all channels ending at a specific index (count samples up to index).

Parameters
[in]indexThe starting index of the samples to obtain.
[in]countThe number of samples to obtain.
[in]deadlineThe point in time of Clock::Realtime at which to stop waiting.
[out]payloadBuffersSlicesA reference to a wrapped multi buffer slice that represents the requested range across all channel buffers
Returns
A status code describing the outcome of the call. Please note that this method will never return MXL_ERR_TIMEOUT, because the actual error that is being encountered in this case is MXL_ERR_OUT_OF_RANGE_TOO_EARLY, even after waiting.
Note
No guarantees are made as to how long the caller may safely hang on to the returned range of samples without the risk of these samples being overwritten.

Implemented in mxl::lib::PosixContinuousFlowReader.

◆ waitForSamples()

virtual mxlStatus mxl::lib::ContinuousFlowReader::waitForSamples ( std::uint64_t index,
Timepoint deadline ) const
pure virtual

Blocking wait function for the sample at the specified index to become available.

Parameters
[in]indexThe starting index of the samples to obtain.
[in]deadlineThe point in time of Clock::Realtime at which to stop waiting.
Returns
A status code describing the outcome of the call. Please note that this method will never return MXL_ERR_TIMEOUT, because the actual error that is being encountered in this case is MXL_ERR_OUT_OF_RANGE_TOO_EARLY, even after waiting.
Note
No guarantees are made as to how long the caller may safely hang on to the returned range of samples without the risk of these samples being overwritten.

Implemented in mxl::lib::PosixContinuousFlowReader.


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