ifw-fcf  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
piezo.h
Go to the documentation of this file.
1 
9 #ifndef PIEZO_WDG_H
10 #define PIEZO_WDG_H
11 
12 #include "fcf/gui/wdglib/device.h"
14 
15 #include <QWidget>
16 #include <QObject>
17 #include <rad/mal/subscriber.hpp>
18 #include <rad/mal/utils.hpp>
19 
20 class QLabel;
21 class QCheckBox;
22 class QComboBox;
23 class QSpinBox;
24 class QPalette;
25 
26 
27 namespace Ui {
28  class PiezoWdg;
29 }
30 
31 class PiezoWdg : public DeviceWdg
32 {
33  Q_OBJECT
34 
35 public:
36  explicit PiezoWdg(QWidget *parent = 0,
37  std::string name = "undefined",
38  std::string filename = "undefined_file",
39  int cmd_timeout = 60000);
40  virtual ~PiezoWdg();
41 
42  virtual void StartSubscription();
43  void GetMessage(std::shared_ptr<::elt::mal::Mal> mal,
44  std::vector<std::shared_ptr<::fcfif::FcsUnion>>& setup_buffer,
45  bool ignoreChecked = false);
46  virtual void GetSubordinatedDevices(QStringList& dev_list);
47  virtual void UpdateData(QList<QVariant>& data_list);
48  virtual std::vector<std::string> GetDbAttributes(std::string server_id);
49  void SetEnable(bool flag);
50 
51 signals:
52  void SetBit(int index, int value);
53  void SetPos(int index, double value);
54 
55 public slots:
56  void SetActive(int index);
57  void UpdateSubstate(int substate);
58  void UpdateOptions(int mode);
59  void UpdateBit(int index, int value);
60  void UpdatePos(int index, double value);
61 
62 
63 private:
64 
65  Ui::PiezoWdg *ui;
66  std::unique_ptr<rad::cii::Subscriber<fcfif::PiezoTopicUnion>> m_subscriber;
67 
68  // Pointer to device configuration
69  std::unique_ptr<fcf::devmgr::piezo::PiezoConfig> m_device_config;
70 
71 
72 };
73 
74 #endif // PIEZO_WDG_H
Definition: device.h:112
void SetPos(int index, double value)
virtual void UpdateData(QList< QVariant > &data_list)
Definition: piezo.cpp:214
PiezoWdg(QWidget *parent=0, std::string name="undefined", std::string filename="undefined_file", int cmd_timeout=60000)
Definition: piezo.cpp:24
virtual void StartSubscription()
Definition: piezo.cpp:320
void UpdateOptions(int mode)
Definition: piezo.cpp:151
Definition: piezo.h:31
void GetMessage(std::shared_ptr<::elt::mal::Mal > mal, std::vector< std::shared_ptr<::fcfif::FcsUnion >> &setup_buffer, bool ignoreChecked=false)
Definition: piezo.cpp:179
void SetBit(int index, int value)
PiezoConfig class header file.
void SetActive(int index)
Definition: piezo.cpp:96
virtual void GetSubordinatedDevices(QStringList &dev_list)
Definition: piezo.cpp:288
void UpdatePos(int index, double value)
Definition: piezo.cpp:306
void UpdateBit(int index, int value)
Definition: piezo.cpp:292
void UpdateSubstate(int substate)
Definition: piezo.cpp:246
virtual std::vector< std::string > GetDbAttributes(std::string server_id)
Definition: piezo.cpp:266
virtual ~PiezoWdg()
Definition: piezo.cpp:72
WDGLIB DeviceWdg class declaration file.
void SetEnable(bool flag)
Definition: piezo.cpp:76