Beispiel #1
0
 public static async void GetInfo(AcUdpClient client)
 {
     while (true)
     {
         var i = await client.CarInfoStream;
         Console.WriteLine(i.EngineRPM);
     }
 }
Beispiel #2
0
        public static void Main()
        {
            AcUdpClient client = new AcUdpClient(IPAddress.Parse("127.0.0.1"));

            Console.WriteLine(client.PerformInitialHandshake().HasValue);
            client.StartTelemetry();
            IObserver <CarInfoPacket> observer = Observer
                                                 .Create <CarInfoPacket>(output => Console.WriteLine(output.EngineRPM));
            var disp = client.CarInfoStream.
                       Subscribe(observer);

            while (true)
            {
            }
        }