CuteHMI - Modbus (CuteHMI.Modbus.2)
CoilController.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_COILCONTROLLER_HPP
2 #define H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_COILCONTROLLER_HPP
3 
4 #include "internal/common.hpp"
5 #include "Register1Controller.hpp"
6 
7 #include <QObject>
8 
9 namespace cutehmi {
10 namespace modbus {
11 
12 class CUTEHMI_MODBUS_API CoilController:
13  public Register1Controller
14 {
15  Q_OBJECT
16 
17  public:
18  CoilController(QObject * parent = nullptr);
19 
20  protected:
21  Register1 * registerAt(quint16 address) const override;
22 
23  void requestReadRegisters(quint16 address, quint16 amount, QUuid * requestId) const override;
24 
25  void requestWriteRegister(quint16 address, bool value, QUuid * requestId) const override;
26 
27  AbstractDevice::Function readRegistersFunction() const override;
28 
29  AbstractDevice::Function writeRegisterFunction() const override;
30 };
31 
32 }
33 }
34 
35 #endif
36 
37 //(c)C: Copyright © 2019, Michał Policht <michal@policht.pl>. All rights reserved.
38 //(c)C: This file is a part of CuteHMI.
39 //(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.
40 //(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.
41 //(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::Register1Controller
Register controller for 1 bit registers.
Definition: Register1Controller.hpp:19
QUuid
cutehmi::modbus::Register1
Cached properties of 1 bit register.
Definition: Register1.hpp:14
cutehmi::modbus::CoilController
Definition: CoilController.hpp:12
QObject
cutehmi
cutehmi::modbus::AbstractDevice::Function
Function
Definition: AbstractDevice.hpp:51