CuteHMI - Modbus (CuteHMI.Modbus.2)
QtRTUServerBackend.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_INTERNAL_QTRTUSERVERBACKEND_HPP
2 #define H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_INTERNAL_QTRTUSERVERBACKEND_HPP
3 
4 #include "QtServerBackend.hpp"
5 #include "RTUServerConfig.hpp"
6 #include "QtRTUServer.hpp"
7 
8 namespace cutehmi {
9 namespace modbus {
10 namespace internal {
11 
15 class CUTEHMI_MODBUS_PRIVATE QtRTUServerBackend:
16  public QtServerBackend
17 {
18  Q_OBJECT
19 
20  public:
23  QtRTUServer::DiscreteInputDataContainer * discreteInputData,
24  QtRTUServer::HoldingRegisterDataContainer * holdingRegisterData,
25  QtRTUServer::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  RTUServerConfig * 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::QtRTUServer::DiscreteInputDataContainer
RegisterTraits< DiscreteInput >::Container DiscreteInputDataContainer
Definition: QtRTUServer.hpp:28
cutehmi::modbus::internal::QtRTUServer::CoilDataContainer
RegisterTraits< Coil >::Container CoilDataContainer
Definition: QtRTUServer.hpp:27
cutehmi::modbus::internal::QtRTUServerBackend
TCP server backend.
Definition: QtRTUServerBackend.hpp:15
cutehmi::modbus::internal::QtRTUServer::HoldingRegisterDataContainer
RegisterTraits< HoldingRegister >::Container HoldingRegisterDataContainer
Definition: QtRTUServer.hpp:29
cutehmi::MPtr< Members >
QObject
cutehmi::modbus::internal::QtServerBackend
Definition: QtServerBackend.hpp:16
cutehmi
cutehmi::modbus::internal::RTUServerConfig
Definition: RTUServerConfig.hpp:15
std::internal
T internal(T... args)
cutehmi::modbus::internal::QtRTUServer::InputRegisterDataContainer
RegisterTraits< InputRegister >::Container InputRegisterDataContainer
Definition: QtRTUServer.hpp:30