Dynamic Modbus Master
A dynamic wrapper for the modbus master part of esp-modbus written in C++.
 
Loading...
Searching...
No Matches
dynamic_modbus_master Namespace Reference

Namespaces

namespace  slave
 

Classes

class  DynamicModbusMaster
 Modbus Master Controller. More...
 
struct  ModbusConfig
 Structure to represent the configuration of a Modbus connection. More...
 
class  ModbusErrorHelper
 

Concepts

concept  ModbusData
 Concept to check if a given Type T can be represented in modbus registers, constrains T to be at least 16-Bits or the size of a single modbus Register. The only exception being coil registers and discrete input registers, which are either directly represented as booleans or as 8 boolean values packed into 1 or more bytes.
 

Enumerations

enum class  ModbusError : uint8_t {
  OK = 0 ,
  INVALID_ARG = 1 ,
  INVALID_RESPONSE = 2 ,
  ADDRESS_UNAVAILABLE = 3 ,
  SLAVE_NOT_SUPPORTED = 4 ,
  PORT_NOT_SUPPORTED = 5 ,
  INVALID_STATE = 6 ,
  TIMEOUT = 7 ,
  FAILURE = 8 ,
  ILLEGAL_FUNCTION = 11 ,
  ILLEGAL_DATA_ADDRESS = 12 ,
  ILLEGAL_DATA_VALUE = 13 ,
  SLAVE_DEVICE_FAILURE = 14 ,
  ACKNOWLEDGE = 15 ,
  SLAVE_DEVICE_BUSY = 16 ,
  MEMORY_PARITY_ERROR = 18 ,
  GATEWAY_PATH_UNAVAILABLE = 20 ,
  GATEWAY_TARGET_NO_RESPONSE = 21
}
 Modbus Error Type Enum. More...
 

Functions

consteval mb_communication_info_t defaultCommInfo ()
 

Variables

constexpr char TAG [] = "DynamicModbusMaster"
 

Enumeration Type Documentation

◆ ModbusError

enum class dynamic_modbus_master::ModbusError : uint8_t
strong

Modbus Error Type Enum.

Enumerator
OK 

Indicates no error has occured.

INVALID_ARG 

A given Argument was invalid.

INVALID_RESPONSE 

The Slave Device Response was invalid.

ADDRESS_UNAVAILABLE 

This slave address is not available.

SLAVE_NOT_SUPPORTED 

The slave does not support this function.

PORT_NOT_SUPPORTED 

This Port is not supported.

INVALID_STATE 

The Modbus Driver or the Device is in an invalid state.

TIMEOUT 

The Driver experienced a timeout.

FAILURE 

The slave device experienced an undermined failure.

ILLEGAL_FUNCTION 

The received Function code is not available on the target device.

ILLEGAL_DATA_ADDRESS 

The Data Address received is not available.

ILLEGAL_DATA_VALUE 

The Data Value received is of an invalid length.

SLAVE_DEVICE_FAILURE 

An Unrecoverable Error occured while trying to perform the request.

ACKNOWLEDGE 

The Target accepted the Request but will take some time to complete it, this is returned to prevent a Timeout for complex requests.

SLAVE_DEVICE_BUSY 

The Target is currently busy executing a command, retransmit the command at a later time.

MEMORY_PARITY_ERROR 

The Extended File Area failed to pass a consistency check.

GATEWAY_PATH_UNAVAILABLE 

No Path was found between the Input and the Output Port of the Gateway, gateway is possibly misconfigured or overloaded.

GATEWAY_TARGET_NO_RESPONSE 

Gateway Target Device did not respond or does not exist.

Function Documentation

◆ defaultCommInfo()

consteval mb_communication_info_t dynamic_modbus_master::defaultCommInfo ( )

Variable Documentation

◆ TAG

constexpr char dynamic_modbus_master::TAG[] = "DynamicModbusMaster"
constexpr