-
- move termios header in RTU backend - move TCP headers in TCP backend - use native serial on Win32 for Cygwin - avoid too many defines
-
This change fixes a compilation problem in MinGW. As general rule, each header must be as independent as possible.
-
I prefer to remove the check rather than to add the solution used by Wine as we don't care about the associated define: AC_CHECK_HEADERS([ \ ... netinet/ip.h \ netinet/tcp.h \ ... ],,,[ #ifdef HAVE_NETINET_IP_H # include <netinet/ip.h> #endif ]) -
This change is asked by Barry Grumbine to fix build on OpenBSD
-
Rename the function _modbus_tcp_init to _modbus_tcp_init_win32 and warp the call with #ifdef.
-
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>
-
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>
-
Reported by Viet Nguyen Quoc.
-
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>
-
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>
-
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>
-
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>
-
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>
-
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>
-
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>
-
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>
-
All private functions and constants are now prefixed by _. The modbus protocol uses entry points to call specific functions.
-
The cycle will end on a 3.0 release instead of 2.2 as intended. There are too many changes in the API to keep the same major number.
-
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>