source: flair-src/trunk/tools/FlairGCS/src/DataRemote.h@ 459

Last change on this file since 459 was 455, checked in by Sanahuja Guillaume, 3 years ago

gcs: add compatibility with programs without nb_buffering

File size: 1.2 KB
RevLine 
[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
12class QMenu;
13class QAction;
14
[15]15class DataRemote : public XmlWidget {
16public:
17 DataRemote(QString name, QString type, XmlWidget *parent, bool enabled,
[437]18 uint16_t period, uint16_t nb_buffering=1);
[15]19 ~DataRemote();
[444]20 virtual void BufEvent(char **buf, int *buf_size, uint16_t period,uint16_t nb_buffering,bool big_endian) = 0;
21
22protected:
23 int receivesize;
24 double refresh_rate; // en s
25
26 void XmlSetup(QDomElement *dom);
[15]27 uint16_t RefreshRate_ms(void);
[444]28 uint16_t NbBuffering(void);
[15]29 bool IsEnabled(void);
30 void appendmenu(QMenu *menu);
31 QAction *execmenu(QWidget *parent, QMenu *menu, QPoint point);
[9]32
[15]33private:
[437]34 void SendPeriod(uint16_t period, bool auto_refresh);
35 void SendNbBuffering(uint16_t nb_buffering);
[444]36 bool is_logging;
37 bool auto_refresh;
38 uint16_t nb_buffering;
[437]39 QAction *SetAutoRefresh, *setRefreshRate,*setNbBuffering;
[455]40 bool nbBufferingCompatible;
[222]41 //QAction **log;//todo implement this feature (log directly in gcs, in case of uav program crash)
[9]42};
43
44#endif // DATAREMOTE_H
Note: See TracBrowser for help on using the repository browser.