CuteHMI - Modbus (CuteHMI.Modbus.2)
QtTCPClientBackend.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_INTERNAL_QTTCPCLIENTBACKEND_HPP
2 #define H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_INTERNAL_QTTCPCLIENTBACKEND_HPP
3 
4 #include "QtClientBackend.hpp"
5 #include "TCPClientConfig.hpp"
6 
7 #include <QUuid>
8 
9 namespace cutehmi {
10 namespace modbus {
11 namespace internal {
12 
16 class CUTEHMI_MODBUS_PRIVATE QtTCPClientBackend:
17  public QtClientBackend
18 {
19  Q_OBJECT
20 
21  public:
22  QtTCPClientBackend(TCPClientConfig * config, QObject * parent = nullptr);
23 
24  protected:
25  int slaveAddress() const override;
26 
27  void configureConnection() override;
28 
29  private:
30  struct Members
31  {
32  TCPClientConfig * config;
33 
34  Members(TCPClientConfig * p_config):
35  config(p_config)
36  {
37  }
38  };
39 
40  MPtr<Members> m;
41 };
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/>.
cutehmi::modbus::internal::QtTCPClientBackend
Modbus TCP client backend based on Qt Serial Bus.
Definition: QtTCPClientBackend.hpp:16
cutehmi::MPtr< Members >
cutehmi::modbus::internal::QtClientBackend
Definition: QtClientBackend.hpp:16
QObject
cutehmi
std::internal
T internal(T... args)
cutehmi::modbus::internal::TCPClientConfig
Definition: TCPClientConfig.hpp:14