mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Reaper decides if a device is present or not. Allows devices to "come back to life" if they start beating again.
This commit is contained in:
parent
2b84476c42
commit
736b6f769e
8 changed files with 149 additions and 26 deletions
|
@ -120,26 +120,35 @@ module.exports = function(options) {
|
|||
.on(wire.DeviceLogMessage, function(channel, message) {
|
||||
socket.emit('device.log', message)
|
||||
})
|
||||
.on(wire.DevicePresentMessage, function(channel, message) {
|
||||
.on(wire.DeviceIntroductionMessage, function(channel, message) {
|
||||
socket.emit('device.add', {
|
||||
important: true
|
||||
, data: {
|
||||
serial: message.serial
|
||||
, present: false
|
||||
, provider: message.provider
|
||||
, present: true
|
||||
, owner: null
|
||||
, status: message.status
|
||||
, ready: false
|
||||
, reverseForwards: []
|
||||
}
|
||||
})
|
||||
})
|
||||
.on(wire.DevicePresentMessage, function(channel, message) {
|
||||
socket.emit('device.change', {
|
||||
important: true
|
||||
, data: {
|
||||
serial: message.serial
|
||||
, present: true
|
||||
}
|
||||
})
|
||||
})
|
||||
.on(wire.DeviceAbsentMessage, function(channel, message) {
|
||||
socket.emit('device.remove', {
|
||||
important: true
|
||||
, data: {
|
||||
serial: message.serial
|
||||
, present: false
|
||||
, ready: false
|
||||
, using: false
|
||||
, likelyLeaveReason: 'device_absent'
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue