fast::DataChannel class

Base classes

class Object
Base class for all FAST objects.

Derived classes

class NewestFrameDataChannel
class QueuedDataChannel

Public types

using pointer = std::shared_ptr<DataChannel>

Constructors, destructors, conversion operators

DataChannel() protected

Public functions

void addFrame(DataObject::pointer data) pure virtual
template<class T = DataObject>
auto getNextFrame() -> std::shared_ptr<T>
auto getSize() -> int pure virtual
void setMaximumNumberOfFrames(uint frames) pure virtual
auto getMaximumNumberOfFrames() const -> int pure virtual
void stop() pure virtual
auto hasCurrentData() -> bool pure virtual
auto getFrame() -> DataObject::pointer pure virtual
auto getProcessObject() const -> std::shared_ptr<ProcessObject>
void setProcessObject(std::shared_ptr<ProcessObject> po)
template<>
auto getNextFrame() -> std::shared_ptr<DataObject>
template<>
auto getNextFrame() -> FAST_EXPORT std::shared_ptr<DataObject>

Protected functions

auto getNextDataFrame() -> DataObject::pointer pure virtual

Protected variables

bool m_stop
std::mutex m_mutex
std::shared_ptr<ProcessObject> m_processObject

Function documentation

void fast::DataChannel::addFrame(DataObject::pointer data) pure virtual

Add frame to the data channel. This call may block if the buffer is full.

template<class T = DataObject>
std::shared_ptr<T> fast::DataChannel::getNextFrame()

Get next frame in the data channel. It will block until the frame is available.

int fast::DataChannel::getSize() pure virtual

Returns the number of frames stored in this DataChannel

void fast::DataChannel::setMaximumNumberOfFrames(uint frames) pure virtual

Set the maximum nr of frames that can be stored in this data channel

void fast::DataChannel::stop() pure virtual

This will unblock if this DataChannel is currently blocking. Used to stop a pipeline.

DataObject::pointer fast::DataChannel::getFrame() pure virtual

Get current frame, throws if current frame is not available.

template<>
std::shared_ptr<DataObject> fast::DataChannel::getNextFrame()