please provide a getter for the file descriptor
Moved to GitHub
Brought to you by:
crayzeewulf,
wedesoft
Can you please provide a getter for mFileDescriptor?
We would like to put the read from serial in a select/poll code, but the library doesn't return the open file descriptor
" mImpl->mFileDescriptor = ::open(filename.c_str(), flags) ;"
this feature I think would be really useful to us, we can provide a patch if needed!
thanks
Gianfranco, that sounds good. I will add it and commit to SVN this weekend.
Hi Crayzee, ping ;)
As you might have noticed I'm packaging libserial for debian, right now in the new queue :)
https://ftp-master.debian.org/new/libserial_0.6.0~rc1+svn114-1.html
Thanks, Gianfranco!! Sorry for the delay. I did not get a chance to finish fixing the unit tests but hope to do it this weekend and will have the "getter" in there in the next commit.
Okay. I checked in my update that includes a
GetFileDescriptor()
method in classSerialPort
. Please have a look and let me know if this works for you. I will get the unit tests working this weekend.Hi Crayzee,
I noticed we were using SerialStream class, but if we use SerialPort class we can just call Read* functions and pass a timeout, to achieve a better result insteaf of leveraging the low level file descriptor.
Is this correct? if yes, would be nice maybe to just revert this change, since it might be dangerous and useless :)
(sorry for the noise)