예제 #1
0
        public RaceEngine(IMessageConsumer messageConsumer)
        {
            _messageConsumer    = messageConsumer;
            _communicateService = new CommunicateService(new RobitronicMessageParser());

            _communicateService.MessageReceived += _messageConsumer.ConsumeMessage;
        }
예제 #2
0
        private void OpenPort_OnExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            _comService = new CommunicateService(MessageParserFactory.GetParserByProtocal(TransponderType.Robitronic));

            var portSetting = new SerialPortSettings(38400, System.IO.Ports.StopBits.One, System.IO.Ports.Parity.None, 8);

            _comService.StartService(ComSelection.Text, portSetting);
        }