eModbus / eModbus

Modbus library for RTU, ASCII and TCP protocols. Primarily developed on and for ESP32 MCUs.
https://emodbus.github.io
MIT License
363 stars 122 forks source link

New : function to clear message queue #333

Closed ameisso closed 4 months ago

ameisso commented 4 months ago

This is a proposal

In my usage, I sometimes need to send a message with a very high priority (security handbrake). So clearing the queue helps doing this.

Best

Miq1 commented 4 months ago

I like the idea and your solution looks good. The only thing I would like to add is the same function for the TCP clients as well.

ameisso commented 4 months ago

Hello,

Thanks for your feedback I've made the changes. it compiles, but I have nothing to test ATM

Best

Miq1 commented 4 months ago

I will be able to test tomorrow.

sdrshnptl commented 3 months ago

strong feeling that this is a solution to a problem I've encountered recently. My esp32 on the w5500 modbus server is crashing without cause. Will validate and update status. Thanks!