public override IBandSensorReading CreateReading() { // Change the reading every now and again. if (_readingCount++ % 20 == 0) { State = new FakeBandDeviceContactReading((BandContactState)((int)(State.State + 1) % 2)); } _readingCount++; return(State); }
public FakeDeviceContactSensor(BandTypeConstants bandType) : base(new List <BandType> { BandType.Cargo, BandType.Envoy }, new Dictionary <TimeSpan, SubscriptionType> { { TimeSpan.Zero, SubscriptionType.DeviceContact } }, bandType) { State = new FakeBandDeviceContactReading(BandContactState.Worn); }