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
667 B
23 lines
667 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: 20, max: 100},
|
|
ground_humidity: {type: 'integer', min: 20, max: 100},
|
|
airforce: {type: 'integer', min: 0, max: 10}
|
|
}
|
|
})
|
|
|
|
updateStats(deviceManager)
|
|
|
|
deviceManager.start()
|
|
|