Last change
on this file since 443 was 443, checked in by Sanahuja Guillaume, 3 years ago |
update buffering (gcs part)
|
File size:
1.2 KB
|
Rev | Line | |
---|
[10] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[10] | 4 | // %flair:license}
|
---|
[9] | 5 | #ifndef DATAREMOTE_H
|
---|
| 6 | #define DATAREMOTE_H
|
---|
| 7 |
|
---|
| 8 | #include <stdint.h>
|
---|
| 9 | #include "XmlWidget.h"
|
---|
| 10 | #include <QPoint>
|
---|
| 11 |
|
---|
| 12 | class QMenu;
|
---|
| 13 | class QAction;
|
---|
| 14 |
|
---|
[15] | 15 | class DataRemote : public XmlWidget {
|
---|
| 16 | public:
|
---|
| 17 | DataRemote(QString name, QString type, XmlWidget *parent, bool enabled,
|
---|
[437] | 18 | uint16_t period, uint16_t nb_buffering=1);
|
---|
[15] | 19 | ~DataRemote();
|
---|
| 20 | uint16_t RefreshRate_ms(void);
|
---|
| 21 | bool IsEnabled(void);
|
---|
| 22 | int ReceiveSize(void);
|
---|
[443] | 23 | virtual void BufEvent(char **buf, int *buf_size, uint16_t period,uint16_t nb_buffering, bool big_endian) = 0;
|
---|
[15] | 24 | void appendmenu(QMenu *menu);
|
---|
| 25 | QAction *execmenu(QWidget *parent, QMenu *menu, QPoint point);
|
---|
[9] | 26 |
|
---|
[15] | 27 | protected:
|
---|
| 28 | bool auto_refresh;
|
---|
| 29 | bool is_logging;
|
---|
| 30 | double refresh_rate; // en s
|
---|
| 31 | int receivesize;
|
---|
[437] | 32 | uint16_t nb_buffering;
|
---|
[9] | 33 |
|
---|
[269] | 34 | void XmlSetup(QDomElement *dom);
|
---|
[9] | 35 |
|
---|
[15] | 36 | private:
|
---|
[437] | 37 | void SendPeriod(uint16_t period, bool auto_refresh);
|
---|
| 38 | void SendNbBuffering(uint16_t nb_buffering);
|
---|
| 39 | QAction *SetAutoRefresh, *setRefreshRate,*setNbBuffering;
|
---|
[222] | 40 | //QAction **log;//todo implement this feature (log directly in gcs, in case of uav program crash)
|
---|
[9] | 41 | };
|
---|
| 42 |
|
---|
| 43 | #endif // DATAREMOTE_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.