stromx  0.8.0
Public Member Functions | List of all members
stromx::runtime::DataProvider Class Referenceabstract

Provider of functions to receive and send data. More...

#include <DataProvider.h>

Public Member Functions

virtual void testForInterrupt ()=0
 
virtual void sleep (const unsigned int microseconds)=0
 
virtual void receiveInputData (const Id2DataMapper &mapper)=0
 
virtual void sendOutputData (const Id2DataMapper &mapper)=0
 
virtual void unlockParameters ()=0
 
virtual void lockParameters ()=0
 
virtual const AbstractFactoryfactory () const =0
 

Detailed Description

Provider of functions to receive and send data.

Data providers are passed as parameter to OperatorKernel::execute() and provides ways for the executing kernel to send output data and receive input data.

Member Function Documentation

§ factory()

virtual const AbstractFactory& stromx::runtime::DataProvider::factory ( ) const
pure virtual

Returns the factor which is assigned to this operator. If no factory has been set the returned factory is a valid object but does not contain any data or operator instances.

§ lockParameters()

virtual void stromx::runtime::DataProvider::lockParameters ( )
pure virtual

Blocks all read and write access to parameters of the calling operator until unlockParameters() is called or any other blocking function is called. Blocking the parameter access makes sure no parameters are changed while the operator executes.

Exceptions
WrongStateIf the parameter access has already been blocked.

§ receiveInputData()

virtual void stromx::runtime::DataProvider::receiveInputData ( const Id2DataMapper mapper)
pure virtual

Receives input data from the provider. The functions waits until the requirements formulated in mapper have are fulfilled. If the stream is stopped during waiting Interrupt is thrown.

Exceptions
Interrupt

§ sendOutputData()

virtual void stromx::runtime::DataProvider::sendOutputData ( const Id2DataMapper mapper)
pure virtual

Sends input data from the provider. The functions waits until the requirements formulated in mapper have are fulfilled. If the stream is stopped during waiting Interrupt is thrown.

Exceptions
Interrupt

§ sleep()

virtual void stromx::runtime::DataProvider::sleep ( const unsigned int  microseconds)
pure virtual

Sleep for the given amount of microseconds. The function throws Interrup if the stream has been stopped while sleeping.

Exceptions
Interrupt

§ testForInterrupt()

virtual void stromx::runtime::DataProvider::testForInterrupt ( )
pure virtual

Throws Interrupt if the stream this operator belongs to has been stopped. If this is the case the current OperatorKernel::execute() must be exited as soon as possible. This function should be called regularly during a longer computation in OperatorKernel::execute() to ensure that a stream can be stopped within a reasonable amount of time.

Exceptions
Interrupt

§ unlockParameters()

virtual void stromx::runtime::DataProvider::unlockParameters ( )
pure virtual

Allows other threads to read and write parameters of the calling operator until lockParameters() any other blocking function is called. This function should be called if the operator is blocked by a longer operation which is not affected by parameter read or writes. In particular, it must be called if the operator is blocked at a condition which can only be unblocked by setting a parameter.

Exceptions
WrongStateIf the parameter access has already been unblocked.

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