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
  • modbus.c
06 Jan, 2011
1 commit
  • Read/write were swapped in _FC_READ_AND_WRITE_REGISTERS. Closes GH-2. ...
    49d6f4a7
    Page 38 in the document Modbus_Application_Protocol_V1_1b.pdf:
    6.17 23 (0x17) Read/Write Multiple registers
    
    This function code performs a combination of one read operation
    and one write operation in a single MODBUS transaction. The write
    operation is performed before the read.
    
    The unit test has been updated.
    Stéphane Raimbault authored
    2011-01-06 21:46:31 +0100  
    Browse File »

08 Dec, 2010
2 commits
  • New function to reply to an indication with an exception message ...
    a4f7996e
    Contributed by Dominic Storey.
    - new function modbus_reply_exception
    - unit test
    Stéphane Raimbault authored
    2010-12-08 00:35:56 +0100  
    Browse File »
  • New error message in debug mode for wrong message length
    311137cf
    Stéphane Raimbault authored
    2010-12-08 00:02:28 +0100  
    Browse File »

06 Dec, 2010
2 commits
  • New function modbus_get_header_length(modbus_t *ctx) ...
    932769d8
    - new public function
    - change unit-test-server.c to be transport layer independant (query
      and header_length)
    Stéphane Raimbault authored
    2010-12-06 08:55:15 +0100  
    Browse File »
  • MAJOR Rewrite of the message reading ...
    87293e45
    The goal of this rewriting is to avoid the timeouts on the receiving
    of exceptions and to be more robust on bad requests. Some devices
    use the exception MODBUS_EXCEPTION_ACKNOWLEDGE to response to some
    valid requests, so in this case, you'll really appreciate this
    change!
    
    - Slower! More system calls are used.
    - The code is cleaner and easier to understand.
    - Really faster when an exception occurs.
    - Fix unit test of bad request in RTU
    Stéphane Raimbault authored
    2010-12-06 08:08:38 +0100  
    Browse File »

05 Dec, 2010
2 commits
  • Fix warning about '/*' in comment
    c1c119ae
    Stéphane Raimbault authored
    2010-12-05 01:13:15 +0100  
    Browse File »
  • Fix unit test of report slave ID in RTU
    614ff1dc
    Stéphane Raimbault authored
    2010-12-05 00:02:29 +0100  
    Browse File »

24 Nov, 2010
1 commit
  • Remove inclusion of config.h in modbus.h. Closes GH-3. ...
    e3f2c133
    Reported by Ivan Giuliani <giuliani.v@gmail.com>
    It was not possible to use libmodbus outside of projects without
    config.h file.
    
    The inclusion has been removed from the public header.
    
    Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
    Stéphane Raimbault authored
    2010-11-24 16:40:21 +0100  
    Browse File »

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 File »

29 Oct, 2010
1 commit
  • 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 File »

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 File »
  • 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 File »

05 Oct, 2010
1 commit
  • 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 File »

04 Oct, 2010
5 commits
  • 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 File »
  • 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 File »
  • 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 File »
  • 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 File »
  • 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 File »

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 File »
  • 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 File »

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 File »

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 File »

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 File »
  • 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 File »
  • 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 File »
  • Fix test on illegal address in read and write function
    6e06eb7d
    Stéphane Raimbault authored
    2010-08-10 08:44:03 +0200  
    Browse File »
  • New read and write registers function
    9a2733e7
    Hannu Vuolasaho authored
    2010-08-10 08:39:54 +0200  
    Browse File »
  • Replace MODBUS_MAX_* by MODBUS_MAX_[READ|WRITE]_*
    a2e16a16
    Hannu Vuolasaho authored
    2010-08-10 08:26:47 +0200  
    Browse File »

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 File »

29 Jul, 2010
3 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 File »
  • Add missing invalid function exception
    a0b12254
    Stéphane Raimbault authored
    2010-07-29 10:34:09 +0200  
    Browse File »
  • OpenBSD support by Anibal Limón
    811d1349
    Stéphane Raimbault authored
    2010-07-29 10:00:46 +0200  
    Browse File »

28 Jul, 2010
1 commit
  • Add a missing space in a verbose message
    d613a640
    Stéphane Raimbault authored
    2010-07-28 09:50:15 +0200  
    Browse File »

23 Jul, 2010
3 commits
  • Implement report slave ID on server side ...
    4d3bf7be
    - return only useful data client side
    - available in TCP when a gateway to RTU is used
    - need to add isolated handling of indication/confirmation messages
    Stéphane Raimbault authored
    2010-07-23 00:27:49 +0200  
    Browse File »
  • Comments, naming and minor
    86418cf3
    Stéphane Raimbault authored
    2010-07-23 00:27:49 +0200  
    Browse File »
  • Major - Oh Gosh, it's brand new API! ...
    754235c2
    - more coherent
    - namespace
    - opaque and smaller context
    - usual wording
    Stéphane Raimbault authored
    2010-07-23 00:27:46 +0200  
    Browse File »

19 Jul, 2010
3 commits
  • Change indent level from 8 to 4
    66c59d6f
    Stéphane Raimbault authored
    2010-07-19 08:44:57 +0200  
    Browse File »
  • Parity setting is now a single char ('N', 'E' or 'O')
    807c20f0
    Stéphane Raimbault authored
    2010-07-19 08:29:15 +0200  
    Browse File »
  • Fix #591142 - Slave id check should be disabled in TCP connection ...
    2b985f81
    A new API will be committed to remove the slave in TCP communication.
    Stéphane Raimbault authored
    2010-07-19 08:29:12 +0200  
    Browse File »

07 Jul, 2010
1 commit
  • Fix #463299 - New functions to get/set timeouts of begin and end of trame ...
    d8f25477
    Original patch by Sisyph (eric-paul).
    Stéphane Raimbault authored
    2010-07-07 14:52:05 +0200  
    Browse File »