Skip to content

Commit

Permalink
add debug output to signals in tcp port
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacov committed Mar 30, 2017
1 parent 3ec9a39 commit dbc6b78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ports/tcpport.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,19 @@ var TcpPort = function(ip, options) {

this._client.on("connect", function() {
modbus.openFlag = true;
modbusSerialDebug("TCP port: signal connect");
handleCallback();
});

this._client.on("close", function(had_error) {
modbus.openFlag = false;
modbusSerialDebug("TCP port: signal close" + had_error);
handleCallback(had_error);
});

this._client.on("error", function(had_error) {
modbus.openFlag = false;
modbusSerialDebug("TCP port: signal error" + had_error);
handleCallback(had_error);
});

Expand Down

0 comments on commit dbc6b78

Please sign in to comment.