public override void Start(int bitrate) { this.SetBitrate(bitrate); this.FDevice.PerformBlocking(() => { NativeFunctions.ThrowIfError( NativeFunctions.StartCAN( this.FDevice.DeviceType , this.FDevice.DeviceIndex , this.FChannelIndex) , this.FDevice.DeviceType , this.FDevice.DeviceIndex , this.FChannelIndex); NativeFunctions.ThrowIfError( NativeFunctions.ResetCAN( this.FDevice.DeviceType , this.FDevice.DeviceIndex , this.FChannelIndex) , this.FDevice.DeviceType , this.FDevice.DeviceIndex , this.FChannelIndex); }); }
public override void Stop() { this.FDevice.PerformBlocking(() => { NativeFunctions.ThrowIfError( NativeFunctions.ResetCAN( this.FDevice.DeviceType , this.FDevice.DeviceIndex , this.FChannelIndex) , this.FDevice.DeviceType , this.FDevice.DeviceIndex , this.FChannelIndex); }); }