CuteHMI - Modbus (CuteHMI.Modbus.2)
QtTCPServerBackend.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_INTERNAL_QTTCPSERVERBACKEND_HPP
2 #define H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_INTERNAL_QTTCPSERVERBACKEND_HPP
3 
4 #include "QtServerBackend.hpp"
5 #include "TCPServerConfig.hpp"
6 #include "QtTCPServer.hpp"
7 
8 namespace cutehmi {
9 namespace modbus {
10 namespace internal {
11 
15 class CUTEHMI_MODBUS_PRIVATE QtTCPServerBackend:
16  public QtServerBackend
17 {
18  Q_OBJECT
19 
20  public:
23  QtTCPServer::DiscreteInputDataContainer * discreteInputData,
24  QtTCPServer::HoldingRegisterDataContainer * holdingRegisterData,
25  QtTCPServer::InputRegisterDataContainer * inputRegisterData,
26  QObject * parent = nullptr);
27 
28  protected:
29  int slaveId() const override;
30 
31  void configureConnection() override;
32 
33  private:
34  struct Members
35  {
36  TCPServerConfig * config;
37  };
38 
39  MPtr<Members> m;
40 };
41 
42 }
43 }
44 }
45 
46 #endif
47 
48 //(c)C: Copyright © 2019, Michał Policht <michal@policht.pl>. All rights reserved.
49 //(c)C: This file is a part of CuteHMI.
50 //(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.
51 //(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.
52 //(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::TCPServerConfig
Definition: TCPServerConfig.hpp:14
cutehmi::modbus::internal::QtTCPServer::HoldingRegisterDataContainer
RegisterTraits< HoldingRegister >::Container HoldingRegisterDataContainer
Definition: QtTCPServer.hpp:29
cutehmi::modbus::internal::QtTCPServerBackend
TCP server backend.
Definition: QtTCPServerBackend.hpp:15
cutehmi::MPtr< Members >
cutehmi::modbus::internal::QtTCPServer::CoilDataContainer
RegisterTraits< Coil >::Container CoilDataContainer
Definition: QtTCPServer.hpp:27
QObject
cutehmi::modbus::internal::QtServerBackend
Definition: QtServerBackend.hpp:16
cutehmi
cutehmi::modbus::internal::QtTCPServer::InputRegisterDataContainer
RegisterTraits< InputRegister >::Container InputRegisterDataContainer
Definition: QtTCPServer.hpp:30
std::internal
T internal(T... args)
cutehmi::modbus::internal::QtTCPServer::DiscreteInputDataContainer
RegisterTraits< DiscreteInput >::Container DiscreteInputDataContainer
Definition: QtTCPServer.hpp:28