Logo white

Peter M. Groen / libmodbus

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • Commits 855
  • Compare
  • Branches 1
  • Tags 0
  • libmodbus
  • src
03 Nov, 2010
1 commit
  • Rename modbus_[listen|accept] to modbus_tcp_[listen|accept] ...
    b8c0558c
    These functions have no meaning in RTU so it's better to specialize
    the names and remove them from the backend.
    
    - remove the functions from the backend
    - update tests to handle RTU mode (master and slave)
    - add command line options to tests (rtu or tcp)
    Stéphane Raimbault authored
    2010-11-03 08:07:56 +0100  
    Browse Dir »

02 Nov, 2010
1 commit
  • Fix to allow the setting of the broadcast address
    ddbd7266
    Stéphane Raimbault authored
    2010-11-02 21:56:00 +0100  
    Browse Dir »

29 Oct, 2010
2 commits
  • Add strlcpy if not available to enhance copy of device string ...
    4ac3cc37
    - check strlcpy in configure.ac
    - test for empty device string
    - test truncated device string
    Stéphane Raimbault authored
    2010-10-29 21:30:27 +0200  
    Browse Dir »
  • Fix memory leak when the given parity is invalid
    3707d37f
    Stéphane Raimbault authored
    2010-10-29 21:29:15 +0200  
    Browse Dir »

28 Oct, 2010
2 commits
  • Initialize socket to -1 to avoid write on standard output ...
    4abb5487
    When unitialized the socket can be 0 and write calls success.
    Stéphane Raimbault authored
    2010-10-28 19:06:50 +0200  
    Browse Dir »
  • Remove the slave ID argument of modbus_new_rtu() ...
    525aadb2
    modbus_set_slave must be used to set the slave ID of the remote
    device to talk in master mode and to set the internal slave ID in
    slave mode.
    
    If you talk to several devices, you need to call modbus_set_slave
    each time the following requests must be sent to another device.
    Stéphane Raimbault authored
    2010-10-28 19:06:42 +0200  
    Browse Dir »

27 Oct, 2010
1 commit
  • Isolate RTU and TCP headers and simplify Win32 detection ...
    f410aea2
    - move termios header in RTU backend
    - move TCP headers in TCP backend
    - use native serial on Win32 for Cygwin
    - avoid too many defines
    Stéphane Raimbault authored
    2010-10-27 01:11:39 +0200  
    Browse Dir »

08 Oct, 2010
1 commit
  • Avoid constraints in header ordering ...
    50fa79da
    This change fixes a compilation problem in MinGW. As general rule,
    each header must be as independent as possible.
    Stéphane Raimbault authored
    2010-10-08 16:26:56 +0200  
    Browse Dir »

07 Oct, 2010
2 commits
  • Tiny coding conventions
    6e1e4e58
    Stéphane Raimbault authored
    2010-10-07 02:10:55 +0200  
    Browse Dir »
  • Fix clang warnings about implicit declaration
    49b2208d
    Stéphane Raimbault authored
    2010-10-07 02:10:09 +0200  
    Browse Dir »

06 Oct, 2010
3 commits
  • Add missing return when the init of Win32 Socket API fails
    5d787302
    Stéphane Raimbault authored
    2010-10-06 09:00:33 +0200  
    Browse Dir »
  • Avoid empy function call on non-win32 platforms ...
    dc26ddd7
    Rename the function _modbus_tcp_init to _modbus_tcp_init_win32 and
    warp the call with #ifdef.
    Stéphane Raimbault authored
    2010-10-06 08:57:48 +0200  
    Browse Dir »
  • Initialise Win32 Socket API in _modbus_tcp_connect/_modbus_tcp_listen ...
    7717e6c4
    Before using any functions of the Win32 Socket API we first have to
    initialise it by calling WSAStartup(). Fixes non-working tests on native
    Win32.
    
    Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
    Tobias Doerffel authored
    2010-10-06 08:48:19 +0200  
    Browse Dir »

05 Oct, 2010
2 commits
  • Allow building Win32 using autotools infrastructure ...
    01127e3c
    Some small modifications were neccessary to make libmodbus build using
    a MinGW (cross-)compiler. Libtool is now configured to build DLL files
    on Win32. The wsock32 library has been added to the list of libraries
    to link against.
    
    Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
    Tobias Doerffel authored
    2010-10-05 15:36:14 +0200  
    Browse Dir »
  • Fix free() calls ordering in modbus_mapping_new ...
    04cde66b
    Reported by Viet Nguyen Quoc.
    Stéphane Raimbault authored
    2010-10-05 12:21:25 +0200  
    Browse Dir »

04 Oct, 2010
9 commits
  • Coding conventions on newly added win32 code
    5db0c344
    Stéphane Raimbault authored
    2010-10-04 14:46:43 +0200  
    Browse Dir »
  • Added support for native Win32 ...
    e2f59e9e
    Added support for native Win32 based on
    https://code.launchpad.net/~thepyper/libmodbus/win32-native
    This mainly affects the RTU implementation as the TCP/IP socket
    interface is the same thanks to the winsocks library. The interface
    for using the serial port is completely different on Win32 and is now
    implemented accordingly.
    
    Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
    Tobias Doerffel authored
    2010-10-04 14:28:25 +0200  
    Browse Dir »
  • Introduced select() operation for backends ...
    31577bbb
    Introduced the select() operation for backends as the WAIT_DATA macro
    approach is not very extensible and causes trouble when adding platform-
    specific codepaths.
    
    Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
    Tobias Doerffel authored
    2010-10-04 14:28:25 +0200  
    Browse Dir »
  • Fix compiler warning on Win32 when calling send()/recv() ...
    2f0b8355
    On Win32 the second argument to recv() and send() is not a void pointer
    but a char pointer, therefore cast the buffer from uint8_t to char.
    
    Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
    Tobias Doerffel authored
    2010-10-04 14:28:25 +0200  
    Browse Dir »
  • Removed duplicate header inclusions ...
    3f10ef1d
    There are several header files that are already included in modbus.h
    and thus do not have to be included in the C files.
    
    Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
    Tobias Doerffel authored
    2010-10-04 14:28:25 +0200  
    Browse Dir »
  • Pass complete modbus_t structure to send()/recv() of the backends ...
    057be70d
    The send() and recv() functions of the backends might require more
    information than just a file descriptor, therefore pass the complete
    modbus_t structure.
    
    Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
    Tobias Doerffel authored
    2010-10-04 14:28:25 +0200  
    Browse Dir »
  • Fixed return value in modbus_flush() ...
    01ba9771
    In modbus_flush() we should return the return value of the backend's
    flush() function.
    
    Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
    Tobias Doerffel authored
    2010-10-04 14:28:25 +0200  
    Browse Dir »
  • Make error_print() globally accessible ...
    70a14990
    Renamed error_print() to _error_print() in order to indicate it's a
    private method and make it globally accessible so functions in
    modbus-rtu.c and modbus-tcp.c can make use of it as well.
    
    Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
    Tobias Doerffel authored
    2010-10-04 14:28:24 +0200  
    Browse Dir »
  • Place MODBUS_END_DECLS after including backend header files ...
    72de18bc
    All declarations in modbus-rtu.h and modbus-tcp.h should be inside
    MODBUS_BEGIN_DECLS and MODBUS_END_DECLS in order to make that functions
    properly accessible in C++ files.
    
    Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
    Tobias Doerffel authored
    2010-10-04 14:28:24 +0200  
    Browse Dir »

03 Oct, 2010
1 commit
  • Fix use of undefined backend in RTU
    788d7bb2
    Stéphane Raimbault authored
    2010-10-03 01:18:40 +0200  
    Browse Dir »

28 Sep, 2010
2 commits
  • Check the received function code on the client side
    f0b67888
    Stéphane Raimbault authored
    2010-09-28 23:39:51 +0200  
    Browse Dir »
  • MAJOR Split RTU and TCP code in two backends ...
    815d11f0
    All private functions and constants are now prefixed by _.
    The modbus protocol uses entry points to call specific functions.
    Stéphane Raimbault authored
    2010-09-28 23:39:51 +0200  
    Browse Dir »

13 Aug, 2010
1 commit
  • Fix swapped test in compute_header_length (1d4241dff)
    ef3e8740
    Stéphane Raimbault authored
    2010-08-13 13:02:48 +0200  
    Browse Dir »

11 Aug, 2010
1 commit
  • Make modbus.h more self contained ...
    2e9da98c
    If <sys/time.h> is not included before "modbus.h" as struct timeval
    is not declared. This behavior was observed while building libmodbus
    for QNX.
    
    Signed-off-by: Matthias Weisser <weisserm@arcor.de>
    Matthias Weisser authored
    2010-08-11 11:42:02 +0200  
    Browse Dir »

10 Aug, 2010
6 commits
  • Detect abnormal use of compute_header_length and fix comment
    1d4241df
    Stéphane Raimbault authored
    2010-08-10 10:15:43 +0200  
    Browse Dir »
  • Test return code of receive_msg_req to have an explicit error path
    70a2e6e6
    Stéphane Raimbault authored
    2010-08-10 08:59:11 +0200  
    Browse Dir »
  • Rename to modbus_read_and_write_registers to follow the new API
    bf763c96
    Stéphane Raimbault authored
    2010-08-10 08:51:26 +0200  
    Browse Dir »
  • Fix test on illegal address in read and write function
    6e06eb7d
    Stéphane Raimbault authored
    2010-08-10 08:44:03 +0200  
    Browse Dir »
  • New read and write registers function
    9a2733e7
    Hannu Vuolasaho authored
    2010-08-10 08:39:54 +0200  
    Browse Dir »
  • Replace MODBUS_MAX_* by MODBUS_MAX_[READ|WRITE]_*
    a2e16a16
    Hannu Vuolasaho authored
    2010-08-10 08:26:47 +0200  
    Browse Dir »

09 Aug, 2010
1 commit
  • Avoid duplicated code to compute the header_length
    f33e5b9f
    Stéphane Raimbault authored
    2010-08-09 18:14:27 +0200  
    Browse Dir »

04 Aug, 2010
2 commits
  • Add modbus-version.h.in ...
    0a671c23
    - partial revert of 93ce13656103cbb459ebd630d055a008dbb059f3
    - it was a bit confusing to always edit modbus.h.in
    - the header inclusion still unchanged (<modbus.h>)
    Stéphane Raimbault authored
    2010-08-04 23:02:21 +0200  
    Browse Dir »
  • Add AM_LDFLAGS to LDFLAGS
    fb1abdbc
    Stéphane Raimbault authored
    2010-08-04 22:19:46 +0200  
    Browse Dir »

29 Jul, 2010
2 commits
  • Allow 0 size in mapping allocation ...
    e7d499b6
    Idea suggested by Hannu Vuolasaho
    Stéphane Raimbault authored
    2010-07-29 11:04:18 +0200  
    Browse Dir »
  • Add missing invalid function exception
    a0b12254
    Stéphane Raimbault authored
    2010-07-29 10:34:09 +0200  
    Browse Dir »