TCP-Server/RTU-Slave callback implementation

39 views
Skip to first unread message

Patrick Boettcher

unread,
Aug 7, 2017, 4:17:09 AM8/7/17
to libmodbus
Hi list

What is the status of the library in regards to the callback
implementation when we want to you it in a server/slave-way.

I checked the pull requests #323 and #319 on github. To my eyes #323
looks more fitting into the library's style. 

Stephane is mentioning that there is a discussion going on on this
mailing list, this must have been in around May 2016. 

What was the conclusion?

Is there anything I can do to help? I'll need to spend some time on it
for a project very soon - so why not helping out if possible.

best regards,
--
Patrick.

Patrick Boettcher

unread,
Aug 7, 2017, 11:07:53 AM8/7/17
to libmodbus
On Monday, August 7, 2017 at 10:17:09 AM UTC+2, Patrick Boettcher wrote:
What is the status of the library in regards to the callback
implementation when we want to you it in a server/slave-way.

I checked the pull requests #323 and #319 on github. To my eyes #323
looks more fitting into the library's style. 

After looking at both callback-implementations, I changed my mind. #319 is much closer to what I expected of libmodbus and callbacks.

Stephane mentioned in this PR, that he didn't like the duplicated code. So I took the idea of #319 and implemented a version where mb_mapping is based on modbus_reply_callback(). I will just need to update the fine documentation made by @frodete.

I will soon issue a pull-request. 

--
Patrick.

Reply all
Reply to author
Forward
0 new messages