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

#include <DiscreteFlowReader.hpp>

Inheritance diagram for mxl::lib::DiscreteFlowReader:
Collaboration diagram for mxl::lib::DiscreteFlowReader:

Public Member Functions

virtual mxlStatus getGrain (std::uint64_t in_index, std::uint16_t in_minValidSlices, mxlGrainInfo *out_grainInfo, std::uint8_t **out_payload)=0
virtual mxlStatus getGrain (std::uint64_t in_index, std::uint16_t in_minValidSlices, Timepoint in_deadline, mxlGrainInfo *out_grainInfo, std::uint8_t **out_payload)=0
virtual mxlStatus waitForGrain (std::uint64_t in_index, std::uint16_t in_minValidSlices, Timepoint in_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 DiscreteFlowReader.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 {}

◆ getGrain() [1/2]

virtual mxlStatus mxl::lib::DiscreteFlowReader::getGrain ( std::uint64_t in_index,
std::uint16_t in_minValidSlices,
mxlGrainInfo * out_grainInfo,
std::uint8_t ** out_payload )
pure virtual

Non-blocking accessor for a specific grain at a specific index. The index must be greater than or equal to the current tail index of the flow.

Parameters
in_indexThe grain index.
in_minValidSlicesThe expected number of valid slices in the returned mxlGrainInfo.
out_grainInfoA valid pointer to mxlGrainInfo that will be copied to
out_payloadA valid void pointer to pointer that will be set to the first byte of the grain payload. Payload size is available in the mxlGrainInfo structure.
Returns
A status code describing the outcome of the call.

Implemented in mxl::lib::PosixDiscreteFlowReader.

◆ getGrain() [2/2]

virtual mxlStatus mxl::lib::DiscreteFlowReader::getGrain ( std::uint64_t in_index,
std::uint16_t in_minValidSlices,
Timepoint in_deadline,
mxlGrainInfo * out_grainInfo,
std::uint8_t ** out_payload )
pure virtual

Accessor for a specific grain at a specific index. The index must be greater than or equal to the current tail index of the flow.

Parameters
in_indexThe grain index.
in_minValidSlicesThe expected number of valid slices in the returned mxlGrainInfo.
in_deadlineThe point in time of Clock::Realtime at which to stop waiting.
out_grainInfoA valid pointer to mxlGrainInfo that will be copied to
out_payloadA valid void pointer to pointer that will be set to the first byte of the grain payload. Payload size is available in the mxlGrainInfo structure.
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.

Implemented in mxl::lib::PosixDiscreteFlowReader.

◆ waitForGrain()

virtual mxlStatus mxl::lib::DiscreteFlowReader::waitForGrain ( std::uint64_t in_index,
std::uint16_t in_minValidSlices,
Timepoint in_deadline ) const
pure virtual

Blocking wait function for a specific grain at a specific index. The index must be greater than or equal to the current tail index of the flow.

Parameters
in_indexThe grain index.
in_minValidSlicesThe expected number of valid slices in the returned mxlGrainInfo.
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
Please note that contrary to the various overloads of getGrain, this method does not update the flow access time.

Implemented in mxl::lib::PosixDiscreteFlowReader.


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