CuteHMI - Modbus (CuteHMI.Modbus.2)
IterableTasks.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_INTERNAL_ITERABLETASKS_HPP
2 #define H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_INTERNAL_ITERABLETASKS_HPP
3 
4 #include "common.hpp"
5 #include "RegisterTraits.hpp"
6 
7 #include <cutehmi/NonCopyable.hpp>
8 
9 namespace cutehmi {
10 namespace modbus {
11 
12 class AbstractDevice;
13 
14 namespace internal {
15 
16 class CUTEHMI_MODBUS_PRIVATE IterableTasks:
18 {
19  public:
24 
25  virtual ~IterableTasks() = default;
26 
31  virtual bool runNext() = 0;
32 
36  virtual void reset() = 0;
37 
38  const CoilDataContainer & coilData(const AbstractDevice * device) const;
39 
40  const DiscreteInputDataContainer & discreteInputData(const AbstractDevice * device) const;
41 
42  const HoldingRegisterDataContainer & holdingRegisterData(const AbstractDevice * device) const;
43 
44  const InputRegisterDataContainer & inputRegisterData(const AbstractDevice * device) const;
45 };
46 
47 }
48 }
49 }
50 
51 #endif
52 
53 //(c)C: Copyright © 2019, Michał Policht <michal@policht.pl>. All rights reserved.
54 //(c)C: This file is a part of CuteHMI.
55 //(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.
56 //(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.
57 //(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::IterableTasks::InputRegisterDataContainer
RegisterTraits< InputRegister >::Container InputRegisterDataContainer
Definition: IterableTasks.hpp:23
cutehmi::modbus::AbstractDevice
Abstract Modbus device.
Definition: AbstractDevice.hpp:32
cutehmi::modbus::internal::RegisterTraits
Definition: RegisterTraits.hpp:15
cutehmi::modbus::internal::IterableTasks
Definition: IterableTasks.hpp:16
cutehmi::modbus::internal::IterableTasks::CoilDataContainer
RegisterTraits< Coil >::Container CoilDataContainer
Definition: IterableTasks.hpp:20
cutehmi
cutehmi::NonCopyable
std::internal
T internal(T... args)
cutehmi::modbus::internal::IterableTasks::HoldingRegisterDataContainer
RegisterTraits< HoldingRegister >::Container HoldingRegisterDataContainer
Definition: IterableTasks.hpp:22
cutehmi::modbus::internal::IterableTasks::DiscreteInputDataContainer
RegisterTraits< DiscreteInput >::Container DiscreteInputDataContainer
Definition: IterableTasks.hpp:21