node-modbus icon indicating copy to clipboard operation
node-modbus copied to clipboard

Fix Server Event Listener Overload Mismatch

Open alexbuczynsky opened this issue 4 years ago • 3 comments

The modbus server does not accept an event of 'connection' and respond with a net socket.

Fixes #269

alexbuczynsky avatar Aug 26 '20 17:08 alexbuczynsky

@Byorun, let me know if this fixes your issue

alexbuczynsky avatar Aug 26 '20 17:08 alexbuczynsky

@alexbuczynsky on a side note, your lock file is probably outdated image removing the lock file let me run npm install

Byorun avatar Aug 27 '20 07:08 Byorun

Unfortunately this won't fix the problem.

I checked out the branch, build it and copied the dist to my project but the output is still the same.

And using the original server sample for readCoils

server.on('readCoils', function (request, response, send) {
  /* Implement your own */

  response.body.coils[0] = true
  response.body.coils[1] = false

  send(response)
})

still gives the no overloads match error. I assume this might be a copy and paste error since the server.on() doesn't have a three argument listener, only two

Byorun avatar Aug 27 '20 07:08 Byorun

Any update on this fix ? @alexbuczynsky @Byorun

robot2045 avatar Oct 05 '20 18:10 robot2045