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);
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 
57 protected:
66  void SetSendSize(size_t value);
67 
75  virtual void ExtraXmlEvent(void) = 0;
76 
77 private:
87  void XmlEvent(void);
88 
89  void SetSendPeriod(uint16_t value);
90  void SetEnabled(bool value);
91 
92  class SendData_impl *pimpl_;
93 };
94 
95 } // end namespace core
96 } // end namespace flair
97 
98 #endif // SENDDATA_H
SendData(const LayoutPosition *position, std::string name, std::string type, uint16_t default_periodms=100, bool default_enabled=false)
Constructor.
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.
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 SenData's datas have changed.
Abstract class for sending datas to ground station.
Definition: SendData.h:29