jcurl / RJCP.DLL.SerialPortStream

SerialPortStream is an independent implementation of System.IO.Ports.SerialPort and SerialStream for better reliability and maintainability. Default branch is 2.x and now has support for Mono with help of a C library.
Microsoft Public License
639 stars 199 forks source link

DiscardInBuffer #26

Closed MatejZem closed 7 years ago

MatejZem commented 7 years ago

Hello, First of all thumbs up for the good work. Second I got an

Unhandled exception System.NotImplementedException in mscorlib
System.NotImplementedException
The method or operation is not implemented.

when using the method DiscardInBuffer with Mono on Linux. I have run some tests and found out that this method also didn't work before the update.

jcurl commented 7 years ago

Looks like it works in Windows, but was never implemented for Linux. I'll investigate.

jcurl commented 7 years ago

I've provided a fix if you can test on the branch "bugfix/discard". When you confirm it works as expected, please let me know and I'll merge to v2.x

MatejZem commented 7 years ago

Thank you for your quick response. But how do I test it out with my project in Visual Studio? I don't have any dll to reference to. I had build the .so files for Linux.

Sorry for my lack of knowledge.

jcurl commented 7 years ago

Hi, no worries. There were no changes to libnserial.so, only to the sources. If you need, I can build for you a test nuget package.

MatejZem commented 7 years ago

Please build a test nuget package. I will appreciate it alot.

jcurl commented 7 years ago

The NUGET packages are uploaded. I usually push the version with symbols to NuGet, so rename that file and put in your path that NuGet can upgrade to within the MonoIDE.

serialportstream.2.1.2-rc-1-discard.zip

MatejZem commented 7 years ago

Thank you very much! Is working! I had installed package with symbols and for now it is working. Buffer is emptied. I'm continuously working with Mono on Linux and your Serial Port communication and I will report more bugs, if I may found some.

jcurl commented 7 years ago

Please do report any issues you find. I'm closing this as you tested the commit id ba916671016c92ad1e143257fb7b98df755c2180 which is now in the v2.x branch.