Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 54 lines (35 sloc) 1.78 kb
cdc536c @stephane The slave only listen when concerned (slave ID or broadcast)
authored
1 =============================================
7e67373 @stephane Minor change about version to MIGRATION
authored
2 Migration notes from the 2.0 series (for 3.0)
cdc536c @stephane The slave only listen when concerned (slave ID or broadcast)
authored
3 =============================================
c7a6ffb @stephane New slave able to manage many connections on uniprocessor architecture
authored
4
7e67373 @stephane Minor change about version to MIGRATION
authored
5 The 3.0 release use a brand new API and this document covers only the general
754235c @stephane Major - Oh Gosh, it's brand new API!
authored
6 changes:
cdc536c @stephane The slave only listen when concerned (slave ID or broadcast)
authored
7
754235c @stephane Major - Oh Gosh, it's brand new API!
authored
8 - the structure modbus_param_t is gone and is replaced by a new opaque and
9 dynamically allocated structure modbus_t.
c7a6ffb @stephane New slave able to manage many connections on uniprocessor architecture
authored
10
754235c @stephane Major - Oh Gosh, it's brand new API!
authored
11 - the slave argument is no more an argument of the Modbus functions, you need to
12 call modbus_set_slave first.
c7a6ffb @stephane New slave able to manage many connections on uniprocessor architecture
authored
13
754235c @stephane Major - Oh Gosh, it's brand new API!
authored
14 - the public header file is smaller so some internal defines aren't accessible
15 anymore.
c7a6ffb @stephane New slave able to manage many connections on uniprocessor architecture
authored
16
754235c @stephane Major - Oh Gosh, it's brand new API!
authored
17 - all function and constants are respectively prefixed by modbus_ or MODBUS_.
c7a6ffb @stephane New slave able to manage many connections on uniprocessor architecture
authored
18
754235c @stephane Major - Oh Gosh, it's brand new API!
authored
19 - the POSIX error conventions are used (if an error occured, -1 or NULL is
20 returned and errno is set accordingly).
c7a6ffb @stephane New slave able to manage many connections on uniprocessor architecture
authored
21
754235c @stephane Major - Oh Gosh, it's brand new API!
authored
22 - coil status and discretes inputs are just bits and force/preset actions have
23 been renamed to write actions.
c7a6ffb @stephane New slave able to manage many connections on uniprocessor architecture
authored
24
754235c @stephane Major - Oh Gosh, it's brand new API!
authored
25 We hope you'll enjoy the new API to accept the migration burden!
51500e9 @stephane Incremente the values of HEADER_LENGTH_[RTU|TCP] defines
authored
26
cdc536c @stephane The slave only listen when concerned (slave ID or broadcast)
authored
27 =============================================
28 Migration notes from the 1.2 series (for 2.0)
29 =============================================
c41dc0f @stephane New file which contains the migration notes.
authored
30
31 Init
32 ====
33
34 modbus_init_tcp requires a third new argument, the port number.
35
36 modbus_init_tcp(modbus_param_t *mb_param, char *ip_address, int port)
37
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.
41
42
43 Pointers of data
44 ================
45
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.
49
50 The holding and input registers are now stored in an array of type
51 uint16_t.
52
53 These changes reduce the memory consumption.
Something went wrong with that request. Please try again.