private readonly PIEHid32Net.PIEDevice device; // Our RailDriver public RailDriver32() { try { foreach (PIEHid32Net.PIEDevice currentDevice in PIEHid32Net.PIEDevice.EnumeratePIE()) { if (currentDevice.HidUsagePage == 0xc && currentDevice.Pid == 210) { device = currentDevice; device.SetupInterface(); device.suppressDuplicateReports = true; break; } } } catch (Exception error) { device = null; System.Diagnostics.Trace.WriteLine(error); } }
public void HandlePIEHidError(PIEHid32Net.PIEDevice sourceDevices, int error) { Trace.TraceWarning("RailDriver Error: {0}", error); }
public void HandlePIEHidData(byte[] data, PIEHid32Net.PIEDevice sourceDevice, int error) { OnDataRead?.Invoke(data, this); }