Dynamic Modbus Master
A dynamic wrapper for the modbus master part of esp-modbus written in C++.
 
Loading...
Searching...
No Matches
ModbusError.h
Go to the documentation of this file.
1//Copyright (c) 2024 Dominik M. Glogowski
2//
3//Permission is hereby granted, free of charge, to any person obtaining a copy
4//of this software and associated documentation files (the "Software"), to deal
5//in the Software without restriction, including without limitation the rights
6//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7//copies of the Software, and to permit persons to whom the Software is
8//furnished to do so, subject to the following conditions:
9//
10//The above copyright notice and this permission notice shall be included in all
11//copies or substantial portions of the Software.
12//
13//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19//SOFTWARE.
20
21#ifndef DYNAMIC_MODBUS_MASTER_MODBUSERROR_H
22#define DYNAMIC_MODBUS_MASTER_MODBUSERROR_H
23
24#include <cinttypes>
25
26namespace dynamic_modbus_master {
30enum class ModbusError : uint8_t {
31 OK = 0,
32 INVALID_ARG = 1,
37 INVALID_STATE = 6,
38 TIMEOUT = 7,
39 FAILURE = 8,
40 // General Exception Codes
41 ILLEGAL_FUNCTION = 11,
45 ACKNOWLEDGE = 15,
48
49 //
52};
53}
54
55#endif //DYNAMIC_MODBUS_MASTER_MODBUSERROR_H
Definition DynamicModbusMaster.cpp:26
ModbusError
Modbus Error Type Enum.
Definition ModbusError.h:30
@ TIMEOUT
The Driver experienced a timeout.
@ ADDRESS_UNAVAILABLE
This slave address is not available.
@ MEMORY_PARITY_ERROR
The Extended File Area failed to pass a consistency check.
@ ACKNOWLEDGE
The Target accepted the Request but will take some time to complete it, this is returned to prevent a...
@ ILLEGAL_DATA_VALUE
The Data Value received is of an invalid length.
@ GATEWAY_PATH_UNAVAILABLE
No Path was found between the Input and the Output Port of the Gateway, gateway is possibly misconfig...
@ FAILURE
The slave device experienced an undermined failure.
@ INVALID_RESPONSE
The Slave Device Response was invalid.
@ SLAVE_NOT_SUPPORTED
The slave does not support this function.
@ INVALID_STATE
The Modbus Driver or the Device is in an invalid state.
@ INVALID_ARG
A given Argument was invalid.
@ SLAVE_DEVICE_BUSY
The Target is currently busy executing a command, retransmit the command at a later time.
@ ILLEGAL_DATA_ADDRESS
The Data Address received is not available.
@ SLAVE_DEVICE_FAILURE
An Unrecoverable Error occured while trying to perform the request.
@ ILLEGAL_FUNCTION
The received Function code is not available on the target device.
@ OK
Indicates no error has occured.
@ GATEWAY_TARGET_NO_RESPONSE
Gateway Target Device did not respond or does not exist.
@ PORT_NOT_SUPPORTED
This Port is not supported.