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

Callback #371

Open
hugoinfante83 opened this issue Nov 20, 2024 · 1 comment
Open

Callback #371

hugoinfante83 opened this issue Nov 20, 2024 · 1 comment

Comments

@hugoinfante83
Copy link

Is it possible to improve callback?
instead of
bool cbf0(Modbus::ResultCode event, uint16_t transactionId, void* data)
to
bool cbfx(Modbus::ResultCode event, uint16_t transactionId, void* data, int idSlave)

in case of multiples slaves inside the call back would be there the idSlave and would make it easier to work on the errors.

the transationid is just that...

@emelianov
Copy link
Owner

You can use mb.eventSource() inside callback to get slaveid processed.

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

No branches or pull requests

2 participants