lose method

void lose(
  1. DeviceLoss loss
)

Loses the device as a backend would, for a test of whoever listens to lost: isLost becomes true unless loss is the restored event that ends a recoverable loss, and loss goes out on lost.

Implementation

void lose(DeviceLoss loss) {
  _isLost = !loss.restored;
  _lost.add(loss);
}