You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The modbus response frame, constructed in modbus_reply() function, is not available via API.
Access to the real modbus traffic is needed for debugging, to diagnose communication problems.
Expected behavior or suggestion
I suggest to add an API function modbus_reply_construct() that constructs the response frame and retruns the content in a variable (rsp). Also send_msg() or a wrapper function (e.g. modbus_reply_send()) must be part of the API.
int modbus_reply_construct(modbus_t *ctx,
const uint8_t *req,
int req_length,
modbus_mapping_t *mb_mapping,
uint8_t *rsp)
The text was updated successfully, but these errors were encountered:
libmodbus version
3.1.11
OS and/or distribution
Linux (Debian Buster)
Environment
armel, armhf and amd64.
Description
The modbus response frame, constructed in
modbus_reply()
function, is not available via API.Access to the real modbus traffic is needed for debugging, to diagnose communication problems.
Expected behavior or suggestion
I suggest to add an API function
modbus_reply_construct()
that constructs the response frame and retruns the content in a variable (rsp). Alsosend_msg()
or a wrapper function (e.g.modbus_reply_send()
) must be part of the API.int modbus_reply_construct(modbus_t *ctx,
const uint8_t *req,
int req_length,
modbus_mapping_t *mb_mapping,
uint8_t *rsp)
The text was updated successfully, but these errors were encountered: