Beispiel #1
0
        public void MonitorTyrePressure()
        {
            var random = new Random();

            while (1 == 1)
            {
                var pressureCurrent = random.Next(1, 9999);

                if (pressureCurrent >= thresholdMax | pressureCurrent <= thresholdMin) // if alarm sounded
                {
                    var alarm = new TyrePressureAlarm(pressureCurrent);
                    _listener.TyrePressureAlarmTriggered(alarm);
                    break;
                }
            }
        }
Beispiel #2
0
 public void TyrePressureAlarmTriggered(TyrePressureAlarm alarm)
 {
     _listener.AlarmTriggered(alarm);
 }
Beispiel #3
0
 public void TyrePressureAlarmTriggered(TyrePressureAlarm alarm)
 {
     _alarmTriggered = true;
 }