ifw-fcf  4.1.0-pre2
iodev.h
Go to the documentation of this file.
1 
9 #ifndef IODEV_WDG_H
10 #define IODEV_WDG_H
11 
13 #include "fcf/gui/wdglib/device.h"
14 
15 #include <QWidget>
16 #include <QObject>
17 #include <QTableWidgetItem>
18 #include <rad/mal/subscriber.hpp>
19 #include <rad/mal/utils.hpp>
20 
21 
22 class QLabel;
23 class QCheckBox;
24 class QComboBox;
25 class QSpinBox;
26 class QPalette;
27 
28 
29 namespace Ui {
30  class IODevWdg;
31 }
32 
33 class IODevWdg : public DeviceWdg
34 {
35  Q_OBJECT
36 
37 public:
38  explicit IODevWdg(QWidget *parent,
39  std::unique_ptr<utils::bat::DbInterface>& dbinterface,
40  const std::string& name,
42  const int& cmd_timeout = 60000);
43  virtual ~IODevWdg();
44 
45  virtual void StartSubscription();
46  void GetMessage(std::shared_ptr<::elt::mal::Mal> mal,
47  std::vector<std::shared_ptr<::fcfif::SetupElem>>& setup_buffer,
48  bool ignoreChecked = false);
49 
50  virtual void UpdateData();
51  virtual void GetDbAttributes();
52  virtual void SetEnable(bool flag);
53 
54 signals:
55 
56 
57 public slots:
58  void UpdateSubstate(int substate);
59  void UpdateInputChannel(int index, QString channel, QString value);
60  void UpdateOutputChannel(int index, QString channel, QString value);
61  void SetActive(int row, int col);
62 
63 protected:
64  bool is_sensor{false};
65 
66 private:
67  Ui::IODevWdg *ui;
69  std::vector<std::string> m_channel_list;
70  std::vector<std::pair<std::string, std::string>> m_output_list;
71 
72 };
73 
74 #endif // IODEV_WDG_H
IODevWdg::SetActive
void SetActive(int row, int col)
Definition: iodev.cpp:307
IODevWdg::~IODevWdg
virtual ~IODevWdg()
Definition: iodev.cpp:120
IODevWdg::StartSubscription
virtual void StartSubscription()
Definition: iodev.cpp:314
IODevWdg::IODevWdg
IODevWdg(QWidget *parent, std::unique_ptr< utils::bat::DbInterface > &dbinterface, const std::string &name, fcf::devmgr::iodev::IODevConfig &config, const int &cmd_timeout=60000)
Definition: iodev.cpp:27
IODevWdg
Definition: iodev.h:34
IODevWdg::UpdateData
virtual void UpdateData()
Definition: iodev.cpp:187
device.h
WDGLIB DeviceWdg class declaration file.
IODevWdg::UpdateOutputChannel
void UpdateOutputChannel(int index, QString channel, QString value)
Definition: iodev.cpp:257
IODevWdg::UpdateSubstate
void UpdateSubstate(int substate)
Definition: iodev.cpp:235
IODevWdg::SetEnable
virtual void SetEnable(bool flag)
Definition: iodev.cpp:298
fcf::devmgr::iodev::IODevConfig
sensor Configuration class
Definition: iodevConfig.hpp:145
Ui
Definition: mainwindow.hpp:7
iodevConfig.hpp
IODevConfig class header file.
IODevWdg::GetMessage
void GetMessage(std::shared_ptr<::elt::mal::Mal > mal, std::vector< std::shared_ptr<::fcfif::SetupElem >> &setup_buffer, bool ignoreChecked=false)
Definition: iodev.cpp:124
IODevWdg::UpdateInputChannel
void UpdateInputChannel(int index, QString channel, QString value)
Definition: iodev.cpp:249
IODevWdg::is_sensor
bool is_sensor
Definition: iodev.h:64
IODevWdg::GetDbAttributes
virtual void GetDbAttributes()
Definition: iodev.cpp:267
DeviceWdg
Definition: device.h:116