Closed deldrid1 closed 10 years ago
Thanks, I always said to myself that I need to add the write
events whenever I started a new project using this library. I guess the time is now, because someone else needs it too!
I've added the write events to all Connection
s, but before the call to the underlying socket's/serial port's write()/send()
(as it's meant as a diagnostic event and I think it should be emitted even if the write/send throws an exception).
Also, instead of the Master
emitting a write
event (with Transaction.getRequest()
as the first argument) after sending the MODBUS frame, all Transport
s now emit a request
event (with the Transaction
object as the first argument) after constructing the MODBUS frame, but before sending it (so the request
event is emitted before the write
event).
...example