![]()  | 
  
    rasProject_01   /  weSweetHome
    R. 102 2025-10-31
    
   process control        /     RasPi software         by   weinert-automation 
   | 
 
A 32 bit union. More...
#include <basicTyCo.h>
A 32 bit union.
This structure serves formatting and endianess plumbing purposes.
Some Modbus devices use two so called registers of the standard Modbus 16 bit size for one float. Some Modbus manufactures call such register a "parameter".
As Modbus has no data types except for the 16 bit register (with whatever semantic) libmodbus will handle the endianess for that two byte registers but can do nothing for bigger data types. Many modbus servers will use 32 bit and longer types. EASTRON smart meters handle all measurements as 32 bit floats and call that type "parameter". Hence 1 parameter is 2 registers in default big endian register ordering.
The union dualReg_t allows all endian repairs for such "parameter" type. The use of such unions for other purposes is not recommended.