Flair
Framework Libre Air
SendData.h
Go to the documentation of this file.
1 // %flair:license{
2 // This file is part of the Flair framework distributed under the
3 // CECILL-C License, Version 1.0.
4 // %flair:license}
13 #ifndef SENDDATA_H
14 #define SENDDATA_H
15 
16 #include <Widget.h>
17 
18 class SendData_impl;
19 
20 namespace flair {
21 namespace gui {
22 class LayoutPosition;
23 
29 class SendData : public Widget {
30 public:
35  SendData(const LayoutPosition *position, std::string name, std::string type,
36  uint16_t default_periodms = 100, bool default_enabled = false, uint16_t default_nb_buffering=1);
37 
42  virtual ~SendData();
43 
51  virtual void CopyDatas(char *buf) const = 0;
52 
53  size_t SendSize(void) const;
54  uint16_t SendPeriod(void) const; // in ms
55  bool IsEnabled(void) const;
56  uint16_t NbBuffering(void) const;
57 
58 protected:
67  void SetSendSize(size_t value);
68 
76  virtual void ExtraXmlEvent(void) = 0;
77 
78 private:
88  void XmlEvent(void) override;
89 
90  void SetSendPeriod(uint16_t value);
91  void SetNbBuffering(uint16_t value);
92  void SetEnabled(bool value);
93 
94  class SendData_impl *pimpl_;
95 };
96 
97 } // end namespace core
98 } // end namespace flair
99 
100 #endif // SENDDATA_H
namespace of the flair Framework
Definition: Ahrs.h:19
Abstract class for all Framework's widget classes.
virtual void ExtraXmlEvent(void)=0
Extra Xml event.
SendData(const LayoutPosition *position, std::string name, std::string type, uint16_t default_periodms=100, bool default_enabled=false, uint16_t default_nb_buffering=1)
Constructor.
Abstract class for all Framework's widget classes.
Definition: Widget.h:38
virtual ~SendData()
Destructor.
Class to define a position in a layout on the ground station.
Definition: LayoutPosition.h:28
virtual void CopyDatas(char *buf) const =0
Copy datas to specified buffer.
void SetSendSize(size_t value)
Notify that SendData's datas have changed.
Abstract class for sending datas to ground station.
Definition: SendData.h:29