public void ConsumeMessage(object sender, ICommonMessage message) { if (!(message is IUplinkMessage uplinkMessage)) { return; } if (uplinkMessage is DetectedMessage detectedMessage) { var carDetectMessage = new CarDetectMessage(detectedMessage.TransponderID, detectedMessage.Milliseconds, detectedMessage.Hits, detectedMessage.SignalLevel); } }
private void OnCarDetected(object sender, CarDetectMessage message) { _race.UpdateRaceStatus(message); }