Hi,
first of all many compliments for your library.
I've start writing a Java library that access your library thanks to Java Native Access library.
It's working very well.
About the slave part I did it with version 3.0.6 but then I noticed that modbus_mapping_t struct has been changed to support offsets:
| typedef struct { |
| | int nb_bits; |
| | + int offset_bits; |
| | int nb_input_bits; |
| | + int offset_input_bits; |
| | int nb_input_registers; |
| | + int offset_input_registers; |
| | int nb_registers; |
| | + int offset_registers; |
| | uint8_t *tab_bits; |
| | uint8_t *tab_input_bits; |
| | uint16_t *tab_input_registers;
|
My question, was not better to add the new fields at the end of the struct ?
It would be compatible with older versions.
Or even better, why not create some functions to access the struct fields ?
Such as:
uint8_t *modbus_mapping_get_input_bits(modbus_mapping_t *);
uint16_t *modbus_mapping_get_input_registers(modbus_mapping_t *);
uint16_t *modbus_mapping_get_registers(modbus_mapping_t *);
etc
Thank you.
Aryeh