The class containing the queue and all related elements. More...
Public Types | |
typedef DataType_t | DataType |
The type of data being exchanged. More... | |
Public Member Functions | |
QueueHolder (unsigned int queueSize, DataUploader< DataType > *u) | |
Constructor. More... | |
~QueueHolder () | |
Destructor. More... | |
Public Member Functions inherited from QueueHolderBase | |
QueueHolderBase () | |
Constructor. More... | |
Public Attributes | |
unsigned int | availableSpace |
The number of data the queue can hold before becoming full. More... | |
DataType * | currentDownloaderDatum |
The datum the downloader is currently using. More... | |
bool | datumCreatedNotUploaded |
True if a new datum has been created but not uploaded (i.e. createDatum() in the uploader has been called but uploadDatum() hasn't been called yet) More... | |
DataDownloader< DataType > * | downloader |
The downloader associated with this queue. More... | |
QLinkedList< DataType * >::iterator | nextDownloadIt |
The position in the queue that will be read next by the downloader. More... | |
DataType * | nextUploaderDatum |
The next datum the uploader will use. More... | |
QLinkedList< DataType * >::iterator | nextUploadIt |
The iterator to the element of the queue where the \ next datum uploaded by the uploader will be put. More... | |
unsigned int | numDataInQueue |
The number of data currently in the queue. More... | |
QLinkedList< DataType * > | queue |
The queue of data. More... | |
bool | queueFullLastDatumCreation |
Whether the queue was full the last time a datum was created. More... | |
DataUploader< DataType > * | uploader |
The uploader associated with this queue. More... | |
Public Attributes inherited from QueueHolderBase | |
bool | dataExchangeStopped |
If true no data exchange is possible. More... | |
QMutex | mutex |
The mutex protecting from concurrent accesses to data in this object. More... | |
QWaitCondition | waitCondition |
The wait condition used to wake the blocked downloader when a new datum arrives or the uploader when the queue is full. More... | |
Detailed Description
template<class DataType_t>
class farsa::__DataExchange_internal::QueueHolder< DataType_t >
The class containing the queue and all related elements.
This also contains the lock to use when accessing the queue
Definition at line 225 of file dataexchange.h.
Member Typedef Documentation
typedef DataType_t DataType |
The type of data being exchanged.
Definition at line 1256 of file dataexchange.h.
Constructor & Destructor Documentation
|
inline |
Constructor.
This creates the queue ad allocates all objects used here
- Parameters
-
queueSize the initial size of the queue u the uploader associated with this queue
Definition at line 1266 of file dataexchange.h.
References QueueHolder< DataType_t >::currentDownloaderDatum, QueueHolder< DataType_t >::nextDownloadIt, QueueHolder< DataType_t >::nextUploaderDatum, QueueHolder< DataType_t >::nextUploadIt, and QueueHolder< DataType_t >::queue.
|
inline |
Destructor.
This deallocates all memory
Definition at line 1316 of file dataexchange.h.
References QueueHolder< DataType_t >::currentDownloaderDatum, QueueHolder< DataType_t >::nextUploaderDatum, and QueueHolder< DataType_t >::queue.
Member Data Documentation
unsigned int availableSpace |
The number of data the queue can hold before becoming full.
Definition at line 1340 of file dataexchange.h.
DataType* currentDownloaderDatum |
The datum the downloader is currently using.
This will go back in the queue once the downloader asks for a new datum
Definition at line 1376 of file dataexchange.h.
Referenced by QueueHolder< DataType_t >::QueueHolder(), and QueueHolder< DataType_t >::~QueueHolder().
bool datumCreatedNotUploaded |
True if a new datum has been created but not uploaded (i.e. createDatum() in the uploader has been called but uploadDatum() hasn't been called yet)
Definition at line 1358 of file dataexchange.h.
DataDownloader<DataType>* downloader |
The downloader associated with this queue.
This is only modified by GlobalUploaderDownloader when its mutex is locked
Definition at line 1404 of file dataexchange.h.
QLinkedList<DataType*>::iterator nextDownloadIt |
The position in the queue that will be read next by the downloader.
Definition at line 1388 of file dataexchange.h.
Referenced by QueueHolder< DataType_t >::QueueHolder().
DataType* nextUploaderDatum |
The next datum the uploader will use.
This will go in the queue once uploading has ended and will be replaced by an element of the queue. If however the uploader FullQueueBehavior is IncreaseQueueSize, a new object could be created
Definition at line 1368 of file dataexchange.h.
Referenced by QueueHolder< DataType_t >::QueueHolder(), and QueueHolder< DataType_t >::~QueueHolder().
QLinkedList<DataType*>::iterator nextUploadIt |
The iterator to the element of the queue where the \ next datum uploaded by the uploader will be put.
Definition at line 1382 of file dataexchange.h.
Referenced by QueueHolder< DataType_t >::QueueHolder().
unsigned int numDataInQueue |
The number of data currently in the queue.
Definition at line 1345 of file dataexchange.h.
QLinkedList<DataType*> queue |
The queue of data.
Definition at line 1334 of file dataexchange.h.
Referenced by QueueHolder< DataType_t >::QueueHolder(), and QueueHolder< DataType_t >::~QueueHolder().
bool queueFullLastDatumCreation |
Whether the queue was full the last time a datum was created.
Definition at line 1351 of file dataexchange.h.
DataUploader<DataType>* uploader |
The uploader associated with this queue.
This is only modified by GlobalUploaderDownloader when its mutex is locked
Definition at line 1396 of file dataexchange.h.
The documentation for this class was generated from the following file:
- utilities/include/dataexchange.h