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

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. More...

#include <ModbusData.hpp>

Concept definition

template<typename T>
(std::is_same_v<T, uint8_t>) || (std::is_same_v<T, bool>) ||
((sizeof(T) % sizeof(uint16_t) == 0) && (sizeof(T) > 0))
Concept to check if a given Type T can be represented in modbus registers, constrains T to be at leas...
Definition ModbusData.hpp:41

Detailed Description

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.

\begin{eqnarray*}
sizeof(T) \geq sizeof(\text{Modbus Register})
\end{eqnarray*}

Template Parameters
TThe type to check.