Le 30/10/15 17:33, Francois Hamard a écrit :
> Hello,
>
> I use Mina 2.0.2 with a serial connector and communicate with an
> embedded device. This device is pretty slow compare to the computer
> and take 2ms to switch from send to listen mode. The computer responds
> too quickly.

AFAIU the Serial code, you should get an event informing you that there
is something to read: how can the device can be too slow to get this
event, as it is blocked waiting for the readReadyMonitor variable to be
set, which will be the case when some data is available.

Note that we are not covering all the cases : we are not handling
CTS/DSR atm.

>
> I implemented a solution to wait between last received message and
> next message to sent but I did that in the IoHandler. I need to
> reimplement this solution in the connector.
>
> Do you know if it is already done somewhere? Do you have advices on
> how to do that?
>
> My first idea was to hack the reader worker and writer worker in the
> SerialSessionImpl but I found this solution pretty crappy. What is
> your opinion?

At this point, the Serial code is not completed, AFAICT. Julien pushed
it years ago, and it worked to some extent for what he had to do. I'm
pretty sure you might need some extension, so feel free to propose
patches that you feel are going to improve the code ! FTR, I've not
played with serial ports for, hmmm, decades ;-) (last time was in 1989...)


Reply via email to