CuteHMI - Modbus (CuteHMI.Modbus.2)
QtRTUClientBackend.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_INTERNAL_QTRTUCLIENTBACKEND_HPP
2 #define H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_INTERNAL_QTRTUCLIENTBACKEND_HPP
3 
4 #include "QtClientBackend.hpp"
5 #include "RTUClientConfig.hpp"
6 
7 namespace cutehmi {
8 namespace modbus {
9 namespace internal {
10 
14 class CUTEHMI_MODBUS_PRIVATE QtRTUClientBackend:
15  public QtClientBackend
16 {
17  Q_OBJECT
18 
19  public:
20  QtRTUClientBackend(RTUClientConfig * config, QObject * parent = nullptr);
21 
22  protected:
23  int slaveAddress() const override;
24 
25  void configureConnection() override;
26 
27  private:
28  struct Members
29  {
30  RTUClientConfig * config;
31 
32  Members(RTUClientConfig * p_config):
33  config(p_config)
34  {
35  }
36  };
37 
38  MPtr<Members> m;
39 };
40 
41 }
42 }
43 }
44 
45 #endif
46 
47 //(c)C: Copyright © 2019, Michał Policht <michal@policht.pl>. All rights reserved.
48 //(c)C: This file is a part of CuteHMI.
49 //(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.
50 //(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.
51 //(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/>.
cutehmi::MPtr< Members >
cutehmi::modbus::internal::RTUClientConfig
Definition: RTUClientConfig.hpp:16
cutehmi::modbus::internal::QtClientBackend
Definition: QtClientBackend.hpp:16
QObject
cutehmi
std::internal
T internal(T... args)
cutehmi::modbus::internal::QtRTUClientBackend
Modbus RTU client backend based on Qt Serial Bus.
Definition: QtRTUClientBackend.hpp:14