A class for bi-directional communication. More...

Public Types | |
typedef DownloadedData_t | DownloadedData |
The type of data being downloaded by this class. | |
typedef DataUploader < UploadedData > ::FullQueueBehavior | FullQueueBehavior |
A typedef to easily access the FullQueueBehavior type. | |
typedef DataDownloader < DownloadedData > ::NewDatumAvailableBehavior | NewDatumAvailableBehavior |
A typedef to easily access the NewDatumAvailableBehavior type. | |
typedef UploadedData_t | UploadedData |
The type of data being uploaded by this class. | |
![]() | |
typedef UploadedData_t | DataType |
The type of data being exchanged. | |
typedef farsa::DatumToUpload < DataType > | DatumToUpload |
A typedef to use the correct DatumToUpload. | |
enum | FullQueueBehavior |
The possible behaviors when the queue is full. More... | |
![]() | |
typedef DownloadedData_t | DataType |
The type of data being exchanged. | |
enum | NewDatumAvailableBehavior |
The possible behaviors when a new datum arrives. More... |
Public Member Functions | |
DataUploaderDownloader (unsigned int uploadQueueSize, FullQueueBehavior fullQueueBehavior, NewDatumAvailableBehavior newDatumAvailableBehavior, DataUploaderDownloader< DownloadedData, UploadedData > *other=NULL) | |
Constructor. | |
DataUploaderDownloader (unsigned int uploadQueueSize, FullQueueBehavior fullQueueBehavior, QObject *o, DataUploaderDownloader< DownloadedData, UploadedData > *other=NULL) | |
Constructor. | |
DataUploaderDownloader (unsigned int uploadQueueSize, FullQueueBehavior fullQueueBehavior, NewDatumNotifiable< DownloadedData > *o, DataUploaderDownloader< DownloadedData, UploadedData > *other=NULL) | |
Constructor. | |
~DataUploaderDownloader () | |
Destructor. | |
![]() | |
DataUploader (unsigned int queueSize, FullQueueBehavior b, DataDownloader< DataType > *downloader=NULL) | |
Constructor. | |
~DataUploader () | |
Destructor. | |
bool | associationBeforeUploadChecked () const |
Returns true if an exception is thrown if the user tries to upload a datum but no association is present. | |
void | checkAssociationBeforeUpload (bool v) |
Sets whether an exception has to be thrown if the user tries to upload a datum but no association is present. | |
DataType * | createDatum () |
Returns a pointer to an object that will be the next datum to upload. | |
bool | datumCreatedNotUploaded () const |
Returns true if a new datum has been created but not uploaded (i.e. createDatum() has been called but uploadDatum() hasn't) | |
unsigned int | getAvailableSpace () const |
Returns the number of data the queue can hold before becoming full. | |
const DataDownloader< DataType > * | getDownloader () const |
Returns the downloader associated with this uploader. | |
FullQueueBehavior | getFullQueueBehavior () const |
Returns the FullQueueBehavior. | |
unsigned int | getNumDataInQueue () const |
Returns the number of data currently in the queue. | |
unsigned int | getQueueSize () const |
Returns the queue size. | |
void | uploadDatum () |
Adds the current datum to the queue. | |
![]() | |
DataDownloader (NewDatumAvailableBehavior b, DataUploader< DataType > *uploader=NULL) | |
Constructor. | |
DataDownloader (QObject *o, DataUploader< DataType > *uploader=NULL) | |
Constructor. | |
DataDownloader (NewDatumNotifiable< DataType > *o, DataUploader< DataType > *uploader=NULL) | |
Constructor. | |
~DataDownloader () | |
Destructor. | |
const DataType * | downloadDatum () |
Returns a pointer to the next datum. | |
NewDatumAvailableBehavior | getNewDatumAvailableBehavior () const |
Returns the NewDatumAvailableBehavior. | |
unsigned int | getNumAvailableData () const |
Returns the number of available data. | |
const DataUploader< DataType > * | getUploader () const |
Returns the uploader associated with this downloader. |
Detailed Description
template<class UploadedData_t, class DownloadedData_t>
class farsa::DataUploaderDownloader< UploadedData_t, DownloadedData_t >
A class for bi-directional communication.
This class inherits from both DataUploader and DataDownloader. See dataexchange.h for more information
Definition at line 879 of file dataexchange.h.
Member Typedef Documentation
typedef DownloadedData_t DownloadedData |
The type of data being downloaded by this class.
Definition at line 890 of file dataexchange.h.
A typedef to easily access the FullQueueBehavior type.
Definition at line 895 of file dataexchange.h.
A typedef to easily access the NewDatumAvailableBehavior type.
Definition at line 900 of file dataexchange.h.
typedef UploadedData_t UploadedData |
The type of data being uploaded by this class.
Definition at line 885 of file dataexchange.h.
Constructor & Destructor Documentation
|
inline |
Constructor.
- Parameters
-
uploadQueueSize the size of the upload queue. If the b parameter is IncreaseQueueSize, this is the initial size and the queue will never be shorter than this. The queue will always have at least one element (even if this is set to 0) fullQueueBehavior the behavior of the uploader when the queue is full newDatumAvailableBehavior the behavior of the downloader when a new datum arrives. In this constructor this must be either NoNotification or NoNotificationBlocking, otherwise an exception is thrown other the other DataUploaderDownloader with which we are associated. This can be NULL. If an association is already present, an exception is thrown
Definition at line 924 of file dataexchange.h.
|
inline |
Constructor.
This constructor sets the NewDatumAvailableBehavior of the downloader to QtEvent
- Parameters
-
uploadQueueSize the size of the upload queue. If the b parameter is IncreaseQueueSize, this is the initial size and the queue will never be shorter than this. The queue will always have at least one element (even if this is set to 0) fullQueueBehavior the behavior of the uploader when the queue is full o the object to send notifications to when a new datum is available. This must not be NULL. other the other DataUploaderDownloader with which we are associated. This can be NULL. If an association is already present, an exception is thrown
Definition at line 949 of file dataexchange.h.
|
inline |
Constructor.
This constructor sets the NewDatumAvailableBehavior of the downloader to Callback
- Parameters
-
uploadQueueSize the size of the upload queue. If the b parameter is IncreaseQueueSize, this is the initial size and the queue will never be shorter than this. The queue will always have at least one element (even if this is set to 0) fullQueueBehavior the behavior of the uploader when the queue is full o the object whose callback has to be called when a new datum is available. This must not be NULL. other the other DataUploaderDownloader with which we are associated. This can be NULL. If an association is already present, an exception is thrown
Definition at line 974 of file dataexchange.h.
|
inline |
Destructor.
Definition at line 983 of file dataexchange.h.
The documentation for this class was generated from the following file:
- utilities/include/dataexchange.h