d
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

23 lines
669 B

const DeviceManager = require('./src/fake-device-manager')
const FakeDeviceConnection = require('./src/fake-device-connection')()
const updateStats = require('./src/stats')
console.log('Generating data - send interval: 30s')
let deviceManager = DeviceManager({
deviceCount: 10,
metricsInterval: 30,
connection: FakeDeviceConnection,
onUpdateStats: updateStats,
measurements: {
temperature: {type: 'integer', min: -10, max: 50},
air_humidity: {type: 'integer', min: 30, max: 100},
ground_humidity: {type: 'integer', min: 30, max: 100},
airforce: {type: 'integer', min: 30, max: 100}
}
})
updateStats(deviceManager)
deviceManager.start()