• Even the newest visual studio use /VERSION:major[.minor]  .  
    It means link.exe  /VERSION:1.0  just  need two version number .
    If Version = 1.0.0 , when visual studio  link the program , vs will produce link error:
    
    ```
    1>"/OUT:C:\Users\Lenovo\Desktop\libmodbus-master\src\win32\modbus.dll" "/VERSION:1.0.0" /INCREMENTAL:NO /NOLOGO ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG "/PDB:C:\Users\Lenovo\Desktop\libmodbus-master\src\win32\modbus.pdb" /MAP /SUBSYSTEM:CONSOLE /TLBID:1 "/IMPLIB:C:\Users\Lenovo\Desktop\libmodbus-master\src\win32\modbus.lib" /MACHINE:X86 /SAFESEH /DLL "C:\Users\Lenovo\Desktop\libmodbus-master\src\win32\/modbus.res"
    1>"Debug\modbus-data.obj"
    1>"Debug\modbus-rtu.obj"
    1>"Debug\modbus-tcp.obj"
    1>Debug\modbus.obj
    1>LINK : fatal error LNK1117: option“VERSION:1.0.0” grammatical error
    ```
    see: 
    https://docs.microsoft.com/en-us/cpp/build/reference/version-version-information?view=msvc-160
    along authored
     
    Browse Dir »








  • When compiling with gcc and option -Wconversion it fixes the
    warning message
    
      warning: conversion from ‘X’ {aka ‘x’} to ‘Y’ {aka ‘y’} may change value
    
    Signed-off-by: José Bollo <jose.bollo@iot.bzh>
    José Bollo authored
     
    Browse Dir »










  • According to the Modbus standard, the unit identifier is choosen by the
    TCP client and can be any value:
    
    "This field is used for intra-system routing purpose.  It is typically
    used to communicate to a MODBUS+ or a MODBUS serial line slave through a
    gateway between an Ethernet TCP-IP network and a MODBUS serial line.
    This field is set by the MODBUS Client in the request and must be returned
    with the same value in the response by the server."
    
    So the current check in modbus_reply must be extended to check whether
    we are in a RTU or TCP context.
    
    Also the unit-test has to be adjusted.
    
    Signed-off-by: Michael Heimpold <mhei@heimpold.de>
    Michael Heimpold authored
     
    Browse Dir »