Commit c41dc0fe940d7d6d098e4b1dca5e5fb3e7679f50
1 parent
202231da
New file which contains the migration notes.
Showing
1 changed file
with
47 additions
and
0 deletions
MIGRATION
0 → 100644
| 1 | +=================================== | |
| 2 | +Migration notes from the 1.2 series | |
| 3 | +=================================== | |
| 4 | + | |
| 5 | +Init | |
| 6 | +==== | |
| 7 | + | |
| 8 | +modbus_init_tcp requires a third new argument, the port number. | |
| 9 | + | |
| 10 | +modbus_init_tcp(modbus_param_t *mb_param, char *ip_address, int port) | |
| 11 | + | |
| 12 | +Set the port to MODBUS_TCP_DEFAULT_PORT to use the default one | |
| 13 | +(502). It's convenient to use a port number greater than or equal to | |
| 14 | +1024 because it's not necessary to be root to use this port number. | |
| 15 | + | |
| 16 | + | |
| 17 | +Pointers of data | |
| 18 | +================ | |
| 19 | + | |
| 20 | +The coil and input status are now stored in an array of type uint8_t | |
| 21 | +(in 1.2.X series, array of type int was used). So now, you need to | |
| 22 | +pass a pointer of type uint8_t to use read_coil_status(), for example. | |
| 23 | + | |
| 24 | +The holding and input registers are now stored in an array of type | |
| 25 | +uint16_t. | |
| 26 | + | |
| 27 | +These changes reduce the memory consumption. | |
| 28 | + | |
| 29 | + | |
| 30 | +New functions | |
| 31 | +============= | |
| 32 | + | |
| 33 | +report_slave_id | |
| 34 | + | |
| 35 | +modbus_set_error_handling | |
| 36 | +modbus_mapping_new | |
| 37 | +modbus_mapping_free | |
| 38 | +modbus_init_listen_tcp | |
| 39 | +modbus_listen | |
| 40 | +modbus_manage_query | |
| 41 | + | |
| 42 | +get_slave_query_tcp | |
| 43 | +set_bits_from_byte | |
| 44 | +set_bits_from_bytes | |
| 45 | +get_byte_from_bits | |
| 46 | + | |
| 47 | +Read modbus.h for more informations. | ... | ... |