1 =============================================
2 Migration notes from the 2.0 series (for 3.0)
3 =============================================
5 The 3.0 release use a brand new API and this document covers only the general
8 - the structure modbus_param_t is gone and is replaced by a new opaque and
9 dynamically allocated structure modbus_t.
11 - the slave argument is no more an argument of the Modbus functions, you need to
12 call modbus_set_slave first.
14 - the public header file is smaller so some internal defines aren't accessible
17 - all function and constants are respectively prefixed by modbus_ or MODBUS_.
19 - the POSIX error conventions are used (if an error occured, -1 or NULL is
20 returned and errno is set accordingly).
22 - coil status and discretes inputs are just bits and force/preset actions have
23 been renamed to write actions.
25 We hope you'll enjoy the new API to accept the migration burden!
27 =============================================
28 Migration notes from the 1.2 series (for 2.0)
29 =============================================
34 modbus_init_tcp requires a third new argument, the port number.
36 modbus_init_tcp(modbus_param_t *mb_param, char *ip_address, int port)
38 Set the port to MODBUS_TCP_DEFAULT_PORT to use the default one
39 (502). It's convenient to use a port number greater than or equal to
40 1024 because it's not necessary to be root to use this port number.
46 The coil and input status are now stored in an array of type uint8_t
47 (in 1.2.X series, array of type int was used). So now, you need to
48 pass a pointer of type uint8_t to use read_coil_status(), for example.
50 The holding and input registers are now stored in an array of type
53 These changes reduce the memory consumption.