node-modbus
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -7,5 +7,5 @@ /** | ||
let stampit = require('stampit') | ||
let log = require('stampit-log') | ||
let StateMachine = require('stampit-state-machine') | ||
var stampit = require('stampit') | ||
var logger = require('stampit-log') | ||
var StateMachine = require('stampit-state-machine') | ||
@@ -26,4 +26,9 @@ let ExceptionMessage = { | ||
module.exports = stampit() | ||
.refs({ | ||
'logLabel': 'ModbusCoreClient', | ||
'logLevel': 'info', | ||
'logEnabled': true | ||
}) | ||
.compose(StateMachine) | ||
.compose(log) | ||
.compose(logger) | ||
.init(function () { | ||
@@ -44,2 +49,7 @@ let responseHandler = {} | ||
if (this.logLevel) { | ||
this.log.logLevel = this.logLevel | ||
} | ||
this.log.info('log level: ' + this.log.logLevel) | ||
this.on('data', onData) | ||
@@ -46,0 +56,0 @@ this.on('timeout', onTimeout) |
@@ -12,2 +12,5 @@ /** | ||
.compose(ModbusCore) | ||
.refs({ | ||
'logLabel': 'ModbusSerialClient' | ||
}) | ||
.init(function () { | ||
@@ -14,0 +17,0 @@ let SerialPort = require('serialport') |
@@ -7,8 +7,13 @@ /** | ||
let stampit = require('stampit') | ||
let EventBus = require('stampit-event-bus') | ||
let log = require('stampit-log') | ||
var stampit = require('stampit') | ||
var EventBus = require('stampit-event-bus') | ||
var logger = require('stampit-log') | ||
let core = stampit() | ||
.compose(EventBus, log) | ||
.refs({ | ||
'logLabel': 'ModbusCoreServer', | ||
'logLevel': 'info', | ||
'logEnabled': true | ||
}) | ||
.compose(EventBus, logger) | ||
.init(function () { | ||
@@ -18,3 +23,3 @@ let coils | ||
let input | ||
let handler = { } | ||
let handler = {} | ||
@@ -39,2 +44,7 @@ let init = function () { | ||
} | ||
if (this.logLevel) { | ||
this.log.logLevel = this.logLevel | ||
} | ||
this.log.info('log level: ' + this.log.logLevel) | ||
}.bind(this) | ||
@@ -41,0 +51,0 @@ |
@@ -12,2 +12,5 @@ /** | ||
.compose(ModbusCore) | ||
.refs({ | ||
'logLabel': 'ModbusTCPClient' | ||
}) | ||
.init(function () { | ||
@@ -14,0 +17,0 @@ let reqId = 0 |
@@ -10,2 +10,5 @@ /** | ||
module.exports = stampit() | ||
.refs({ | ||
'logLabel': 'ModbusTCPServerClient' | ||
}) | ||
.compose(log) | ||
@@ -12,0 +15,0 @@ .init(function () { |
@@ -15,2 +15,5 @@ /** | ||
.compose(StateMachine) | ||
.refs({ | ||
'logLabel': 'ModbusTCPServer' | ||
}) | ||
.init(function () { | ||
@@ -17,0 +20,0 @@ let net = require('net') |
{ | ||
"name": "node-modbus", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "Sum of implementations for the Serial/TCP Modbus protocol.", | ||
@@ -5,0 +5,0 @@ "author": "Klaus Landsdorf <klaus.landsdorf@bianco-royal.de>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84948
1689