CuteHMI - Modbus (CuteHMI.Modbus.2)
Register16.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_REGISTER16_HPP
2 #define H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_REGISTER16_HPP
3 
4 #include "internal/common.hpp"
5 
6 #include <QAtomicInteger>
7 
8 namespace cutehmi {
9 namespace modbus {
10 
14 class CUTEHMI_MODBUS_API Register16
15 {
16  public:
21  explicit Register16(quint16 value = 0);
22 
23  quint16 value() const;
24 
25  void rest();
26 
27  void awake();
28 
29  bool wakeful() const;
30 
31  protected:
32  void setValue(quint16 value);
33 
34  private:
35  struct Members
36  {
38  QAtomicInt awaken;
39  };
40 
41  MPtr<Members> m;
42 };
43 
44 }
45 }
46 
47 #endif
48 
49 //(c)C: Copyright © 2019, Michał Policht <michal@policht.pl>. All rights reserved.
50 //(c)C: This file is a part of CuteHMI.
51 //(c)C: CuteHMI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
52 //(c)C: CuteHMI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
53 //(c)C: You should have received a copy of the GNU Lesser General Public License along with CuteHMI. If not, see <https://www.gnu.org/licenses/>.
QAtomicInteger< quint16 >
cutehmi::MPtr< Members >
cutehmi
QAtomicInt
cutehmi::modbus::Register16
Cached properties of 16 bit register.
Definition: Register16.hpp:14