supla-device
Loading...
Searching...
No Matches
src
supla
modbus
modbus_device_handler.h
1
// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2
// SPDX-License-Identifier: GPL-2.0-or-later
3
4
#ifndef SRC_SUPLA_MODBUS_MODBUS_DEVICE_HANDLER_H_
5
#define SRC_SUPLA_MODBUS_MODBUS_DEVICE_HANDLER_H_
6
7
#include "modbus_client_handler.h"
8
9
#define EM_REGISTER_BLOCK_MAX_SIZE (30)
10
11
class
SuplaDeviceClass
;
12
13
namespace
Supla {
14
15
class
ModbusDeviceHandler
:
public
ModbusClientHandler
{
16
public
:
17
explicit
ModbusDeviceHandler
(uint16_t offset = 0);
18
19
Supla::Modbus::Result holdingProcessRequest(uint16_t address,
20
uint16_t nRegs,
21
uint8_t *regBuffer,
22
Supla::Modbus::Access access)
override
;
23
24
bool
isHoldingSupported()
override
;
25
bool
isInputSupported()
override
;
26
private
:
27
int
fillRegBuffer(uint8_t *regBuffer,
28
char
*input,
29
int
*reg,
30
int
regOffset,
31
int
nRegs,
32
int
fieldSize);
33
};
34
35
}
// namespace Supla
36
37
#endif
// SRC_SUPLA_MODBUS_MODBUS_DEVICE_HANDLER_H_
SuplaDeviceClass
Definition
SuplaDevice.h:167
Supla::ModbusClientHandler
Definition
modbus_client_handler.h:25
Supla::ModbusDeviceHandler
Definition
modbus_device_handler.h:15
Generated by
1.12.0