Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to modbus_reply() response frame required #786

Open
anrodlo opened this issue Jan 8, 2025 · 0 comments
Open

Access to modbus_reply() response frame required #786

anrodlo opened this issue Jan 8, 2025 · 0 comments

Comments

@anrodlo
Copy link

anrodlo commented Jan 8, 2025

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). 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant