Last data as data los timestamp in "offline mode"

Terekhin Alexandr 2 years ago
parent d709c2107d
commit bcb66b1b9d
Signed by: didinst
GPG Key ID: D2EF94423C23BF12
  1. 8
      yabl/protocol.go

@ -156,6 +156,14 @@ func (c *converter) CheckTimeouts(isOffline bool) ([]*Event, bool) {
Value: nil,
}
if isOffline {
// last received data
event.Updated = fld.last
} else {
// actual detection moment
event.Updated = &now
}
var mask uint64 = ^(ALL_BITS << fld.length)
mask = mask << from
fld.value = mask

Loading…
Cancel
Save