#include <interfaces.h>
Inheritance diagram for simth::InputInterface:
Public Member Functions | |
InputInterface (Device *const dev, int ID) | |
virtual | ~InputInterface () |
virtual void | reset ()=0 |
virtual void | acceptNewData (size_t newElements)=0 |
virtual size_t | sequenceLength () const =0 |
virtual void | setSequenceLength (size_t newLen)=0 |
virtual bool | isFilled () const =0 |
bool | isConnected () const |
virtual void | acceptConnection () |
virtual void | flushProcessedSequence ()=0 |
virtual void | releaseProcessedSequence ()=0 |
virtual void | processFinished ()=0 |
|
Class constructor. The first argument is a pointer the parent device, the second specifies the identity number of the interface within the parent device. |
|
|
|
Resets the interface. After calling that function the interface should behave as before any data had arrived. Implemented in simth::InputInterfaceT< T >. |
|
This function is invoked, when the interface got new data from the connected interface. If the number of stored elements (including the number of the new data elements) is larger than the sequence length (see sequenceLenght()), the interface invokes itself the function acceptNewData(..) of the parent device. If the sequence length is undefined when calling this function (i.e. it was not set so far), the sequence length will be set to 'newElements'. Implemented in simth::InputInterfaceT< T >. |
|
Returns the sequence length of the input interface. The sequence length specifies when the parent device (see device()) is informed about new incoming data, i.e. if the number of stored elements exceeds the sequence length, is called (see InputInterface::acceptNewData(size)). Without setting the sequence length to a certain value, the sequence length is undefined. In that case the return value of this function equals the constant DataInterface::undefinedLength.Implemented in simth::InputInterfaceT< T >. |
|
Sets the number of elements needed at least to fill the buffer. Implemented in simth::InputInterfaceT< T >. |
|
Returns true if the input buffer is filled (i.e. the buffer is filled with more than sequenceLength() elements) or if the interface is not connected with another device. Implemented in simth::InputInterfaceT< T >. |
|
Returns true if the input interface is connected with another device |
|
This function is calling, when an output device intends to connect to this interface. |
|
Flushes the processed data elements. This function is called after input data elements had been passed by the function internSequence() to the parent device. The number of elements that had been passed and that are now flushed equals the sequence length number (see sequenceLength()). The reference counter of the interface is subtracted by one. Implemented in simth::InputInterfaceT< T >. |
|
Releases the processed data elements. Like in flushProcessedSequence() the reference counter of the interface is subtracted by one to release the accessed sequence. Unlike in flushProcessedSequence() the data is not flushed from the internal buffer. Implemented in simth::InputInterfaceT< T >. |
|
This function is called by the connected device if it finished writing new data to this input interface. Implemented in simth::InputInterfaceT< T >. |