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
Hi,
First of all, thank you for providing this library, it has really helped during my current project.
At this point if my application uses Ser.Write("my string"), it will stay in the write buffer until it is read by the connected device.
If for some reason, it isn't read, the buffer will keep older messages, resulting in unexpected messages when it is read at a later point, or even resulting in a segmentation fault when a buffer overflow occurs.
How can I flush the write buffer before calling Ser.Write("my string")?
The text was updated successfully, but these errors were encountered:
Hi @SanderEveraers , I did some quick Googling and think that tcflush() and tcdrain() might help? (see https://linux.die.net/man/3/tcdrain). tcflush seems to drop any data that is ready to be transmitted but not sent, whilst tcdrain() doesn't return until all pending data to be sent has been sent.
Hi,
First of all, thank you for providing this library, it has really helped during my current project.
At this point if my application uses Ser.Write("my string"), it will stay in the write buffer until it is read by the connected device.
If for some reason, it isn't read, the buffer will keep older messages, resulting in unexpected messages when it is read at a later point, or even resulting in a segmentation fault when a buffer overflow occurs.
How can I flush the write buffer before calling Ser.Write("my string")?
The text was updated successfully, but these errors were encountered: