• According to the Modbus specification
    (http://www.modbus.org/docs/Modbus_over_serial_line_V1_02.pdf, section 2.1)
    a Modbus RTU master can send a broadcast to all of it's slaves. This
    broadcasts can only be write requests as otherwise collisions could
    occur, eg. on a RS-485 bus.
    
    When receiving such a broadcast, the slave should process the request as
    usual, but must not reply anything, neither a normal response nor an
    exception reply in case of an error.
    
    Adjust the unit test for this case, too.
    
    Signed-off-by: Michael Heimpold <mhei@heimpold.de>
    Michael Heimpold authored
     
    Browse File »
  • This patch has been developed by Andrey Skvortsov, Michael Heimpold
    and Stéphane Raimbault.
    
    - avoid bash'isms and use of GNU find
    - terminate server after test run (ignored in TCP mode)
    - add *.log, *.trs to .gitignore
    - unit-test-client returns 0 on success
    - save exit code of unit-test-client for make check status
    - replace kill by killall
    - add entry in README
    Andrey Skvortsov authored
     
    Browse File »

  • This replaces the lengthy license text headers with a short
    and standardized license tag. See http://spdx.org for details.
    
    This is useful e.g. for license compliance tools which scan
    through files and generate a report of the licenses used
    in a project.
    
    Signed-off-by: Michael Heimpold <mhei@heimpold.de>
    Michael Heimpold authored
     
    Browse File »


  • This fixes the message
    "error: 'for' loop initial declarations are only allowed in C99 mode",
    spotted during cross-compiling of libmodbus.
    
    The compiler (gcc) actually does support -std=c99 but it gets not
    enabled by default. So a solution would be to enforce c99 mode
    via CFLAGS, but this will knock out all compilers which do not
    support this mode.
    Moving the declaration out of the loop initialisation, seems to be
    the simpler solution.
    
    Signed-off-by: Michael Heimpold <mhei@heimpold.de>
    Michael Heimpold authored
     
    Browse File »























  • The two modes are complementary, MODBUS_ERROR_RECOVERY_LINK handles
    errors at data link level (bad file descriptor, timeout, etc) and
    MODBUS_ERROR_RECOVERY_PROTOCOL checks Modbus error (eg. invalid
    function code or trame length).
    
    This change introduces the use of the Sleep function for Windows.
    Some duplicated code has been moved from backends to modbus core.
    A new debug message is now available when a flush occurs.
    
    The unit tests are now based on this error recovery code.
    Stéphane Raimbault authored
     
    Browse File »