Clone the modbus context?

42 views
Skip to first unread message

Lionel Bouzon

unread,
Mar 3, 2015, 6:29:15 AM3/3/15
to libm...@googlegroups.com
Hello
I want to develop a multi-clients Modbus server. So I see I must to duplicate the modbus_t context and define a modbus_clone_tcp() method.
However, this method requires me to include in my program the following two header files modbus-private.h (definition of modbus_t struct) and modbus-tcp-private.h (definition of modbus_tcp_t struct) .
I’ve installed the Debian package libmodbus5 (v3.0.5) on my computer (Debain Linux), and these two headers are not included in the /usr/include/modbus directory of libmodbus, forcing me download sources.
Do I have to include sources in my program? Is there is another way?
Thanks and Regards,
Lionel Bouzon

Stéphane Raimbault

unread,
Mar 3, 2015, 6:55:09 AM3/3/15
to libm...@googlegroups.com
One server can listen many clients, you don't need to duplicate the context, see bandwidth-server-many-up example.

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "libmodbus".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse libmodbus+...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Lionel Bouzon

unread,
Mar 5, 2015, 10:44:11 AM3/5/15
to libm...@googlegroups.com
Ok, thanks for your example!
Lionel
Reply all
Reply to author
Forward
0 new messages