goToMain / libosdp

Implementation of IEC 60839-11-5 OSDP (Open Supervised Device Protocol); provides a C library with support for C++, Rust and Python3
https://libosdp.sidcha.dev
Apache License 2.0
134 stars 71 forks source link

do not flush rx queue when skipping commands. #32

Closed te-johan closed 3 years ago

te-johan commented 3 years ago

when skipping commands addressed to other nodes the rx queue should not be flushed. The complete command is already received and flushing the rx queue only risks removing bytes in the next command.

te-johan commented 3 years ago

I've neither seen this issue but it is likely to happen if there are multiple PDs on the same line and the PD would call refresh on a semi-low rate. My use case is to have two devices on the same line so better to fix it before it is an issue.